esp32: Move the linker wrap options out of the project CMakeLists.
For in-tree builds, these are effectively equivalent. However for out-of-tree builds it's preferable to have as little as possible in the top-level CMakeLists.txt file (as the out-of-tree build needs its own copy). This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
4601dcb8a1
commit
ff70a91581
@@ -71,12 +71,5 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|||||||
# Set the location of the main component for the project (one per target).
|
# Set the location of the main component for the project (one per target).
|
||||||
list(APPEND EXTRA_COMPONENT_DIRS main_${IDF_TARGET})
|
list(APPEND EXTRA_COMPONENT_DIRS main_${IDF_TARGET})
|
||||||
|
|
||||||
# Enable the panic handler wrapper
|
|
||||||
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=esp_panic_handler" APPEND)
|
|
||||||
|
|
||||||
# Patch LWIP memory pool allocators (see lwip_patch.c)
|
|
||||||
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=memp_malloc" APPEND)
|
|
||||||
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=memp_free" APPEND)
|
|
||||||
|
|
||||||
# Define the project.
|
# Define the project.
|
||||||
project(micropython)
|
project(micropython)
|
||||||
|
|||||||
@@ -236,6 +236,13 @@ target_include_directories(${MICROPY_TARGET} PUBLIC
|
|||||||
target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree)
|
target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree)
|
||||||
target_link_libraries(${MICROPY_TARGET} usermod)
|
target_link_libraries(${MICROPY_TARGET} usermod)
|
||||||
|
|
||||||
|
# Enable the panic handler wrapper
|
||||||
|
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=esp_panic_handler" APPEND)
|
||||||
|
|
||||||
|
# Patch LWIP memory pool allocators (see lwip_patch.c)
|
||||||
|
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=memp_malloc" APPEND)
|
||||||
|
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=memp_free" APPEND)
|
||||||
|
|
||||||
# Collect all of the include directories and compile definitions for the IDF components,
|
# Collect all of the include directories and compile definitions for the IDF components,
|
||||||
# including those added by the IDF Component Manager via idf_components.yaml.
|
# including those added by the IDF Component Manager via idf_components.yaml.
|
||||||
foreach(comp ${__COMPONENT_NAMES_RESOLVED})
|
foreach(comp ${__COMPONENT_NAMES_RESOLVED})
|
||||||
|
|||||||
Reference in New Issue
Block a user