VisualGDB and toolchain directory structure

pdppdp
Posts: 4
Joined: Tue Nov 19, 2024 3:58 am

VisualGDB and toolchain directory structure

Postby pdppdp » Sat Nov 30, 2024 12:10 pm

I am trying to use VisualGDB with an ESP32C3 thru the built-in JTAG, having what I am told are toolchain issues. Hoping for some answers.

(after deleting everything) I installed the current ArduinoIDE, and board packages for ESP32 from Arduino and Espressif.

VisualGDB will compile and upload to the C3, i.e. it finds the compilers/linkers/uploaders for ESP32 devices in the Arduino packages tree.

When trying to debug, VisualGDB pops an error that works out to be it isn't finding the GDB executable. It is not found because VisualGDB is looking in the same bin directory the compiler/linker is in.

I have installed the ArduinoIDE, Essprecif-IDF, Vscode/platofrmIO. In the resulting toolchains for all of them, the compiler executables and the debugger executables are in different directories.

Ironically, VisualGDB installs an ESP32 toolchain (binary identical with the one installed for IDF), which has its compilers and debuggers in separate directories (their Arduino-Projects do not use it, they use the one installed by ArduinoIDE). I have pointed this out on the VisualGDB forum, I am still getting "not our problem".

I can't find an example of an ESP32 toolchain with the compilers&debuggers in the same directory. It is hard to believe that the toolchain structure provided by Esspresif is "wrong".

In trying to resolve this on the VisualGDB forum, I am told:
1) "Arduino package vendors sometimes forget to ship required libraries with their packages, leading to this type of error."
2) "This is something for you to figure out. The Arduino package structure is not specific to VisualGDB and it’s not up to VisualGDB to fix it. You can ask on the ESP32 forum – there are likely others that encountered the same problem."

(VisualGDB forum thread here: https://sysprogs.com/w/forums/topic/debugging-failed-3/ )

That seems, well, incorrect. But, here I am, asking anyway...

Any useful information would be greatly appreciated.

lbernstone
Posts: 857
Joined: Mon Jul 22, 2019 3:20 pm

Re: VisualGDB and toolchain directory structure

Postby lbernstone » Sat Dec 07, 2024 11:18 pm

Have you tried symlinking the gdb executable from the gdb folder to the main toolchain bin dir?
I don't think this is the correct route in any case. Current methodology for jtag debugging on esp32 is to use openocd. I don't know anything about your IDE, but it should be possible to write a script that will launch openocd (which is included in the arduino-esp32 tools). If you look through platform.txt, it should give you an idea about how to configure openocd for your device.

Who is online

Users browsing this forum: Baidu [Spider] and 58 guests