Uploads to feather32 board don't run (but do if uploaded from Arduino IDE)

I’m trying to get platformio up and running. MacOS 12.6.8, VSCode 1.86.2, PlatformIO 6.1.13. For test purposes trying to upload a program to an Adafruit Feather 32 to blink the on-board LED. It works when upload from the Arduino IDE, but not when uploaded by platformio. Compilation and upload are successful, but the program does not run. Searching this issue comes up with some similar topics but no solutions germane to my situation. Any guidance?


platform = espressif32
board = featheresp32
framework = arduino
upload_protocol = esptool
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0


#define ONBOARD_LED  13

void setup() {

void loop() {
  digitalWrite(ONBOARD_LED, HIGH);
  digitalWrite(ONBOARD_LED, LOW);


Processing featheresp32 (platform: espressif32; board: featheresp32; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32.html
PLATFORM: Espressif 32 (6.2.0) > Adafruit ESP32 Feather
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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)
 - framework-arduinoespressif32 @ 3.20008.0 (2.0.8) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - tool-mkfatfs @ 2.0.1 
 - tool-mklittlefs @ 1.203.210628 (2.3) 
 - tool-mkspiffs @ 2.230.0 (2.30) 
 - tool-openocd-esp32 @ 2.1100.20220706 (11.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/featheresp32/firmware.elf
Checking size .pio/build/featheresp32/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   6.7% (used 22076 bytes from 327680 bytes)
Flash: [==        ]  17.6% (used 230521 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, 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 = esptool
Looking for upload port...
Using manually specified: /dev/cu.SLAB_USBtoUART
Uploading .pio/build/featheresp32/firmware.bin
esptool.py v4.5.1
Serial port /dev/cu.SLAB_USBtoUART
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:b5:55:6a:d5:ec
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00048fff...
Compressed 17520 bytes to 12170...
Writing at 0x00001000... (100 %)
Wrote 17520 bytes (12170 compressed) at 0x00001000 in 0.6 seconds (effective 227.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 470.3 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 770.1 kbit/s)...
Hash of data verified.
Compressed 230880 bytes to 128220...
Writing at 0x00010000... (12 %)
Writing at 0x0001ddd1... (25 %)
Writing at 0x0002358d... (37 %)
Writing at 0x00028737... (50 %)
Writing at 0x0002ddb2... (62 %)
Writing at 0x00036310... (75 %)
Writing at 0x0003e51e... (87 %)
Writing at 0x00043b4b... (100 %)
Wrote 230880 bytes (128220 compressed) at 0x00010000 in 3.3 seconds (effective 565.9 kbit/s)...
Hash of data verified.

Hard resetting via RTS pin...
================================================= [SUCCESS] Took 7.51 seconds =================================================

Are there multiple projects in the VS Code Explorer?
If so, you may just be uploading the wrong project.

Nope. Just the one. Still stumped.

Can you show a screenshot of the Arduino IDE’s “Tools” configuration menu with which it works?

Figured it out. This is really dumb. Main had been saved outside the source directory and I didn’t catch that. So it was linking everything but main and successfully uploading an elf that didn’t have my code. Oops. I’m used to using CCS with the benefit of a JTAG emulator and debugger so I felt like I was flying blind and missed the simple solution.

Thanks for the replies.