I use nrf52832 and SDK 17.0.2.
I use flash crashlog to store crash log on the flash.
I enabled NRF_LOG_BACKEND_FLASH_START_PAGE = 0, which means flash log area starts directly after the application (ie first page aligned address).
I use nrfjprog tool to read out the flash content, the command is "nrfjprog --family nrf52 --readcode [file]".
Now I get a file containing the flash content, the snippet of it is:
Since I haven't printed any log yet, I wonder if the log starts with the line "10FD9000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF73"? But "10FD9000" is not even a flash address...
Plase guide me how to locate flash crashlog address, thank you.
The format here is intel HEX so you are not reading the dump correctly. To dump the flash memory in a easily readable form it is better to use:
nrfjprog.exe --memrd 0 --n 0x80000 > dump.txt
Einar, thank you for your reply.
I got a further question, is crashlog also contained in the dump file with "nrfjprog.exe --memrd 0 --n 80000 > dump.txt" command? and how do I know where my application code ends in the dump file?
Could you please explain a little more. Thank you.
I updated my initial answer as there was a typo. The length (specified with --n) should be 0x80000, as that corresponds to the 512 kB flash on the nRF52832 (512*1024).
The above will dump the entire flash in a easily readable form, where you have the addresses specified ad the beginning of each line. As you set NRF_LOG_BACKEND_FLASH_START_PAGE to 0 you know that the log starts at the first page after the application, so you need to check the application end address (either from the build information of for instance by opening it in nRF Connect programmer and adding the application hex file and hover over it. Then you know that at the next page boundary (whole 0x1000), the log starts.
Thank you, that's helpful. I will try it.