4 Methods for Saving the Crash Context¶
4.1 Saving the Crash Context to FLASH¶
menuconfig configuration
(Top) → RTOS → RT-Thread Components → Utilities → Enable save assert context in flash.
Space allocation (file system)
Configure the space and partition used for crash data storage in the flash_map excel table. To save directly as files, configure SIZE/partition/subdirectory as needed (for reference only; the flash_map excel table is currently supported only by solution projects). You can also create your own file storage.
Configure the space and partition used for crash data storage in the flash_map excel table. You can use a shared buffer method: fill in the partition name of the shared buffer in the partition field, and use the formulas shown below to automatically obtain the address/SIZE/partition type.
Data export
After the terminal crashes, it saves data to the configured location. After rebooting, you can export it with the mobile APPSiFli_BLE. The SiFli APP apk installation package and source code can be downloaded from github:
SiFli APP Demo Release
SiFli_OTA_APP Demo
The steps are as follows:





Data parsing
Parse the exported file with the following tool, and then you can directly use the trace32 tool for crash-site analysis.

For the analysis method, refer to the section:
6.2 Restoring the Hcpu Crash Context with Trace32