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:
parent
ec876a5e27
commit
cbd21b3977
1 changed files with 8 additions and 1 deletions
|
|
@ -178,6 +178,13 @@ list(APPEND IDF_COMPONENTS
|
|||
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.
|
||||
idf_component_register(
|
||||
SRCS
|
||||
|
|
@ -197,7 +204,7 @@ idf_component_register(
|
|||
${MICROPY_BOARD_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
LDFRAGMENTS
|
||||
linker.lf
|
||||
${MICROPY_LDFRAGMENTS}
|
||||
REQUIRES
|
||||
${IDF_COMPONENTS}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue