First, I am pretty new to…code and embedded programming etc in general, so the potential for overlooking astronomically simple items exists. I am an EE, but controls/industrial was more my background, so think of me from that angle.
I am trying to simply get my ESP-PROG board to debug my ESP32 DevkitV1 that houses the ESP-WROOM32. I should add that I have a W5500 board connected that I’d already verified is working–uploaded and saw ethernet response-- through the ethernet setup code that is what I am attempting to test. I also made sure that none of the pins or connections are crossed over relative to the ethernet setup.
I first downloaded CDM_21228. exe file from FTDI chip. Once I ran that, I connected the two boards. I have the TMS, TCK, TDO,TDI pins from ESP-PROG connected directly to the ESP32 via 14,13,15,12 pins respectively. I also made sure all ground and 3.3V pins are connected and properly selected on the boards from USB to device. If I plug in both boards I see both drivers. I saw it was best to set drivers up with Zadig to make sure it decouples the COM or something correctly, so I downloaded Zadig, and Installed with the Dual RS232-HS Interface (0) selected. I then connected both boards via 2 USB cables to my laptop, per instruction I see at instructables.com/How-to-Use-a-Debugger-on-an-ESP32
I should add that for the PlatformIO setup, I just installed the most recent VSC and setup the PlatformIO per the standard Getting started instructions via PlatformIO info under the Espressif site. I am operating Windows 10, up to date on everything. I ‘think’ that OpenOCD is setup, the documents state it should download with PlatformIO.
When I tried to debug, it seems to compile everything in the main terminal fine, but the debug console shows errors I can’t figure out. I’ve checked the versions on things, and looked at the clock rate and power and it seems it should connect to me. See errors in entire Debug log:
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: platform IO devkitv1 website (I took it out, 2 links only new posters)
PLATFORM: Espressif 32 (2.0.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10004.201016 (1.0.4)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> h tt p://b it.l y/configure -pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Ethernet> 0.0.0-alpha+sha.9f41e8231b
| |-- <SPI> 1.0
|-- <SPI> 1.0
Building in debug mode
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\Dhcp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\Dns.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\Ethernet.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\EthernetClient.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\EthernetServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\EthernetUdp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\socket.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libc4e\Ethernet\utility\w5100.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\libc4e\libEthernet.a
Indexing .pio\build\esp32doit-devkit-v1\libc4e\libEthernet.a
Linking .pio\build\esp32doit-devkit-v1\firmware.elf
Retrieving maximum program size .pio\build\esp32doit-devkit-v1\firmware.elf
Checking size .pio\build\esp32doit-devkit-v1\firmware.elf
Building .pio\build\esp32doit-devkit-v1\firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 4.8% (used 15796 bytes from 327680 bytes)
Flash: [== ] 18.0% (used 235898 bytes from 1310720 bytes)
esptool.py v2.6
========================= [SUCCESS] Took 10.14 seconds =========================
Reading symbols from c:\Users\admin\Documents\PlatformIO\Projects\EWS Ethernet ESP32\.pio\build\esp32doit-devkit-v1\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:04)
Licensed under GNU GPL v2
For bug reports, read
(removed due to limit on links)
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_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : xtensa_poll: Target offline
Error: xtensa_poll: Target failure
Polling target esp32 failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Error: xtensa_poll: Target failure
Polling target esp32 failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 300ms
Info : accepting 'gdb' connection from pipe
Error: No symbols for FreeRTOS
Error: xtensa_poll: Target failure
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Error: error during select: Unknown error
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:
Remote communication error. Target disconnected.: No error.
Here is what I have in the platformio.ini file:
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
lib_deps = Ethernet
debug_tool = esp-prog
debug_init_break = tbreak setup
I left out the main.cpp and header I have as they worked fine before, but I can include that code if needed–I don’t see any errors related to it.
This is for work, so especially since I’m new I greatly appreciate any help, let me know what I can give to assist if I left anything out, and I hope to be a contributing part of the PlatformIO community a lot going forward…lots to learn first.