espcoredump.py

jojojijijojo
Posts: 18
Joined: Thu Feb 20, 2020 8:18 am

espcoredump.py

Postby jojojijijojo » Sun May 08, 2022 2:10 pm

Hi,

Im trying to use espcoredump.py under macOS to read an exported dump file, the command I use on terminal is:
python3 /Users/user/esp/esp-idf/components/espcoredump/espcoredump.py info_corefile --core CoreDump-coredump.bin --core-format raw project.elf

However Im greeted with the following error message:

Code: Select all

Traceback (most recent call last):
  File "/Users/user/esp/esp-idf/components/espcoredump/espcoredump.py", line 16, in <module>
    from corefile.loader import ESPCoreDumpFileLoader, ESPCoreDumpFlashLoader
  File "/Users/user/esp/esp-idf/components/espcoredump/corefile/loader.py", line 34, in <module>
    PARTTOOL_PY = os.path.join(IDF_PATH, 'components', 'partition_table', 'parttool.py')
  File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Due to my limited knowledge on python and associated stuff, I'm unable to figure out why this is happening.

Im using visual code with ESP IDF extension and everything works fine and compiles, monitor works, erasing and flashing works, but this isn't.

jojojijijojo
Posts: 18
Joined: Thu Feb 20, 2020 8:18 am

Re: espcoredump.py

Postby jojojijijojo » Sun May 08, 2022 3:36 pm

Alright, I somehow got this fixed by resetting the env variable of esp idf, now im getting another issue:

Code: Select all

==================== ESP32 CORE DUMP START ====================
Traceback (most recent call last):
  File "/Users/user/esp/esp-idf/components/espcoredump/espcoredump.py", line 295, in <module>
    info_corefile()
  File "/Users/user/esp/esp-idf/components/espcoredump/espcoredump.py", line 123, in info_corefile
    gdb = EspGDB(args.gdb, [rom_sym_cmd], core_filename, args.prog, timeout_sec=args.gdb_timeout_sec)
  File "/Users/user/esp/esp-idf/components/espcoredump/corefile/gdb.py", line 46, in __init__
    self.p = GdbController(gdb_path=gdb_path, gdb_args=gdb_args)
  File "/usr/local/lib/python3.9/site-packages/pygdbmi/gdbcontroller.py", line 99, in __init__
    raise ValueError(
ValueError: gdb executable could not be resolved from "xtensa-esp32-elf-gdb"
Exception ignored in: <function EspGDB.__del__ at 0x10d4d08b0>
Traceback (most recent call last):
  File "/Users/user/esp/esp-idf/components/espcoredump/corefile/gdb.py", line 56, in __del__
    self.p.exit()
AttributeError: 'EspGDB' object has no attribute 'p'

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: espcoredump.py

Postby ESP_Roland » Mon May 09, 2022 6:45 am

Hi jojojijijojo,

The "/usr/local/lib/python3.9/site-packages" part of the backtrace indicates that you are using "python3" outside of ESP-IDF environment. Please use "python" from the mentioned environment - where you are running "idf.py build" as well. I don't use vscode but I assume this should be set up properly in a terminal inside vscode.

jojojijijojo
Posts: 18
Joined: Thu Feb 20, 2020 8:18 am

Re: espcoredump.py

Postby jojojijijojo » Mon May 09, 2022 8:15 am

Thank you @ESP-Roland, that did the trick.

Who is online

Users browsing this forum: dg9ngf and 108 guests