Merge branch 'feat/p4_eco5_fpga' into 'master'

esp32p4: eco5 support on FPGA

See merge request espressif/esp-idf!39917
This commit is contained in:
Armando (Dou Yiwen)
2025-07-11 01:27:22 +00:00
36 changed files with 2010 additions and 80 deletions
+36 -7
View File
@@ -97,7 +97,12 @@ if(target STREQUAL "linux")
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-integer-overflow -Wno-shift-count-overflow)
endif()
else()
target_linker_script(${COMPONENT_LIB} INTERFACE "${target_folder}/${ld_folder}/${target}.rom.ld")
# TODO: IDF-13410. Update to (CONFIG_ESP32P4_REV_MIN_FULL GREATER_EQUAL 200) when chip efuse is correct.
if(CONFIG_ESP32P4_REV_MIN_200)
target_linker_script(${COMPONENT_LIB} INTERFACE "${target_folder}/${ld_folder}/${target}.rom.eco5.ld")
else()
target_linker_script(${COMPONENT_LIB} INTERFACE "${target_folder}/${ld_folder}/${target}.rom.ld")
endif()
rom_linker_script("api")
if(NOT CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
if(target STREQUAL "esp32s3" OR target STREQUAL "esp32c3")
@@ -106,9 +111,17 @@ else()
endif()
if(CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB)
rom_linker_script("libgcc")
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410
rom_linker_script("eco5.libgcc")
else()
rom_linker_script("libgcc")
endif()
else()
rom_linker_script("rvfp")
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410.
rom_linker_script("eco5.rvfp")
else()
rom_linker_script("rvfp")
endif()
endif()
endif()
@@ -148,13 +161,21 @@ if(BOOTLOADER_BUILD)
if(target STREQUAL "esp32" OR target STREQUAL "esp32s2")
rom_linker_script("libc-funcs")
else()
rom_linker_script("libc")
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410
rom_linker_script("eco5.libc")
else()
rom_linker_script("libc")
endif()
if(CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY
AND NOT CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS)
rom_linker_script("libc-suboptimal_for_misaligned_mem")
endif()
if(CONFIG_LIBC_NEWLIB)
rom_linker_script("newlib")
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410
rom_linker_script("eco5.newlib")
else()
rom_linker_script("newlib")
endif()
endif()
endif()
endif()
@@ -307,12 +328,20 @@ else() # Regular app build
if(CONFIG_ESP_ROM_HAS_NEWLIB AND NOT target STREQUAL "esp32" AND NOT target STREQUAL "esp32s2")
# ESP32 and S2 are a bit different, keep them as special cases in the target specific include section
rom_linker_script("libc")
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410
rom_linker_script("eco5.libc")
else()
rom_linker_script("libc")
endif()
if(CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY AND NOT CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS)
rom_linker_script("libc-suboptimal_for_misaligned_mem")
endif()
if(CONFIG_LIBC_NEWLIB)
rom_linker_script("newlib")
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410
rom_linker_script("eco5.newlib")
else()
rom_linker_script("newlib")
endif()
endif()
if(CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT AND CONFIG_LIBC_NEWLIB AND CONFIG_NEWLIB_NANO_FORMAT)