mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(ulp): restore legacy LP-core child link behavior
Preserve all linker scripts passed to target_linker_script() so LP-core child builds keep the full esp32p4 LP ROM script set instead of only the first script. Link the ULP runtime component as WHOLE_ARCHIVE for ULP child builds, matching the legacy helper behavior where runtime sources were added directly to the executable. This keeps strong runtime handlers such as ulp_lp_core_panic_handler from being skipped in favor of weak defaults from already-extracted archive objects. Validated with the esp32p4 lp_core_hp_uart panic and LP-ROM pytest cases, plus the focused local/CI build_all shape for the app.
This commit is contained in:
@@ -266,10 +266,20 @@ if(priv_requires)
|
||||
list(REMOVE_DUPLICATES priv_requires)
|
||||
endif()
|
||||
|
||||
set(whole_archive)
|
||||
if(__ULP_BUILD)
|
||||
# Legacy ULP child builds added the LP-core runtime sources directly to the
|
||||
# executable. Preserve that behavior so strong handlers such as
|
||||
# ulp_lp_core_panic_handler are not dropped in favor of weak defaults from
|
||||
# other runtime objects.
|
||||
set(whole_archive WHOLE_ARCHIVE)
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${includes}
|
||||
REQUIRES ${requires}
|
||||
PRIV_REQUIRES ${priv_requires})
|
||||
PRIV_REQUIRES ${priv_requires}
|
||||
${whole_archive})
|
||||
|
||||
# In the parent app build, the ulp component only provides the host-side API.
|
||||
# The executable/linker setup below is for native ULP child projects.
|
||||
|
||||
Reference in New Issue
Block a user