Blinky runs on DK, but not on external Seeed Xiao nRF52840

I am trying to program a Seeed Xiao nRF52840 Sense with a nRF5DK-52832 using the Debug out P20 connector.  I am an experienced embedded systems developer (ESP32, ATTiny/AVR,and some STM), but have little experience of the Nordic products but my client wants to use the Seeed, so I'm on a necessarily steep learning curve. I've done the Getting started course but have yet to master the subtleties of this environment.

I'm using latest VSCode with toolchain 3.2.1 on Windows 11.The SWD interface works OK, I can see the target device change from nRF52832 to nRF52840 when I connect Vtg on the DK to the Seeed's 3.3v line, and I can flash the Arduino bootloader back with nrfutils.

The build process for a modified Blinky compiles, links, erases and uploads successfully on both the DK and the external Seeed, using the relevant board.dts file.  I have two build configurations, one for each environment, and some conditional logic in main.c that changes some output text and the flash rate depending on the compile target.  All that works fine except the code doesn't run on the Seeed board, it just doesn't start. I can see it compiles for a base of 0x27000 though, from other posts here I'm convinced it should be a base of 0.

As per those other posts I've commented out these two lines in the Seeed's board config file:

    CONFIG_BUILD_OUTPUT_UF2=y
    CONFIG_USE_DT_CODE_PARTITION=y
but that made no effect, and the UF2 file still gets generated.
I also tried, as per another post,
     CONFIG_FLASH_LOAD_OFFSET=0

in various .conf files with no apparent effect.

What to try next?

Thanks in anticipation...

Related