I recently upgraded PlatformIO to version 4.4.0a7. I have a custom PCB that is using a ESP32-D2WD chip. I am programming this device via JTAG using the ESP-PROG board.
Before upgrading I was able to program my board this way with no issue (I unfortunately did not mark down the version of platformIO I was running before the upgrade), but now I am unable to. I’ve tried all the solutions I’ve been able to find on the forums (everything from checking my settings.json file, changing upload_rates, and ensuring that there is no spaces in my build path) with no luck.
My current platformIO.ini file is:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = espidf
monitor_speed = 115200
debug_tool = esp-prog
upload_protocol = esp-prog
upload_speed = 9600
upload_port = COM[45]
build_flags =
-DCORE_DEBUG_LEVEL=0
board_build.embed_txtfiles =
src/hddr.html
The output of running upload in verbose mode is:
Terminal will be reused by tasks, press any key to close it.
> Executing task: C:\Users\dylan.mcguire\.platformio\penv\Scripts\platformio.exe run --verbose --target upload <
Processing esp32dev (platform: espressif32; board: esp32dev; framework: espidf; monitor_speed: 115200; debug_tool: esp-prog; upload_protocol: esp-prog; upload_speed: 9600; upload_port: COM[45]; build_flags: -DCORE_DEBUG_LEVEL=0; board_build.embed_txtfiles:
src/hddr.html)
--------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 1.12.4 > Espressif ESP32 Dev Module
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-espidf 3.40001.200521 (4.0.1)
- tool-cmake 3.16.4
- tool-esptoolpy 1.20600.0 (2.6.0)
- tool-idf 1.0.1
- tool-mconf 1.4060000.20190628 (406.0.0)
- tool-mkspiffs 2.230.0 (2.30)
- tool-ninja 1.9.0
- tool-openocd-esp32 1.1000.20190708 (10.0)
- toolchain-esp32ulp 1.22851.190618 (2.28.51)
- toolchain-xtensa32 2.80200.200226 (8.2.0)
Reading CMake configuration...
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
<lambda>(["checkprogsize"], [".pio\build\esp32dev\firmware.elf"])
MethodWrapper(["checkprogsize"], [".pio\build\esp32dev\firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 28.8% (used 94408 bytes from 327680 bytes)
Flash: [======== ] 76.9% (used 806234 bytes from 1048576 bytes)
.pio\build\esp32dev\firmware.elf :
section size addr
.rtc.text 0 1074528256
.rtc.dummy 0 1073217536
.rtc.force_fast 0 1073217536
.rtc_noinit 0 1342177280
.rtc.force_slow 0 1342177280
.iram0.vectors 1024 1074266112
.iram0.text 94269 1074267136
.dram0.data 68960 1073414144
.noinit 0 1073483104
.dram0.bss 25448 1073483104
.flash.rodata 124676 1061158944
.flash.text 517305 1074593816
.debug_frame 87912 0
.debug_info 3096463 0
.debug_abbrev 258819 0
.debug_loc 703478 0
.debug_aranges 34024 0
.debug_ranges 39416 0
.debug_line 1639246 0
.debug_str 269434 0
.comment 217 0
.xtensa.info 56 0
.xt.prop._ZTISt9exception 12 0
.xt.prop._ZTISt9bad_alloc 12 0
.xt.prop._ZTVN10__cxxabiv117__class_type_infoE 12 0
.xt.prop._ZTVN10__cxxabiv120__si_class_type_infoE 12 0
Total 6960795
<lambda>(["upload"], [".pio\build\esp32dev\firmware.bin"])
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esp-prog
openocd -d2 -s C:/Users/dylan.mcguire/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg -c "program_esp32 {{.pio\build\esp32dev\firmware.bin}} 0x10000 verify" -c "program_esp32 {{C:\Users\dylan.mcguire\Desktop\mHDDR-ESP32v4\mHDDR-ESP32v4\.pio\build\esp32dev/bootloader.bin}} 0x1000 verify" -c "program_esp32 {{C:\Users\dylan.mcguire\Desktop\mHDDR-ESP32v4\mHDDR-ESP32v4\.pio\build\esp32dev/partitions.bin}} 0x8000 verify" -c "reset run; shutdown"
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
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 : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Listening on port 3333 for gdb connections
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 : Target halted. PRO_CPU: PC=0x4000AE2F (active) APP_CPU: PC=0x00000000
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 121 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 505 KB
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
Info : Auto-detected flash size 2048 KB
Info : Using flash size 2048 KB
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
wrote 806912 bytes from file .pio\build\esp32dev\firmware.bin in 5.046980s (156.133 KiB/s)
** Programming Finished **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
read 806352 bytes from file .pio\build\esp32dev\firmware.bin and flash bank 0 at offset 0x00010000 in 2.947397s (267.169 KiB/s)
contents match
** Verified OK **
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: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
wrote 28672 bytes from file C:\Users\dylan.mcguire\Desktop\mHDDR-ESP32v4\mHDDR-ESP32v4\.pio\build\esp32dev/bootloader.bin in 0.894635s (31.298 KiB/s)
** Programming Finished **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
read 25552 bytes from file C:\Users\dylan.mcguire\Desktop\mHDDR-ESP32v4\mHDDR-ESP32v4\.pio\build\esp32dev/bootloader.bin and flash bank 0 at offset 0x00001000 in 0.335586s (74.357 KiB/s)
contents match
** Verified OK **
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: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
wrote 4096 bytes from file C:\Users\dylan.mcguire\Desktop\mHDDR-ESP32v4\mHDDR-ESP32v4\.pio\build\esp32dev/partitions.bin in 0.562370s (7.113 KiB/s)
** Programming Finished **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x40000400
read 3072 bytes from file C:\Users\dylan.mcguire\Desktop\mHDDR-ESP32v4\mHDDR-ESP32v4\.pio\build\esp32dev/partitions.bin and flash bank 0 at offset 0x00008000 in 0.261884s (11.455 KiB/s)
contents match
** Verified OK **
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: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
shutdown command invoked
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()
========================================================== [SUCCESS] Took 23.40 seconds ==========================================================
Terminal will be reused by tasks, press any key to close it.
I have always received the three warnings about free_driver_priv() even when I uploaded the code and it ran successfully.
Thank you in advance for any/all help!