This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to flash bootloader with JLink / gcc ?

Hi ; Following my question how-to-flash-with-jlink-command-line which was successful, I can flash Soft Device and my app on my nRF51822 board (mac os x + gcc)

Now I would like to flash the bootloader

if SWD
speed 4000
device nrf51
w4 4001e504 2
w4 4001e50c 1
sleep 100
r
# OK - this works for SD + app only / no bootloader
loadfile s110_nrf51822_7.0.0_softdevice.hex
loadfile app.hex

# FAIL - this does not work for bootloader + SD + app
loadfile bootloader_dgs_V0_AA.hex
loadfile s110_nrf51822_7.0.0_softdevice.hex
loadfile app.hex

sleep 100
r
g
exit

Any help ? Thanks

Parents
  • Hi Thomas,

    When it FAIL what was failed ? After you flash the bootloader, you supposed to flash the application via DFU not via nrfjprog (because the bootloader will think that there is no valid application when it starts) If you want to use nrfjprog to flash the application, you would need to write into the bootloader setting telling it that there is a valid application. Please have a look at question E in this FAQ.

Reply
  • Hi Thomas,

    When it FAIL what was failed ? After you flash the bootloader, you supposed to flash the application via DFU not via nrfjprog (because the bootloader will think that there is no valid application when it starts) If you want to use nrfjprog to flash the application, you would need to write into the bootloader setting telling it that there is a valid application. Please have a look at question E in this FAQ.

Children
No Data
Related