esp_rom: esp32c6 support spiflash driver rom implementation
@@ -70,15 +70,6 @@ else()
target_linker_script(${COMPONENT_LIB} INTERFACE "${target}/${ld_folder}/${target}.rom.ld")
rom_linker_script("api")
- # esp32c6.rom.api.ld has been split to several lds by components
- if(target STREQUAL "esp32c6")
- rom_linker_script("phy")
- rom_linker_script("coexist")
- rom_linker_script("net80211")
- rom_linker_script("pp")
- # rom_linker_script("spiflash") # TODO: IDF-5632 (Supports more rom components)
- endif()
-
if(CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB)
rom_linker_script("libgcc")
else()
@@ -117,6 +108,8 @@ if(BOOTLOADER_BUILD)
elseif(target STREQUAL "esp32c6")
rom_linker_script("newlib")
+ # The linking of the bootloader needs to use the rom_i2c_writeReg_Mask in esp32c6.rom.phy.ld
+ rom_linker_script("phy")
endif()
else() # Regular app build
@@ -233,6 +226,17 @@ else() # Regular app build
elseif(target STREQUAL "esp32c6")
rom_linker_script("newlib")
rom_linker_script("version")
+
+ # esp32c6.rom.api.ld has been split to several lds by components.
+ rom_linker_script("phy")
+ rom_linker_script("coexist")
+ rom_linker_script("net80211")
+ rom_linker_script("pp")
+
+ if(CONFIG_SPI_FLASH_ROM_IMPL)
+ rom_linker_script("spiflash")
+ endif()
+
endif()
if(CONFIG_HEAP_TLSF_USE_ROM_IMPL)
