Problem downloading core dump from Flash
Posted: Thu Jun 09, 2022 10:33 am
Hi
I am running a ESP32 application in VsCode under Windows 11.
ESP-IDF version is 4.4
My application that crashes every 12 hour or so, give and take.
To be able to debug this I have setup a core dump. My partition table
After a crash I am trying to download data by:
This causes a crash, see below. Why is that. What am I doing wrong.
I am running a ESP32 application in VsCode under Windows 11.
ESP-IDF version is 4.4
My application that crashes every 12 hour or so, give and take.
To be able to debug this I have setup a core dump. My partition table
Code: Select all
nvs, data, nvs, , 0x6000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 2M,
coredump, data, coredump,, 64K
After a crash I am trying to download data by:
Code: Select all
espcoredump.py -p com13 dbg_corefile build/mdcb.elf
Code: Select all
espcoredump.py v0.4-dev
INFO: Invoke parttool to read image.
INFO: esptool.py v3.2-dev
Serial port com13
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.
.
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.
...
Detecting chip type... ESP32
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: fc:f5:c4:6f:55:a8
Uploading stub...
Running stub...
Stub running...
3072 (100 %)
3072 (100 %)
Read 3072 bytes at 0x8000 in 0.3 seconds (81.1 kbit/s)...
Hard resetting via RTS pin...
esptool.py v3.2-dev
Serial port com13
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.
.
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.
......
Detecting chip type... ESP32
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: fc:f5:c4:6f:55:a8
Uploading stub...
Running stub...
Stub running...
65536 (100 %)
65536 (100 %)
Read 65536 bytes at 0x210000 in 5.9 seconds (88.3 kbit/s)...
Hard resetting via RTS pin...
Running C:\Users\lglin\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:\Users\lglin\esp\esp-idf\components\esptool_py\esptool\esptool.py --port com13 read_flash 32768 3072 C:\Users\lglin\AppData\Local\Temp\tmp7gzdjmo1...
Running C:\Users\lglin\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:\Users\lglin\esp\esp-idf\components\esptool_py\esptool\esptool.py --port com13 read_flash 2162688 65536 C:\Users\lglin\AppData\Local\Temp\tmpxnml9znm...
Read partition 'coredump' contents from device at offset 0x210000 to file 'C:\Users\lglin\AppData\Local\Temp\tmpxnml9znm'
Traceback (most recent call last):
File "C:\Users\lglin\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\construct\lib\containers.py", line 100, in __getattr__
return self[name]
KeyError: 'crc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\lglin\esp\esp-idf\components\espcoredump\espcoredump.py", line 352, in <module>
temp_core_files = dbg_corefile()
File "C:\Users\lglin\esp\esp-idf\components\espcoredump\espcoredump.py", line 125, in dbg_corefile
core_elf_path, target, temp_files = get_core_dump_elf(e_machine=exe_elf.e_machine)
File "C:\Users\lglin\esp\esp-idf\components\espcoredump\espcoredump.py", line 75, in get_core_dump_elf
loader.create_corefile(exe_name=args.prog, e_machine=e_machine)
File "C:\Users\lglin\esp\esp-idf\components\espcoredump\corefile\loader.py", line 239, in create_corefile
self._validate_dump_file()
File "C:\Users\lglin\esp\esp-idf\components\espcoredump\corefile\loader.py", line 214, in _validate_dump_file
self._crc_validate()
File "C:\Users\lglin\esp\esp-idf\components\espcoredump\corefile\loader.py", line 223, in _crc_validate
'Invalid core dump CRC %x, should be %x' % (data_crc, self.core_src.crc)) # type: ignore
File "C:\Users\lglin\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\construct\lib\containers.py", line 102, in __getattr__
raise AttributeError(name)
AttributeError: crc