espcoredump.py/parttool.py

oedipus
Posts: 3
Joined: Mon Apr 18, 2022 9:05 am

espcoredump.py/parttool.py

Postby oedipus » Sun Jun 05, 2022 10:11 am

When I try to run espcoredump.py I get the following output:
  1. espcoredump.py -p /dev/ttyUSB0 info_corefile build/http_server_demo.elf
  2. espcoredump.py v0.4-dev
  3. INFO: Invoke parttool to read image.
  4. /home/vp/.espressif/python_env/idf4.1_py3.8_env/bin/python: can't open file 'parttool.py': [Errno 2] No such file or directory
  5. ERROR: parttool script execution failed with err 2
  6. WARNING: System path is not set. Try to use predefined path.
Traceback:
  1. Traceback (most recent call last):
  2.   File "/home/vp/dev/esp/esp-idf/components/partition_table/parttool.py", line 354, in <module>
  3.     main()
  4.   File "/home/vp/dev/esp/esp-idf/components/partition_table/parttool.py", line 323, in main
  5.     target = ParttoolTarget(**target_args)
  6.   File "/home/vp/dev/esp/esp-idf/components/partition_table/parttool.py", line 112, in __init__
  7.     self._call_esptool(["read_flash", str(partition_table_offset), str(gen.MAX_PARTITION_LENGTH), temp_file.name])
  8.   File "/home/vp/dev/esp/esp-idf/components/partition_table/parttool.py", line 139, in _call_esptool
  9.     raise e
  10.   File "/home/vp/dev/esp/esp-idf/components/partition_table/parttool.py", line 136, in _call_esptool
  11.     subprocess.check_call(esptool_args, stdout=out, stderr=subprocess.STDOUT)
  12.   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
  13.     raise CalledProcessError(retcode, cmd)
  14. subprocess.CalledProcessError: Command '['/home/vp/.espressif/python_env/idf4.1_py3.8_env/bin/python', '/home/vp/dev/esp/esp-idf/components/esptool_py/esptool/esptool.py', '--port', '/dev/ttyUSB0', 'read_flash', '32768', '3072', '/tmp/tmpvkk98l55']' returned non-zero exit status 2.
  15. ERROR: parttool script execution failed with err 1
  16. Traceback (most recent call last):
  17.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1104, in _load_coredump
  18.     f = self.invoke_parttool(tool_path=tool_path)
  19.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1044, in invoke_parttool
  20.     raise e
  21.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1028, in invoke_parttool
  22.     et_out = subprocess.check_output(part_tool_args)
  23.   File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
  24.     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  25.   File "/usr/lib/python3.8/subprocess.py", line 516, in run
  26.     raise CalledProcessError(retcode, process.args,
  27. subprocess.CalledProcessError: Command '['/home/vp/.espressif/python_env/idf4.1_py3.8_env/bin/python', 'parttool.py', '--port', '/dev/ttyUSB0', 'read_partition', '--partition-type', 'data', '--partition-subtype', 'coredump', '--output', '/tmp/tmp3vwiexgo']' returned non-zero exit status 2.
  28.  
  29. During handling of the above exception, another exception occurred:
  30.  
  31. Traceback (most recent call last):
  32.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1771, in <module>
  33.     main()
  34.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1766, in main
  35.     operation_func(args)
  36.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1511, in info_corefile
  37.     loader = ESPCoreDumpFlashLoader(args.off, port=args.port, baud=args.baud)
  38.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 976, in __init__
  39.     self.fcore = self._load_coredump(off)
  40.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1114, in _load_coredump
  41.     f = self.invoke_parttool(tool_path=tool_path)
  42.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1044, in invoke_parttool
  43.     raise e
  44.   File "/home/vp/dev/esp/esp-idf/components/espcoredump/espcoredump.py", line 1028, in invoke_parttool
  45.     et_out = subprocess.check_output(part_tool_args)
  46.   File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
  47.     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  48.   File "/usr/lib/python3.8/subprocess.py", line 516, in run
  49.     raise CalledProcessError(retcode, process.args,
  50. subprocess.CalledProcessError: Command '['/home/vp/.espressif/python_env/idf4.1_py3.8_env/bin/python', '/home/vp/dev/esp/esp-idf/components/partition_table/parttool.py', '--port', '/dev/ttyUSB0', 'read_partition', '--partition-type', 'data', '--partition-subtype', 'coredump', '--output', '/tmp/tmpehz_m6kl']' returned non-zero exit status 1.
What I am doing wrong?

ccrause
Posts: 15
Joined: Wed Feb 27, 2019 7:42 am

Re: espcoredump.py/parttool.py

Postby ccrause » Mon Jun 06, 2022 11:50 am

You can manully execute the parttool command shown on line 50, perhaps this will show a more descriptive error message. As a guess, add a baud rate to your espcoredump command:

Code: Select all

espcoredump.py -p /dev/ttyUSB0 -b 115200 info_corefile build/http_server_demo.elf

Who is online

Users browsing this forum: arunbm123 and 96 guests