What would be the best way to store configuration and fault information in flash when the app_error_handler is called? It seems like all the libraries available are purely async so I don't know if they would work for me.
What would be the best way to store configuration and fault information in flash when the app_error_handler is called? It seems like all the libraries available are purely async so I don't know if they would work for me.
Save the stuff to a RAM area that doesn't get initialised at startup, then do a reset.
When the code re-starts, save the stuff from RAM to Flash ...
Yeah I was wondering if that would be the best, having trouble getting that working with the bootloader however.
Without the bootloader it seems to work great.
Never tried it with a bootloader.
I guess you'd need to make sure that neither the bootloader nor the app cleared the "persistent" area ... ?
Never tried it with a bootloader.
I guess you'd need to make sure that neither the bootloader nor the app cleared the "persistent" area ... ?
I was able to get it to work following the instructions here
https://devzone.nordicsemi.com/f/nordic-q-a/33530/ram-variables-exchange-between-bootloader-and-application
The key seemed to be making sure it was in it's own section and page for both the bootloader and app. Not sure why that would matter, but I am for sure not an expert on the linker.