From bac171eebe2fc1a783dd4e1664a904ea42aff88e Mon Sep 17 00:00:00 2001 From: gullradriel Date: Sat, 8 Aug 2026 21:33:56 +0200 Subject: [PATCH] CMakeLists: relink when external.ld changes --- firmware/application/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/application/CMakeLists.txt b/firmware/application/CMakeLists.txt index 29b38df83..610c210b2 100644 --- a/firmware/application/CMakeLists.txt +++ b/firmware/application/CMakeLists.txt @@ -489,7 +489,10 @@ add_executable(${PROJECT_NAME}.elf ${CSRC} ${CPPSRC} ${ASMSRC}) target_link_options(${PROJECT_NAME}.elf PRIVATE "LINKER:--defsym,LD_FLASH_SIZE=${FLASH_BYTES_LIMIT_SIZE}" ) -set_target_properties(${PROJECT_NAME}.elf PROPERTIES LINK_DEPENDS ${LDSCRIPT}) +# NB: LPC43xx_M0.ld does INCLUDE external.ld, so that one has to be listed too - +# otherwise editing the external app section rules silently does not relink. +set_target_properties(${PROJECT_NAME}.elf PROPERTIES + LINK_DEPENDS "${LDSCRIPT};${CMAKE_CURRENT_SOURCE_DIR}/external/external.ld") add_definitions(${DEFS}) include_directories(. ${INCDIR}) link_directories(${LLIBDIR})