|
|
@@ -81,13 +81,14 @@ else() # Regular app build
|
|
|
# then all time functions from the ROM memory will not be linked.
|
|
|
# Instead, those functions can be used from the toolchain by ESP-IDF.
|
|
|
rom_linker_script("newlib-time")
|
|
|
- endif()
|
|
|
|
|
|
- # Include in newlib nano from ROM only if SPIRAM cache workaround is disabled
|
|
|
- if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
- rom_linker_script("newlib-nano")
|
|
|
- endif()
|
|
|
+ # Include in newlib nano from ROM only if SPIRAM cache workaround is disabled
|
|
|
+ # and sizeof(time_t) == 4
|
|
|
+ if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
+ rom_linker_script("newlib-nano")
|
|
|
+ endif()
|
|
|
|
|
|
+ endif()
|
|
|
endif()
|
|
|
|
|
|
if(NOT CONFIG_SPI_FLASH_ROM_DRIVER_PATCH)
|
|
|
@@ -103,10 +104,19 @@ else() # Regular app build
|
|
|
rom_linker_script("newlib-data")
|
|
|
rom_linker_script("spiflash")
|
|
|
|
|
|
- if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
- rom_linker_script("newlib-nano")
|
|
|
+ if(NOT CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS)
|
|
|
+ # If SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS option is defined
|
|
|
+ # then all time functions from the ROM memory will not be linked.
|
|
|
+ # Instead, those functions can be used from the toolchain by ESP-IDF.
|
|
|
+
|
|
|
+ if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
+ rom_linker_script("newlib-nano")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ rom_linker_script("newlib-time")
|
|
|
endif()
|
|
|
|
|
|
+
|
|
|
# descirptors used by ROM code
|
|
|
target_sources(${COMPONENT_LIB} PRIVATE "esp32s2/usb_descriptors.c")
|
|
|
|
|
|
@@ -114,16 +124,32 @@ else() # Regular app build
|
|
|
rom_linker_script("newlib")
|
|
|
rom_linker_script("version")
|
|
|
|
|
|
- if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
- rom_linker_script("newlib-nano")
|
|
|
+ if(NOT CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS)
|
|
|
+ # If SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS option is defined
|
|
|
+ # then all time functions from the ROM memory will not be linked.
|
|
|
+ # Instead, those functions can be used from the toolchain by ESP-IDF.
|
|
|
+
|
|
|
+ if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
+ rom_linker_script("newlib-nano")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ rom_linker_script("newlib-time")
|
|
|
endif()
|
|
|
|
|
|
elseif(target STREQUAL "esp32c3")
|
|
|
rom_linker_script("newlib")
|
|
|
rom_linker_script("version")
|
|
|
|
|
|
- if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
- rom_linker_script("newlib-nano")
|
|
|
+ if(NOT CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS)
|
|
|
+ # If SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS option is defined
|
|
|
+ # then all time functions from the ROM memory will not be linked.
|
|
|
+ # Instead, those functions can be used from the toolchain by ESP-IDF.
|
|
|
+
|
|
|
+ if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
+ rom_linker_script("newlib-nano")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ rom_linker_script("newlib-time")
|
|
|
endif()
|
|
|
|
|
|
if(CONFIG_ESP32C3_REV_MIN_3)
|