Hi everybody,
Well, the week was long, but I finally got openOCD working for my RM186.
For information, nrfjprog neither worked on linux for me, I got a pretty
*** J-Link V6.14a J-Link V6.14a Info ***
The connected J-Link (S/N XXXXXXXXX) has been designed to work with devices made by ST only.
Debugging the selected device nRF51822_xxAA is not supported by this J-Link.
To program and debug the target device, please consider purchasing a full J-Link.
More information: <a>https://www.segger.com/jlink-debug-probes.html</a>
*** J-Link V6.14a J-Link V6.14a Info ***
in the wormOld.tmp…It seems that Segger firmware is not as much open bar anymore ;-)…
So, lazy as I was to grab a $60 JLink EDU (I’d rather spend this money on belgian beer), I tried to switch to openOCD.
With the help of this tutorial I got to connect to the laird and to read the flash using
flash read_bank 0 bank0.bin 0 262144
flash read_bank 1 bank1.bin 0 262144
So now, I think the equivalent of this worm reading:
set wrmstart=0x3FC00
set wrmlen=1024
echo grab worm data and convert to hex file
nrfjprog --memrd %wrmstart% --n %wrmlen% --w 8 >wormOld.tmp
if for openOCD:
flash read_bank 0 wormOld.tmp 261120 1024
The content of the wormOld.tmp I got is the following (when opening with an hex editor):
00 FF FC FC FF FF FF FF FF FF FF FF 16 00 00 50 FF FF FF FF 00 00 5F FF F8 F8 00 00 00 50 30 00 00 50 FF FF FF FF FF FF FF FF 02 00 00 00 A5 A5 5F FF F8 F8 16 00 00 50 54 00 00 50 FF FF FF FF FF FF FF FF 07 00 02 00 FF FF XX XX XX XX AC XX XX XX XX XX 5F FF F8 F8 30 00 00 50 72 00 00 50 FF FF FF FF FF FF FF FF 04 00 07 00 FF FF XX 00 00 00 5F FF F8 F8 54 00 00 50 90 00 00 50 FF FF FF FF FF FF FF FF 04 00 08 00 FF FF XX XX FF FF 5F FF F8 F8 72 00 00 50 B2 00 00 50 FF FF FF FF FF FF FF FF 06 00 04 00 FF FF C0 EE 40 00 01 01 XX XX 5F FF F8 F8 90 00 00 50 D4 00 00 50 FF FF FF FF FF FF FF FF 06 00 05 00 FF FF 31 XX 30 35 32 30 31 36 5F FF FC FC B2 00 00 50 FF FF FF FF FF FF FF FF FF FF FF FF 06 00 06 00 FF FF 50 XX XX 30 XX XX XX XX FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF .....Only FF
The XX are the values that differ from my first to my second module, so I guess they’re “private”.
Could somebody friendly, that have access to a JLink, compare those values to the ones (s)he got from nrfjprog and confirm (or infirm) that the values I got are the right ones ? Just because I’d prefer to avoid bricking my Laird.
BTW, as far as I could grab informations, this wormy is only for keeping MAC address, but who knows…
Thanks a lot for you help,
Guillaume