How to detect new coredumps

sorenhl
Posts: 22
Joined: Sun Jun 03, 2018 9:34 pm

How to detect new coredumps

Postby sorenhl » Sat Jun 15, 2019 8:10 pm

Hi,

I have a device in production where I try to track all the crashes through the coredump, which the device is configured to dump to the flash.

What I currently do is the following:
1. Calculating a "magic" number based on all bytes in the coredump flash area to check if any byte did change. If yes, I assume that this is because the area has been written to, thus the device have had a crash.
2. .Transferring all the bytes in the flash area to my server
3. Analyzing the dump with the ESP tool.

So far step 2 and 3 are working really well, however, I am getting some strange dumps where I do not think the application crashes, which led me to think that some bytes are written to the coredump flash area, even through the firmware did not crash.

Do anybody have a better idea how to detect if the device have had a crash? Note that using esp_timer_get_time() is not an option, as the device can be turned on and off.

/Søren

sorenhl
Posts: 22
Joined: Sun Jun 03, 2018 9:34 pm

Re: How to detect new coredumps

Postby sorenhl » Sun Jun 16, 2019 1:18 pm

Found a solution using esp_reset_reason() at boot, which I then use to store something in the flash :)

Who is online

Users browsing this forum: No registered users and 422 guests