XIAO nrf52840 - can flash, but code will not run (flash location)

Hi, I am able to flash my XIAO nrf52840 using my nrf52840dk however the code does not run once flashed. I checked and the code itself is starting at 0x00027000 presumably because of the default bootloader the board came with. However, I no longer have the bootloader. I tried setting this in my prj.conf to override the default for the board, but it still puts code starting at 0x00027000:

# Build UF2 by default, supported by the Adafruit nRF52 Bootloader
CONFIG_BUILD_OUTPUT_UF2=n
CONFIG_USE_DT_CODE_PARTITION=n
And here's where I see the code still coming after the empty reserved location:
Does anyone know how I can solve this?
Parents Reply
  • That gave me a good pointer. Since in my case I am going without a bootloader, I just set `CONFIG_USE_DT_CODE_PARTITION=n` and disabled sysbuild (this was the key) and then it worked! I didn't end up needing the overlay or any other settings as that put it right at the start of flash.

    `SB_CONFIG_PARTITION_MANAGER=n` gave me an error for some reason so I did not use that; I'm not sure why it didn't work.

    Going forward I now know about the pm_static.yml if I need any custom definitions or need sysbuild then I will take that route. Thanks for your help!

Children
No Data
Related