esp32/esp32_common.cmake: Allow overriding linker.lf.
Particularly for out of tree builds, one may need to provide alternative or extra linker fragment files, or specify an absolute path to the default `linker.lf` file. In the default case, do nothing, provide a plain `linker.lf`, as before. Signed-off-by: Karl Palsson <karl.palsson@marel.com>
This commit is contained in:
committed by
Damien George
parent
ec876a5e27
commit
cbd21b3977
@@ -178,6 +178,13 @@ list(APPEND IDF_COMPONENTS
|
|||||||
vfs
|
vfs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Provide the default LD fragment if not set
|
||||||
|
if (MICROPY_USER_LDFRAGMENTS)
|
||||||
|
set(MICROPY_LDFRAGMENTS ${MICROPY_USER_LDFRAGMENTS})
|
||||||
|
else()
|
||||||
|
set(MICROPY_LDFRAGMENTS linker.lf)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Register the main IDF component.
|
# Register the main IDF component.
|
||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRCS
|
SRCS
|
||||||
@@ -197,7 +204,7 @@ idf_component_register(
|
|||||||
${MICROPY_BOARD_DIR}
|
${MICROPY_BOARD_DIR}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
LDFRAGMENTS
|
LDFRAGMENTS
|
||||||
linker.lf
|
${MICROPY_LDFRAGMENTS}
|
||||||
REQUIRES
|
REQUIRES
|
||||||
${IDF_COMPONENTS}
|
${IDF_COMPONENTS}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user