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

JLink script only results in functional device when flashing whole chip?

I have the following jlink script for flashing an nrf51822 I'm on Mac OSX 10.9 and am talking to the PCA10001 eval board.

r 
w4 4001E504 2
w4 4001e50C 1 
sleep    1000 
w4 4001e504 1 
sleep 1000 
loadbin    s110_nrf51822_6.0.0_softdevice_mainpart.bin    0 
loadbin    s110_nrf51822_6.0.0_softdevice_uicr.bin    10001000 
load bin    _build/ble_app_art_s110_xxaa.bin 0x00014000 
r 
g 
exit

When I run this the board is programed and comes up fine. If I make a change to ble_app_art and recompile and flash using this, again all is fine. It seems silly to re-flash the soft device every time so I tried changing this to the following to only flash the new application bin.

r
#w4 4001E504 2
#w4 4001e50C 1
#sleep 1000
w4 4001e504 1
sleep 1000
#loadbin s110_nrf51822_6.0.0_softdevice_mainpart.bin 0
#loadbin s110_nrf51822_6.0.0_softdevice_uicr.bin 10001000
load bin _build/ble_app_art_s110_xxaa.bin 0x00014000
r
g
exit

After running this with JLinkEXE the board is non-functional?

I haven't found any good documentation on JLinkEXE and am just cobbling this together. Any help pointing out my stupid mistake would be greatly appreciated.

Related