I am trying to use Arduino Opta RS485 in a remote industrial environment. To be more robust, I would like to reboot when a SW "fatal" error happens ( e.g. memory crash ).
After searching, I found that ArduinoCore of Mbed OS that runs inside Opta, hangs by default during fatal error, and to change its behaviour, I would have to modify mbed_app.json file as described here, recompile the ArduinoCore as described here and replace the files on my PC.
However, during compilation, I come accross the following error
undefined reference to `CRASH_DATA_RAM_START'
and after further reasearch, it seems connected to this issue , that suggest that someone should modify linker in order to "make space" for crash data report, which goes beyond my knowledge.
Does anyone else has reached this far, or has similar experience with an Mbed OS-powered Arduino board ( Nicla, Portenta, Giga etc ) and have managed to change board behaviour during fata error ?
A bit late answer, but we found a workaround in resetting device after SW failure, not by modifying/recompiling ArduinoCore but by using mbed Watchdog in main loop .
You could also include this function to flash the red pattern a couple of times before rebooting. The mbed_die() function in the mbed os core is declared weak so can be overridden.