coredump.py in esp-idf v4.3 fails to read from file

c.Hicham
Posts: 11
Joined: Fri Dec 13, 2019 9:25 pm

coredump.py in esp-idf v4.3 fails to read from file

Postby c.Hicham » Fri Sep 01, 2023 1:25 pm

Hello all,

I have enabled coredump logging in flash.
I'm using esp-idf v4.3

I'm able to read coredump data from flash

Code: Select all

python espcoredump.py -p COM7 info_corefile  build.elf -r esp32_rom.elf
I can save coredump in file using

Code: Select all

espcoredump.py  -p COM7 info_corefile  build.elf -s codedump_datav2.elf
But If I want to read coredump from file, it somehow tried to access serial port and then fails

Code: Select all

espcoredump.py  info_corefile   -c codedump_datav2.elf  build.elf

it gives me the following error trace

Code: Select all


espcoredump.py v0.4-dev
===============================================================
==================== ESP32 CORE DUMP START ====================
Traceback (most recent call last):
  File "C:\Espressif\frameworks\esp-idf-v4.3\components\espcoredump\espcoredump.py", line 349, in <module>
    temp_core_files = info_corefile()
                      ^^^^^^^^^^^^^^^
  File "C:\Espressif\frameworks\esp-idf-v4.3\components\espcoredump\espcoredump.py", line 165, in info_corefile
    rom_elf_path = get_rom_elf_path(target)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Espressif\frameworks\esp-idf-v4.3\components\espcoredump\espcoredump.py", line 114, in get_rom_elf_path
    target = get_target()
             ^^^^^^^^^^^^
  File "C:\Espressif\frameworks\esp-idf-v4.3\components\espcoredump\espcoredump.py", line 89, in get_target
    inst = esptool.ESPLoader.detect_chip(args.port, args.baud)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Espressif\frameworks\esp-idf-v4.3-2\components\esptool_py\esptool\esptool.py", line 388, in detect_chip
    detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Espressif\frameworks\esp-idf-v4.3-2\components\esptool_py\esptool\esptool.py", line 345, in __init__
    self._port = serial.serial_for_url(port)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Espressif\python_env\idf4.3_py3.11_env\Lib\site-packages\serial\__init__.py", line 90, in serial_for_url
    instance.open()
  File "C:\Espressif\python_env\idf4.3_py3.11_env\Lib\site-packages\serial\serialwin32.py", line 64, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/dev/ttyUSB0': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
Any idea how to fix this issue ?

Who is online

Users browsing this forum: No registered users and 143 guests