This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 958fc00d69e boards/arm/nrf52/xiao-nrf52840: Always link with the 
board's script.
958fc00d69e is described below

commit 958fc00d69ef424649e63a9f7b64e31db9b72642
Author: Max Kriegleder <[email protected]>
AuthorDate: Sat Oct 24 12:42:48 2026 +0200

    boards/arm/nrf52/xiao-nrf52840: Always link with the board's script.
    
    The XIAO's UF2 bootloader occupies the first 4 KiB of flash, and the
    board's scripts/flash_config.ld places the image at 0x1000 behind it.
    The CMake build used that script only with ARCH_BOARD_COMMON off; with
    it on, it took boards/arm/nrf52/common/scripts/flash_config.ld, which
    links at 0x0 for the nRF52 DKs. Flashing that image overwrites the
    bootloader. The Make build (scripts/Make.defs) always uses the board's
    script.
    
    Use the board's script in the CMake build too, whatever
    ARCH_BOARD_COMMON says.
    
    Assisted-by: Claude:claude-opus-5-5
    Signed-off-by: Max Kriegleder <[email protected]>
---
 boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt 
b/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt
index 50db1037f7d..5ea0fa4390a 100644
--- a/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt
+++ b/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt
@@ -42,10 +42,5 @@ endif()
 
 target_sources(board PRIVATE ${SRCS})
 
-if(CONFIG_ARCH_BOARD_COMMON)
-  set_property(GLOBAL PROPERTY LD_SCRIPT
-                               "${NUTTX_COMMON_DIR}/scripts/flash_config.ld")
-else()
-  set_property(GLOBAL PROPERTY LD_SCRIPT
-                               "${NUTTX_BOARD_DIR}/scripts/flash_config.ld")
-endif()
+set_property(GLOBAL PROPERTY LD_SCRIPT
+                             "${NUTTX_BOARD_DIR}/scripts/flash_config.ld")

Reply via email to