Hi,
Chip: nRF52840
OS: nRF Connect / Zephyr: v2.3.0
Problem: Saving coredumps to external flash
We're trying to add a bunch of debugging features to our firmware before field trials.
We've been trying to saving coredumps to external flash, so on the next reboot we can upload them to the cloud.
It seems that Zephyr does support this using "CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION". However this doesn't seem to be supported by nordic chips for a few reasons.
I've seen another question around this subject posted about a year ago. The recommendation was to use memfault, but this seems a bit weird to have to use a commercial cloud solution to simply save coredumps to flash.
What we've tried
Un-supported fields
nordic,qspi-nor.yaml does not include "soc-nv-flash.yaml" which means properties "erase-block-size" & "write-block-size" don't exist. These are required by the flash backend impl.
Using QSPI in fatal handler
After adding the above fields & configuring our pm_static.yml file everything compiles. However when triggering a crash, coredumps are no longer created. It seems like the fatal handler is crashing (no cli outputs).
If i comment out all the flash operators in "coredump_backend_flash_partition.c" such as "flash_area_erase" & "flash_area_write" the fatal handler does run (cli outputs); obviously the coredump is not saved.
I suppose my question is can you use QSPI while in the fatal handler? I'm not sure if the QSPI driver needs re-initing, interrupts need re-enabling etc.
Summary
Are there any examples where coredumps are being saved to external flash using nrf-sdk?
Cheers.