Seeed XIAO BLE (nRF52840) with an external debugger (blackmagic)

Interesting. Why does it do that with base address 0x0? Seeed Studio’s ArduinoCore-mbed fork starts flash at 0x27000.

That’s an offset of 159744 bytes.

Per framework-mbed-seeed/bootloaders/Seeed_XIAO_nRF52840_Sense at main · maxgerhardt/framework-mbed-seeed · GitHub there is a bootloader on these devices, so maybe that’s what’s missing.

It could be the case that by uploading to the board with board = nrf52840_dk config, you killed off the bootloader on your board that would normally execute the application at 0x27000.

Let’s do a really simple test and try and shift down the firmware so that it may be able to run without a bootloader. Find the file

C:\Users\<user>\.platformio\packages\framework-mbed-seeed\variants\SEEED_XIAO_NRF52840\linker_script.ld

and for the FLASH memory, set ORIGIN = 0x0.

Reupload the firmware and post the logs again.