I am trying to flash a secure DFU bootloader (compiled using my own key), a soft device, and my application using nrfjprog with the intention being to have the application boot when the board is reset. However, it always goes back to the bootloader after the reset.
I'm using SDK 15.3.0 and soft device s140_nrf52_6.1.1_softdevice.hex.
If I use nRF Connect on my phone to download my app it will launch no problem.
I found some articles that said I have to write specific values to 0x3FC00 and 0x3FC04 to fool the bootloader into launching the app but I believe these addresses are not applicable to my setup as I believe the bootloader settings are located at FF000. Is that right?
Here are the commands I'm using to write to the flash, patched together from a bunch of things I have read
nrfjprog --eraseall
nrfutil settings generate --family NRF52840 --application emf_firmware_pca10056_s140.hex --application-version 1 --bootloader-version 0 --bl-settings-version 2 bootloader_setting.hex
nrfjprog --program s140_nrf52_6.1.1_softdevice.hex -f NRF52
nrfjprog --program bootloader_setting.hex -f NRF52
nrfjprog --program secure_bootloader_ble_s140_pca10056.hex -f NRF52
nrfjprog --program emf_firmware_pca10056_s140.hex -f NRF52
nrfjprog --reset
Can someone please let me know what I'm missing to make this work? I've been trying various things for the last two days.
Thanks.