idf.py gdb fails

esp-dev
Posts: 14
Joined: Mon Jul 04, 2022 5:44 pm

idf.py gdb fails

Postby esp-dev » Thu Oct 06, 2022 3:32 pm

Hello,

I wanted to setup my debug environment in OpenSUSE Tumbleweed, I successfully installed esp-idf and when I ran

Code: Select all

idf.py openocd
I got it listening for the GDB server

Code: Select all

mac@localhost:/mnt/sec-vol/workspace-esp/blink> idf.py openocd
Executing action: openocd
Note: OpenOCD cfg not found (via env variable OPENOCD_COMMANDS nor as a --openocd-commands argument)
OpenOCD arguments default to: "-f board/esp32-wrover-kit-3.3v.cfg"
OpenOCD started as a background task 3744
Executing action: post_debug
Open On-Chip Debugger  v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] Debug controller was reset.
Info : [esp32.cpu0] Core was reset.
Error: Unexpected OCD_ID = 00000000
Error: Unexpected OCD_ID = 00000000
Error: Unexpected OCD_ID = 00000000
Error: Unexpected OCD_ID = 00000000
Warn : target esp32.cpu1 examination failed
Error: Unexpected OCD_ID = 00000000
Error: Unexpected OCD_ID = 00000000
Info : starting gdb server for esp32.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
However when I tried running

Code: Select all

idf.py gdb
I got problem with the python site packages

Code: Select all

mac@localhost:/mnt/sec-vol/workspace-esp/blink> idf.py gdb
Executing action: gdb
ImportError: No module named site
So I checked where the bin is sourcing from, I got

Code: Select all

mac@localhost:/mnt/sec-vol/workspace-esp/blink> which xtensa-esp32-elf-gdb
${HOME}/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb
I would like to understand what causing this issue, anyone came across this situation?

ESP_georgik
Posts: 21
Joined: Fri Nov 06, 2020 8:23 am
Location: Brno
Contact:

Re: idf.py gdb fails

Postby ESP_georgik » Fri Oct 07, 2022 12:17 pm

The problem is caused by missing Python 2 in OpenSUSE Thumbleweed.
There is no Python 2 package for the distribution anymore.

The issue was fixed in ESP-IDF master branch, but was not backported yet to 4.x: https://github.com/espressif/esp-idf/is ... 1261435018
The new solution is using Python 3

Please try to use ESP-IDF from the master branch to run the debugger.
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems

Who is online

Users browsing this forum: No registered users and 186 guests