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.

Parents
  • Should work fine (do you really have a space in loadbin, I doubt it?) - I do similar things with my nrfjprog loader for OS X plus when I use CrossWorks it does that too, leaves the soft device and flashes the software only. Works fine.

    why don't you try using JLinkExe to pull stuff back OFF the board and make sure it looks right (that's savebin instead of loadbin). There's precious little documentation for JLinkExe, just run it and type '?' to get help, and that's about all the help you will get from it however.

    make sure you're running JLinkExe with the -device switch so it knows what you're programming.

    I don't have the problem from the poster below - I can unplug, reset, remove, replace and mess around with the device as much as I want, never need to reflash it.

Reply
  • Should work fine (do you really have a space in loadbin, I doubt it?) - I do similar things with my nrfjprog loader for OS X plus when I use CrossWorks it does that too, leaves the soft device and flashes the software only. Works fine.

    why don't you try using JLinkExe to pull stuff back OFF the board and make sure it looks right (that's savebin instead of loadbin). There's precious little documentation for JLinkExe, just run it and type '?' to get help, and that's about all the help you will get from it however.

    make sure you're running JLinkExe with the -device switch so it knows what you're programming.

    I don't have the problem from the poster below - I can unplug, reset, remove, replace and mess around with the device as much as I want, never need to reflash it.

Children
No Data
Related