Yes.Has anyone successfully use J-Link Commander to load the soft_device into memory starting at address 0x00000, program code starting at 0x20000, and successfully run a BLE program on the nRF51822?
First, you have to covert the Nordic softdevice hex file into *two* binaries: the softdevice part and the UICR part. You can use objcopy for this, the following Makefile fragments are from Nordic.
You will also have to compile your code to a bin.
Then you perform the following steps:
- erase the entire flash
- burn the UICR
- burn the softdevice
- burn your desired code
Here is a rough transcript of the commands:
Source Code
- J-Link>r
- ..
- J-Link>device nrf51822
- ..
- J-Link>speed 1000
- ..
- # erase the entire flash
- J-Link>w4 4001e504 2
- J-Link>w4 4001e50c 1
- J-Link>w4 4001e514 1
- J-Link>r
- # enable the flash for writing
- J-Link>w4 4001e504 1
- J-Link>loadbin my-uicr.bin 0x10001000
- ..
- J-Link>loadbin my-softdevice.bin 0
- ..
- J-Link>loadbin my-code.bin 0x20000
- ..
- J-Link>r
- J-Link>g
- J-Link>exit
The post was edited 1 time, last by vonkil ().