Debugging with esp-wrover-kit

2022-06-30T22:00:00Z

Hi everyone. I am starting with debugging on ESP32 and Platformio. on an ubuntu 20.04 machine
Using this hardware
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html
I have build a little test-program.
Bildschirmfoto vom 2022-07-01 14-03-50
with this platformio.ini file
platformio.ini

i can see the serial devices

the device USB1 is used for the terminal and working.

cutecom

But I am not able to debug, getting this error-message.

Any idea, where I can study what I am doing wrong?

br joachim

Try and delete the .vscode folder of the project, then Ctrl+Shift+P → Rebuild Intellisense and wait for it to complete. Does dbeugging start now?

Hi max, sorry the problem remains. …
I will start studying what yuri is telling here…

br joachim

here i found some additional info… during building

but don’t know how I can do this modifications…

brj

Which extensions do you have installed in VSCode?

this ones…

I tried it with a jlink debugger as well. downloading is working well. but the same problem.
I think the attached error message could be a hint…


Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.
Error: The PlatformIO task detection didn’t contribute a task for the following configuration:
{
“type”: “PlatformIO”,
“task”: “Pre-Debug”,
“problemMatcher”: [
“$platformio”
],
“label”: “PlatformIO: Build in debug mode”
}
The task will be ignored.

so i found the solution : one have to install this install Python libraries: apt-get install libpython2.7-dev

This would be extremely baffling. PlatformIO is written for Python3. The xtensa-gdb that may be called later may have a static dependency on some python version, but PlatformIO doesn’t yet get to that stage…

Can you temporarily uninstall libpython2.7-dev again and deactivate the “ESP32 Debug” and Espressif IDF" extensions for the workspace (not global for the moment), do Debugging with esp-wrover-kit - #2 by maxgerhardt, restart VSCode and retry? Those may be interefering.

i have done that before and was the same result.
I uninstalled all other packages …
It didn’t work.
Now I have uninstalled all other packages. removed the libpython2.7-dev stuff.
Made the process #2 as you suggested… Now it is working as well…
brj

a little irritation now-> it says warning: Source file is more recent than executable…

Hi Max, I tried it with a fresh installation of ubuntu 20.04. a new platform io installation.
it says exactly the same:
undefined/home/jwillner1958/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gdb: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

I have done this afterwards:
sudo apt install libncurses5 libtinfo5 libncursesw5 python2.7 libpython2.7

and now it is working fine, even in the ubuntu 20.04 virtual machine on VMware…
brjoachim

1 Like