ESP32 core dump in flash

JanJansen47
Posts: 27
Joined: Sun Jan 01, 2017 9:21 pm

ESP32 core dump in flash

Postby JanJansen47 » Sat Sep 02, 2017 9:42 am

In my application I get infrequent errors due to input from mqtt messages. I have two similar esp32 setups running which show the error at the same time. As it can take several days before an error occurs I try to catch it in flash to find the origin.

Have an issue using the core dump in flash.

My make menuconfig settings are:
Core dump destination (Flash)
Panic handler behaviour ( print registers and halt)


My partition table is:

# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,16K,
otadata,data,ota,0xd000,8K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
ota_0,app,ota_0,0x110000,800K,
ota_1,app,ota_1,0x1e0000,800K,
coredump,data,coredump,0x2a8000,64K,

From this input, based on readthedocs I made following command:
jan@jan-jul-17:~$ python $IDF_PATH/components/espcoredump/espcoredump.py info_corefile -t b64 -o 2785280 -s /home/jan/Desktop/coredump -m build/app-template.elf

the offset is the "int" for 0x2a8000

Output of the command (after an error) is:
espcoredump.py v0.1-dev
esptool.py v2.0.1
Connecting........_
Chip is ESP32D0WDQ6 (revision 0)
Uploading stub...
Running stub...
Stub running...
16 (100 %)
16 (100 %)
Read 16 bytes at 0x2a8000 in 0.0 seconds (12.8 kbit/s)...
Hard resetting...
A fatal error occurred: Invalid start magic number!

Please advise.
Jan Jansen
Amsterdam
The Netherlands

Logrono
Posts: 1
Joined: Sat Sep 09, 2017 1:16 pm

Re: ESP32 core dump in flash

Postby Logrono » Sat Sep 09, 2017 1:23 pm

I start with the example from kolban and that works. But with flash no. :shock:

ESP_Alexey
Posts: 24
Joined: Fri Dec 02, 2016 8:55 pm

Re: ESP32 core dump in flash

Postby ESP_Alexey » Sun Sep 10, 2017 3:43 pm

Hi Jan,

I checked BLINK example supplied with IDF (with extra code to generate core dump) using your partiotions configuration. I do not see problems at my side.
I used WROVER kit for tests. Please, answer the following questions:
1) What ESP32 kit/module do you use?
2) What flash size available?
3) What IDF version do you use?
4) Could you explain how you use core dump to debug your problem? Are you sure that nobody else writes to core dump partition?

Regards
Alexey

ESP_Alexey
Posts: 24
Joined: Fri Dec 02, 2016 8:55 pm

Re: ESP32 core dump in flash

Postby ESP_Alexey » Sun Sep 10, 2017 3:47 pm

BTW. You do not need '-t b64' option in case of getting core dump from flash.

Who is online

Users browsing this forum: No registered users and 183 guests