How to extract coredump from partition and read it?
Posted: Fri Mar 09, 2018 6:59 pm
Hi all, I've enabled coredumps in menuconfig and added a coredump partition. I can cause a coredump and then use espcoredump.py -p info_corefile to read it and it works fine. But if I extract that same coredump from the partition using esptool to read the flash I get:
espcoredump.py v0.1-dev
Growing up stacks are not supported for now!
Failed to create corefile!
Here's the commands I'm using:
Show Partitions
make partition_table
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
ota_0,app,ota_0,0x10000,1900K,
ota_1,app,ota_1,0x1f0000,1900K,
nvs,data,nvs,0x3cb000,16K,
otadata,data,ota,0x3cf000,8K,
phy_init,data,phy,0x3d1000,8K,
coredump,data,coredump,0x3d3000,64K,
*******************************************************************************
Core Dump With Serial (Works Fine)
~/esp/esp-idf/components/espcoredump/espcoredump.py -p /dev/cu.usbserial-A50285BI info_corefile -o 4009984 build/main.elf
espcoredump.py v0.1-dev
esptool.py v2.2.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
16 (100 %)
16 (100 %)
Read 16 bytes at 0x3d3000 in 0.0 seconds (4.0 kbit/s)...
Hard resetting...
esptool.py v2.2.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
24048 (100 %)
24048 (100 %)
Read 24048 bytes at 0x3d3000 in 2.3 seconds (85.3 kbit/s)...
Hard resetting...
===============================================================
==================== ESP32 CORE DUMP START ====================
Download Core Dump Partition (Works Fine)
python $IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/cu.usbserial-A50285BI --baud 115200 read_flash 4009984 65536 coredump.bin
Core Dump With Downloaded Partition (Fails)
~/esp/esp-idf/components/espcoredump/espcoredump.py info_corefile -t raw -c coredump.bin build/main.elf
espcoredump.py v0.1-dev
Growing up stacks are not supported for now!
Failed to create corefile!
Ultimately, I'm not trying to download from flash to read core dumps. I want to be able to upload them to my server after a reboot. The process is basically the same, and I get the same error.
Thanks,
Jason
espcoredump.py v0.1-dev
Growing up stacks are not supported for now!
Failed to create corefile!
Here's the commands I'm using:
Show Partitions
make partition_table
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
ota_0,app,ota_0,0x10000,1900K,
ota_1,app,ota_1,0x1f0000,1900K,
nvs,data,nvs,0x3cb000,16K,
otadata,data,ota,0x3cf000,8K,
phy_init,data,phy,0x3d1000,8K,
coredump,data,coredump,0x3d3000,64K,
*******************************************************************************
Core Dump With Serial (Works Fine)
~/esp/esp-idf/components/espcoredump/espcoredump.py -p /dev/cu.usbserial-A50285BI info_corefile -o 4009984 build/main.elf
espcoredump.py v0.1-dev
esptool.py v2.2.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
16 (100 %)
16 (100 %)
Read 16 bytes at 0x3d3000 in 0.0 seconds (4.0 kbit/s)...
Hard resetting...
esptool.py v2.2.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
24048 (100 %)
24048 (100 %)
Read 24048 bytes at 0x3d3000 in 2.3 seconds (85.3 kbit/s)...
Hard resetting...
===============================================================
==================== ESP32 CORE DUMP START ====================
Download Core Dump Partition (Works Fine)
python $IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/cu.usbserial-A50285BI --baud 115200 read_flash 4009984 65536 coredump.bin
Core Dump With Downloaded Partition (Fails)
~/esp/esp-idf/components/espcoredump/espcoredump.py info_corefile -t raw -c coredump.bin build/main.elf
espcoredump.py v0.1-dev
Growing up stacks are not supported for now!
Failed to create corefile!
Ultimately, I'm not trying to download from flash to read core dumps. I want to be able to upload them to my server after a reboot. The process is basically the same, and I get the same error.
Thanks,
Jason