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

how to translate nrfjprog --readcode addresses

I performed flash read using nrfjprog --readcode. here the snipped of the output file

:020000040000FA
:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0

the addresses in the output does not reflect real addresses in the flash

how can I translate them

  • readcode returns the content of flash in the intel hex format. One option is to use a python script called hex2dump to get it in a more readable format. E.g.,

    python hex2dump <name>.hex > <output name>.txt
    

    However, if you only want to read memory at a particular address it is easier to use the "--memrd" command in nrfjprog.

    EDIT: forgot that you can pipe the output from memrd as well:

    nrfjprog --memrd --n > output name.txt

Related