Debug aborts with python error

After some kind of one-man-hackathon, I’ve found a solution or at least a workaround :grin:

Following the instructions from espressif I build my own toolchain:

mkdir ~/esp
cd ~/esp
git clone -b v5.2.2 --recursive https://github.com/espressif/esp-idf.git
cd ~/esp/esp-idf
./install.sh esp32s3

And then I replaced the dysfunctional debugger

cd ~/.platformio/packages/toolchain-xtensa-esp32s3/bin
mv xtensa-esp32s3-elf-gdb xtensa-esp32s3-elf-gdb.orig
cp ~/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin/xtensa-esp32s3-elf-gdb xtensa-esp32s3-elf-gdb
cp ~/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin/xtensa-esp-elf-gdb-no-python .
cp ~/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/lib/xtensa_esp32s3.so ../lib

(the 2 additional files are necessary) - et voilà

Same solution works for an ESP32 (with some minor changes in naming :wink:)

  1. ./install.sh esp32
  2. cd .platformio/packages/toolchain-xtensa-esp32/bin/
  3. mv xtensa-esp32-elf-gdb xtensa-esp32-elf-gdb.orig
  4. cp ~/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin/xtensa-esp32-elf-gdb .
  5. cp ~/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin/xtensa-esp-elf-gdb-no-python .
  6. cp ~/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/lib/xtensa_esp32.so …/lib/
3 Likes