@ -96,3 +96,44 @@ arm-none-eabi-gdb in the same manner.
@@ -96,3 +96,44 @@ arm-none-eabi-gdb in the same manner.
To see ChibiOS threads use the "info threads" command. See the gdb
documentation for more information.
# Debugging Hardfaults
## Getting fault dump via Serial
All one needs to do is connect the First USART(not OTG) in the SERIAL_ORDER of the board via FTDI. In the case of CubeOrange that is Telem1 and for most boards that should be the case as well. Once connected run following command:
Additionally the logfile.txt contains a memory dump, which can be shared along with elf file. And devs can then just start up gdb using following command, and do all the analysis that needs done.
If a fault happens the information gets recorded in flash sector defined in hwdef define HAL_CRASH_DUMP_FLASHPAGE xx .
Only one crash will be recorded per flash cycle. At every new firmware update the flash will be ready again to record the crash log. Maybe we can erase the crash flash page via a parameter or maybe right after we fetch the crash_dump.bin.
To fetch the crash dump @SYS/crash_dump.bin can be fetched via MAVFTP.
Once fetched one can either use the following command to immediately dump backtrace with locals: