Hi Max,
Thank you so much for all your great effort. I am able to get the same result as you do. GDB can run from the command line. Now, I go back to VS Code and run the debugger within VS Code. Those old errors do not appear anymore. I am getting closer now.
Now, GDB can go further. It stopped when it failed to find my ESP debugger board (/tty/USB1 or /tty/USB2) with a different type of errors.
Checking size .pio/build/esp32dev/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 4.7% (used 15436 bytes from 327680 bytes)
Flash: [== ] 16.5% (used 216777 bytes from 1310720 bytes)
========================= [SUCCESS] Took 3.03 seconds =========================
Reading symbols from /home/michael/Documents/PlatformIO/Projects/Serial_Monitor_test/.pio/build/esp32dev/firmware.elf...
done.
PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : tcl server disabled
Info : telnet server disabled
**Error: libusb_open() failed with LIBUSB_ERROR_ACCESS**
**Error: no device found**
**Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'**
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
.pioinit:11: Error in sourced command file:
My platform.ini file:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
monitor_speed = 9600
debug_tool = esp-prog
debug_init_break = tbreak setup
===========================================================================
Here is the log for installing the library per your instructions.
michael@michael-Inspiron-5551:/usr/lib/x86_64-linux-gnu$ ls *.5*
libasan.so.5 libgs.so.9.50 libply.so.5.0.0
libasan.so.5.0.0 libhogweed.so.5 libply-splash-core.so.5
libatasmart.so.4.0.5 libhogweed.so.5.0 libply-splash-core.so.5.0.0
libavahi-common.so.3.5.3 libhx509.so.5 libply-splash-graphics.so.5
libcanberra.so.0.2.5 libhx509.so.5.0.0 libply-splash-graphics.so.5.0.0
libcmis-0.5.so.5 libibus-1.0.so.5 libpsl.so.5
libcmis-0.5.so.5.0.0 libibus-1.0.so.5.0.522 libpsl.so.5.3.2
libcmis-c-0.5.so.5 libjavascriptcoregtk-4.0.so.18.16.5 libpulse-mainloop-glib.so.0.0.5
libcmis-c-0.5.so.5.0.0 libkmod.so.2.3.5 libqmi-glib.so.5
libcolordprivate.so.2.0.5 liblzma.so.5 libqmi-glib.so.5.6.0
libcolord.so.2.0.5 liblzma.so.5.2.4 libsensors.so.5
libcolorhug.so.2.0.5 libmm-glib.so.0.5.0 libsensors.so.5.0.0
libcryptsetup.so.12.5.0 libnautilus-extension.so.1.5.0 libsmbclient.so.0.5.0
libdaemon.so.0.5.0 libnewt.so.0.52 libspeexdsp.so.1.5.0
libdatrie.so.1.3.5 libnewt.so.0.52.21 libspeex.so.1.5.0
libfftw3f_omp.so.3.5.8 libperl.so.5.30 libsuitesparseconfig.so.5
libfftw3f.so.3.5.8 libperl.so.5.30.0 libsuitesparseconfig.so.5.7.1
libfftw3f_threads.so.3.5.8 libpipeline.so.1.5.2 libteamdctl.so.0.1.5
libgcrypt.so.20.2.5 libply-boot-client.so.5 libtiff.so.5
libgdata.so.22.5.1 libply-boot-client.so.5.0.0 libtiff.so.5.5.0
libgd.so.3.0.5 libply.so.5 libxatracker.so.2.5.0
michael@michael-Inspiron-5551:/usr/lib/x86_64-linux-gnu$ ls *.6*
libapparmor.so.1.6.1 libicuio.so.66 libSM.so.6
libapt-pkg.so.6.0 libicuio.so.66.1 libSM.so.6.0.1
libapt-pkg.so.6.0.0 libicutest.so.66 libspeechd.so.2.6.0
libatkmm-1.6.so.1 libicutest.so.66.1 libsqlite3.so.0.8.6
libatkmm-1.6.so.1.1.0 libicutu.so.66 libstdc++.so.6
libcamel-1.2.so.62 libicutu.so.66.1 libstdc++.so.6.0.28
libcamel-1.2.so.62.0.0 libicuuc.so.66 libtasn1.so.6
libcbor.so.0.6 libicuuc.so.66.1 libtasn1.so.6.6.0
libcbor.so.0.6.0 libidn2.so.0.3.6 libtic.so.6
libcdr-0.1.so.1.0.6 libidn.so.11.6.16 libtic.so.6.2
libcolamd.so.2.9.6 libimobiledevice.so.6 libtinfo.so.6
libc.so.6 libimobiledevice.so.6.0.0 libtinfo.so.6.2
libcurl-gnutls.so.4.6.0 libkpathsea.so.6 libuchardet.so.0.0.6
libcurl.so.4.6.0 libkpathsea.so.6.3.1 libudev.so.1.6.17
libdjvulibre.so.21.6.0 libksba.so.8.11.6 libusbmuxd.so.6
libedit.so.2.0.63 liblirc_client.so.0.6.0 libusbmuxd.so.6.0.0
libexpat.so.1.6.11 libmenu.so.6 libvpx.so.6
libexpatw.so.1.6.11 libmenu.so.6.2 libvpx.so.6.2
libform.so.6 libmenuw.so.6 libvpx.so.6.2.0
libform.so.6.2 libmenuw.so.6.2 libvte-2.91.so.0.6000.1
libformw.so.6 libmozjs-68.so.68 libwacom.so.2.6.1
libformw.so.6.2 libmozjs-68.so.68.6.0 libwebp.so.6
libfreetype.so.6 libmpfr.so.6 libwebp.so.6.0.2
libfreetype.so.6.17.1 libmpfr.so.6.0.2 libwrap.so.0.7.6
libgdbm.so.6 libm.so.6 libX11.so.6
libgdbm.so.6.0.0 libncurses.so.6 libX11.so.6.3.0
libgee-0.8.so.2.6.1 libncurses.so.6.2 libXau.so.6
libgio-2.0.so.0.6400.2 libncursesw.so.6 libXau.so.6.0.0
libglib-2.0.so.0.6400.2 libncursesw.so.6.2 libXdmcp.so.6
libgmodule-2.0.so.0.6400.2 libpanel.so.6 libXdmcp.so.6.0.0
libgobject-2.0.so.0.6400.2 libpanel.so.6.2 libXext.so.6
libgpgmepp.so.6 libpanelw.so.6 libXext.so.6.4.0
libgpgmepp.so.6.10.0 libpanelw.so.6.2 libXi.so.6
libgphoto2.so.6 libpci.so.3.6.4 libXi.so.6.1.0
libgphoto2.so.6.1.0 libqmi-glib.so.5.6.0 libXmu.so.6
libgthread-2.0.so.0.6400.2 librygel-core-2.6.so.2 libXmu.so.6.2.0
libhpmud.so.0.0.6 librygel-core-2.6.so.2.0.4 libXt.so.6
libICE.so.6 librygel-db-2.6.so.2 libXt.so.6.0.0
libICE.so.6.3.0 librygel-db-2.6.so.2.0.4 libXtst.so.6
libicudata.so.66 librygel-renderer-2.6.so.2 libXtst.so.6.1.0
libicudata.so.66.1 librygel-renderer-2.6.so.2.0.4 libyaml-0.so.2.0.6
libicui18n.so.66 librygel-server-2.6.so.2
libicui18n.so.66.1 librygel-server-2.6.so.2.0.4
rygel-2.6:
engines plugins
michael@michael-Inspiron-5551:/usr/lib/x86_64-linux-gnu$ ldd ~/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gdb
linux-vdso.so.1 (0x00007ffec31fe000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb674584000)
libncurses.so.5 => not found
libtinfo.so.5 => not found
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb674435000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb674412000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fb67440d000)
libpython2.7.so.1.0 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb674219000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb67459d000)
michael@michael-Inspiron-5551:/usr/lib/x86_64-linux-gnu$ sudo apt install libncurses5 libtinfo5 libncursesw5 python2.7 libpython2.7
[sudo] password for michael:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python2.7 is already the newest version (2.7.18~rc1-2).
python2.7 set to manually installed.
The following packages were automatically installed and are no longer required:
linux-headers-5.4.0-26 linux-headers-5.4.0-26-generic linux-image-5.4.0-26-generic
linux-modules-5.4.0-26-generic linux-modules-extra-5.4.0-26-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
libncurses5 libncursesw5 libpython2.7 libtinfo5
0 upgraded, 4 newly installed, 0 to remove and 68 not upgraded.
Need to get 1,334 kB of archives.
After this operation, 4,746 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libtinfo5 amd64 6.2-0ubuntu2 [83.0 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libncurses5 amd64 6.2-0ubuntu2 [96.9 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libncursesw5 amd64 6.2-0ubuntu2 [119 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libpython2.7 amd64 2.7.18~rc1-2 [1,036 kB]
Fetched 1,334 kB in 1s (1,449 kB/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database ... 223266 files and directories currently installed.)
Preparing to unpack .../libtinfo5_6.2-0ubuntu2_amd64.deb ...
Unpacking libtinfo5:amd64 (6.2-0ubuntu2) ...
Selecting previously unselected package libncurses5:amd64.
Preparing to unpack .../libncurses5_6.2-0ubuntu2_amd64.deb ...
Unpacking libncurses5:amd64 (6.2-0ubuntu2) ...
Selecting previously unselected package libncursesw5:amd64.
Preparing to unpack .../libncursesw5_6.2-0ubuntu2_amd64.deb ...
Unpacking libncursesw5:amd64 (6.2-0ubuntu2) ...
Selecting previously unselected package libpython2.7:amd64.
Preparing to unpack .../libpython2.7_2.7.18~rc1-2_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.18~rc1-2) ...
Setting up libpython2.7:amd64 (2.7.18~rc1-2) ...
Setting up libtinfo5:amd64 (6.2-0ubuntu2) ...
Setting up libncurses5:amd64 (6.2-0ubuntu2) ...
Setting up libncursesw5:amd64 (6.2-0ubuntu2) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
michael@michael-Inspiron-5551:/usr/lib/x86_64-linux-gnu$ ldd ~/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gdb
linux-vdso.so.1 (0x00007ffcc8967000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f006fa89000)
libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007f006fa63000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f006fa35000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f006f8e6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f006f8c3000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f006f8be000)
libpython2.7.so.1.0 => /lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007f006f550000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f006f35e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f006faa2000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f006f342000)
michael@michael-Inspiron-5551:/usr/lib/x86_64-linux-gnu$ cd ~/.platformio/packages/toolchain-xtensa32/bin
michael@michael-Inspiron-5551:~/.platformio/packages/toolchain-xtensa32/bin$ ls
xtensa-esp32-elf-addr2line xtensa-esp32-elf-gcc xtensa-esp32-elf-ld.bfd
xtensa-esp32-elf-ar xtensa-esp32-elf-gcc-5.2.0 xtensa-esp32-elf-nm
xtensa-esp32-elf-as xtensa-esp32-elf-gcc-ar xtensa-esp32-elf-objcopy
xtensa-esp32-elf-c++ xtensa-esp32-elf-gcc-nm xtensa-esp32-elf-objdump
xtensa-esp32-elf-cc xtensa-esp32-elf-gcc-ranlib xtensa-esp32-elf-ranlib
xtensa-esp32-elf-c++filt xtensa-esp32-elf-gcov xtensa-esp32-elf-readelf
xtensa-esp32-elf-cpp xtensa-esp32-elf-gcov-tool xtensa-esp32-elf-size
xtensa-esp32-elf-ct-ng.config xtensa-esp32-elf-gdb xtensa-esp32-elf-strings
xtensa-esp32-elf-elfedit xtensa-esp32-elf-gprof xtensa-esp32-elf-strip
xtensa-esp32-elf-g++ xtensa-esp32-elf-ld
michael@michael-Inspiron-5551:~/.platformio/packages/toolchain-xtensa32/bin$ ./xtensa-esp32-elf-gdb
GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)