Am encountering the following error when attempting to debug an AZ_delivery board using an ESP-prog board with a clean install of both MS Code and PlatformIO. Previously, this setup has worked flawlessly but I haven’t done any ESP32 debugging for a while so I can’t confirm the previous libraries used etc.
The main.cpp code compiles fine but the PIO debug fails to start debugging. On switching to the debug console, the following error is present (username obfuscated for security):
undefined/home/----/.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
This behaviour is exhibited with both the DEB release of MS Code and the Flatpak. Ubuntu is currently on Python 3.x and does not support the installation of earlier Python libraries globally.
Thank you both. Unfortunately, until this bug is patched I have had to resort to running MS Code + Platformio in a VM, currently with an earlier version of Ubuntu 22.04. Not ideal as 22.04 still has a few months to go until end of life, fingers crossed they won’t take them out the repository before the bug is squashed!
Thank you arduhe and maxgerhardt. For whatever reason my Code/PIO install hasn’t picked this up for whatever reason despite being upgraded regularly.
Totally agree with the security implications, so I removed the earlier Python version and upgraded Code/PIO. No joy, debug crashes with:
undefined Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
ImportError: No module named site
This despite a clean vanilla install of Code/PIO on Debian 12. Am I missing something here or is the toolchain not automatically updated? AFAIK I do not explicitly declare a specific version for my projects.
Replacing the elderly and obsolete python cures this.