diff options
| author | Karl Palsson <karlp@tweak.au> | 2025-01-27 16:05:07 +0000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-02-28 16:22:05 +1100 |
| commit | cbd21b39778d3f7b808d0c631a193625035b2190 (patch) | |
| tree | 9cfea50df7c5424b79d77f270c3efc2a6d94ba4f | |
| parent | ec876a5e27163299ff60ee70e4ef21073dd67704 (diff) | |
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>
| -rw-r--r-- | ports/esp32/esp32_common.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake index e03d2ff11..059989c10 100644 --- a/ports/esp32/esp32_common.cmake +++ b/ports/esp32/esp32_common.cmake @@ -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} ) |
