I read the doc on espcoredump.py, set up my code and partition table to store a coredump to flash and tried that, but it crashes.
Code: Select all
C:\Users\felix\source\beakbox\Firmware\beakbox3>c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Users\felix\espclean\esp-idf\components\espcoredump\espcoredump.py --port COM10 info_corefile C:\Users\felix\source\beakbox\Firmware\beakbox3\build\beakbox3.elf
espcoredump.py v0.4-dev
INFO: Invoke parttool to read image.
Traceback (most recent call last):
File "C:\Users\felix\espclean\esp-idf\components\partition_table\parttool.py", line 365, in <module>
main()
File "C:\Users\felix\espclean\esp-idf\components\partition_table\parttool.py", line 358, in main
op(**common_args)
File "C:\Users\felix\espclean\esp-idf\components\partition_table\parttool.py", line 193, in _read_partition
target.read_partition(partition_id, output)
File "C:\Users\felix\espclean\esp-idf\components\partition_table\parttool.py", line 169, in read_partition
partition = self.get_partition_info(partition_id)
File "C:\Users\felix\espclean\esp-idf\components\partition_table\parttool.py", line 151, in get_partition_info
partition = partition[0]
IndexError: list index out of range
ERROR: parttool script execution failed with err 1
INFO: b'esptool.py v3.3.4-dev\r\nSerial port COM10\r\nConnecting....\r\nDetecting chip type... Unsupported detection protocol, switching and trying again...\r\nConnecting....\r\nDetecting chip type... ESP32\r\nChip is ESP32-D0WD-V3 (revision v3.1)\r\nFeatures: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None\r\nCrystal is 40MHz\r\nMAC: 08:b6:1f:fd:bc:c0\r\nUploading stub...\r\nRunning stub...\r\nStub running...\r\n3072 (100 %)\r\n3072 (100 %)\r\nRead 3072 bytes at 0x8000 in 0.3 seconds (80.4 kbit/s)...\r\nHard resetting via RTS pin...\r\nRunning c:\\Users\\felix\\espclean\\tools\\python_env\\idf4.4_py3.8_env\\Scripts\\python.exe C:\\Users\\felix\\espclean\\esp-idf\\components\\esptool_py\\esptool\\esptool.py --port COM10 read_flash 32768 3072 C:\\Users\\felix\\AppData\\Local\\Temp\\tmp0rhl07ze...\r\n'
ERROR: Error during the subprocess execution
Traceback (most recent call last):
File "C:\Users\felix\espclean\esp-idf\components\espcoredump\espcoredump.py", line 387, in <module>
temp_core_files = info_corefile()
File "C:\Users\felix\espclean\esp-idf\components\espcoredump\espcoredump.py", line 181, in info_corefile
core_elf_path, target, temp_files = get_core_dump_elf(e_machine=exe_elf.e_machine)
File "C:\Users\felix\espclean\esp-idf\components\espcoredump\espcoredump.py", line 66, in get_core_dump_elf
loader = ESPCoreDumpFlashLoader(args.off, args.chip, port=args.port, baud=args.baud)
File "C:\Users\felix\espclean\esp-idf\components\espcoredump\corefile\loader.py", line 449, in __init__
self.target = self._load_core_src()
File "C:\Users\felix\espclean\esp-idf\components\espcoredump\corefile\loader.py", line 164, in _load_core_src
_header = EspCoreDumpV1Header.parse(coredump_bytes) # first we use V1 format to get version
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 288, in parse
return self.parse_stream(io.BytesIO(data), **contextkw)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 300, in parse_stream
return self._parsereport(stream, context, "(parsing)")
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 312, in _parsereport
obj = self._parse(stream, context, path)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 1982, in _parse
subobj = sc._parsereport(stream, context, path)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 312, in _parsereport
obj = self._parse(stream, context, path)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 2440, in _parse
return self.subcon._parsereport(stream, context, path)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 312, in _parsereport
obj = self._parse(stream, context, path)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 1020, in _parse
data = stream_read(stream, self.length, path)
File "c:\Users\felix\espclean\tools\python_env\idf4.4_py3.8_env\lib\site-packages\construct\core.py", line 92, in stream_read
raise StreamError("stream read less than specified amount, expected %d, found %d" % (length, len(data)), path=path)
construct.core.StreamError: Error in path (parsing) -> tot_len
stream read less than specified amount, expected 4, found 0