Hello community,
I’m reaching out for help with a persistent issue I’m facing trying to program a SparkFun Thing Plus - ESP32-C6 board using VS Code and the PlatformIO extension, targeting the Arduino framework.
I’ve been working through the setup and have reached a point where the project builds and uploads successfully (according to the PlatformIO terminal output), but the board does not appear to run the uploaded application code. The built-in LED does not blink, and there is no serial output after pressing the board’s reset button.
Here are the details of my setup and the extensive troubleshooting steps I’ve already taken:
Hardware:
- Board: SparkFun Thing Plus - ESP32-C6
- Computer: MacBook Air
- Connection: USB-C data cable
Software:
- IDE: VS Code (Version 1.100.0 Universal)
- PlatformIO IDE VS Code Extension
- Framework: Arduino (managed via PlatformIO)
- Other relevant extensions installed: C/C++ (Microsoft), Python (Microsoft), Gemini Code Assist (Google)
Summary of Troubleshooting Steps & Issues Encountered:
- Initial attempts with the official VS Code Arduino extension failed (settings/commands not appearing) despite confirming installation. This led to switching to PlatformIO.
- PlatformIO IDE extension installed, but PlatformIO Core installation failed initially.
- Diagnosed a VS Code Network Proxy issue that was blocking downloads. Cleared proxy settings in VS Code.
- PlatformIO Core installation then failed due to missing Git client.
- Installed Git client on macOS using
xcode-select --install
. - PlatformIO project creation/upload attempts failed with
fatal: Remote branch main not found
. Correctedplatformio.ini
to use themaster
branch for the Arduino-ESP32 GitHub URL. - Encountered
Error! Failed to extract upstream toolchainconfigurations
. Addedboard_build.arduino.upstream_packages = no
toplatformio.ini
as suggested by the error message. - Since the standard PlatformIO Espressif 32 platform seemed to have validation issues with C6+Arduino, updated
platform
inplatformio.ini
to point to a community fork known for more recent support:platform = https://github.com/pioarduino/platform-espressif32.git
. - This last step allowed PlatformIO to successfully download toolchains and dependencies and complete the build process without the previous errors. The upload command also reports
[SUCCESS]
.
Current Problem State:
- The project builds and uploads successfully according to the PlatformIO terminal output.
- However, the simple blink sketch (using a hardcoded GPIO pin or
LED_BUILTIN
) does not run on the board after a successful upload and pressing the RST button. The built-in LED does not blink. - Opening the PlatformIO Serial Monitor after upload and pressing RST shows the serial port disconnect/reconnect but no serial output from the board.
My current platformio.ini
file:
[env:esp32-c6-devkitc-1]
platform = https://github.com/pioarduino/platform-espressif32.git
board = esp32-c6-devkitc-1
framework = arduino
monitor_speed = 115200
board_build.arduino.upstream_packages = no
The code I’m trying to upload (simplified blink sketch):
#include <Arduino.h>
const int BLINK_PIN = 8; // Using GPIO8 for testing; also tried LED_BUILTIN
void setup() {
// Serial.begin(115200); // Tested with and without Serial
pinMode(BLINK_PIN, OUTPUT);
}
void loop() {
// Serial.println("Hello from ESP32-C6!"); // Tested with and without Serial
digitalWrite(BLINK_PIN, HIGH);
delay(1000);
digitalWrite(BLINK_PIN, LOW);
delay(1000);
}
(I have also tested the blink with Serial enabled, with the same result - no blinking, no serial output)
Here are the key parts of a recent successful upload log:
esptool.py v4.8.9
Serial port /dev/cu.usbmodem14101
Connecting...
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
USB mode: USB-Serial/JTAG
MAC: 40:4c:ca:ff:fe:4c:78:a0
BASE MAC: 40:4c:ca:4c:78:a0
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00000000 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...
Flash params set to 0x0240
SHA digest in image updated
Compressed 20624 bytes to 13134...
Writing at 0x00000000... (100 %)
Wrote 20624 bytes (13134 compressed) at 0x00000000 in 0.2 seconds (effective 755.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 793.0 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 1054.9 kbit/s)...
Hash of data verified.
Compressed 229840 bytes to 128443...
Writing at 0x00010000... (12 %)
Writing at 0x0001bf00... (25 %)
Writing at 0x000230ee... (37 %)
Writing at 0x000290fa... (50 %)
Writing at 0x0002fabe... (62 %)
Writing at 0x000362c3... (75 %)
Writing at 0x0003c402... (87 %)
Writing at 0x0004259a... (100 %)
Wrote 229840 bytes (128443 compressed) at 0x00010000 in 1.2 seconds (effective 1487.1 kbit/s)...
Hash of data verified.
Hard resetting via RTS pin...
=================================================== [SUCCESS] Took 10.42 seconds ===================================================
I manually put the board into bootloader mode (Hold BOOT, press/release RST, release BOOT) before clicking upload, and then pressed RST again after the upload finished.
Is there a known issue with the ESP32-C6 and the Arduino framework in PlatformIO that could cause this? Is there a specific, known working platformio.ini
configuration, a particular platform/framework version, or a different set of steps required for this board to run code? Could this indicate a hardware issue?
Any guidance or suggestions from the community would be incredibly valuable. Thank you for your time and help!
W