From f9b6e25b55f5b2632b4ec960c329bf4df57d106c Mon Sep 17 00:00:00 2001 From: jiangguangming Date: Thu, 1 Dec 2022 20:27:51 +0800 Subject: [PATCH] esp_rom: update CMakeList.txt --- components/esp_rom/CMakeLists.txt | 38 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index affbd79fc8..e80719afab 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -255,27 +255,31 @@ else() # Regular app build # Normal(Non-nano) formatting functions in ROM are also built for 64-bit time_t. rom_linker_script("newlib-normal") endif() - endif() + endif() elseif(target STREQUAL "esp32h2") - rom_linker_script("newlib") - rom_linker_script("version") - rom_linker_script("phy") - rom_linker_script("coexist") - rom_linker_script("net80211") - rom_linker_script("pp") + rom_linker_script("newlib") + rom_linker_script("version") + rom_linker_script("phy") + rom_linker_script("coexist") + rom_linker_script("net80211") + rom_linker_script("pp") - if(time_t_size EQUAL 8) - # The ROM functions listed in this linker script depend on sizeof(time_t). - # Since ROM for ESP32-H2 was compiled for 64-bit time_t, only link these functions - # if the toolchain is also using 64-bit time_t. - rom_linker_script("newlib-time") + if(CONFIG_SPI_FLASH_ROM_IMPL) + rom_linker_script("spiflash") + endif() - if(CONFIG_NEWLIB_NANO_FORMAT) - # nano formatting functions in ROM are also built for 64-bit time_t. - rom_linker_script("newlib-nano") - endif() - endif() + if(time_t_size EQUAL 8) + # The ROM functions listed in this linker script depend on sizeof(time_t). + # Since ROM for ESP32-H2 was compiled for 64-bit time_t, only link these functions + # if the toolchain is also using 64-bit time_t. + rom_linker_script("newlib-time") + + if(CONFIG_NEWLIB_NANO_FORMAT) + # nano formatting functions in ROM are also built for 64-bit time_t. + rom_linker_script("newlib-nano") + endif() + endif() endif()