I started work with PlatformIO again this afternoon and while Upload and Monitor is working the first time I tried to start debugging it failed like above.
I added the line “debug_speed = 500” to platformIO.ini, but this did not resolve the issue.
Running the simple sketch with the Arduino IDE did not resolve the issue this time, that must have been a coincidence.
Here is the debug log I see:
Processing esp32cam (platform: espressif32; board: esp32cam; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 (4.3.0) > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (cmsis-dap, 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.20003.0 (2.0.3)
- tool-esptoolpy @ 1.30300.0 (3.3.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Converting Blink.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Compiling .pio\build\esp32cam\src\Blink.ino.cpp.o
Generating partitions .pio\build\esp32cam\partitions.bin
Archiving .pio\build\esp32cam\libFrameworkArduinoVariant.a
Indexing .pio\build\esp32cam\libFrameworkArduinoVariant.a
Compiling .pio\build\esp32cam\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\HWCDC.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\Print.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\USB.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\USBCDC.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\USBMSC.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\WString.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\base64.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-i2c-slave.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-tinyusb.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\firmware_msc_fat.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\main.cpp.o
Compiling .pio\build\esp32cam\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\esp32cam\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\esp32cam\libFrameworkArduino.a
Indexing .pio\build\esp32cam\libFrameworkArduino.a
Linking .pio\build\esp32cam\firmware.elf
Retrieving maximum program size .pio\build\esp32cam\firmware.elf
Checking size .pio\build\esp32cam\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.0% (used 16472 bytes from 327680 bytes)
Flash: [= ] 7.9% (used 249333 bytes from 3145728 bytes)
Building .pio\build\esp32cam\firmware.bin
esptool.py v3.3
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
========================= [SUCCESS] Took 10.99 seconds =========================
undefinedC:\Users\sidpr\.platformio\packages\toolchain-xtensa-esp32@8.4.0+2021r2-patch3\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from d:\DataRoot\Projects\Espressif\Word-Blink-esp32cam\.pio\build\esp32cam\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20220411 (2022-04-11-08:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
DEPRECATED! use 'adapter speed' not 'adapter_khz'
adapter speed: 500 kHz
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 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 : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x400EDF4E, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400EDF4E, debug_reason=00000000
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967290)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967290)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967290)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x400edf4e in ?? ()
Error: Too large number of threads 4294967295!
Loading section .flash.appdesc, size 0x100 lma 0x3f400020
Warn : address 0x3f400020 not writable
Loading section .flash.rodata, size 0xce54 lma 0x3f400120
Warn : address 0x3f400120 not writable
.pioinit:12: Error in sourced command file:
Load failed
.pioinit:12: Error in sourced command file:
Load failed