Hi, I try to use PIO under VS-Code and first I try my board on Arduino IDE. The Board ESP32-C6-Zero I’m using is not on the board list (in Arduino) then I use ESP32-C6 Dev Module, and I success to run RGB Blink prog.
Now I use VS-Code and PIO, I’m not able to find equivalent to ESP32-C6 Dev Module under PIO, I’ve found esp32-c6-devkitc-1 and esp32-c6-devkitm-1 but not working with my board. I try tu use this setup on inifile :
Ok thanks Boris, it seems too much complicated to me to use this!
How can I use directly the ESPIDF Framework under PIO?
BTW, how to create my one ESP32-C6-Zero json board file ? Is there somewhere a document explain how to create one?
Misunderstanding! It is much more than just creating a board manifest!
Arduino 2.x is based on ESP-IDF 4.x which does not support ESP32-C6.
So if you want to use Arduino you have to use Arduino 3.x which is based on ESP-IDF-5.x
Misunderstanding! Yes, of course … At the beginning I have 3 types of boards for a small project, an Arduino ESP32, the ESP32-C3-Zero and ESP32-C6-Zero. To blink the onboard LED with Arduino IDE it’s easy, but for my project, I need to use the BLE and Midi, I dismissed Arduino ESP32 too big for this project (I need only few I/O) and try to use C3 or C6 and it seems Arduino IDE is not ideal for that. Following some recommendations by people I’ve decide to move on VS-Code & PIO. But it looks C3 and C6 are not really supported by PIO or you need to use “similar” boards … My observation is I’m not able to got a blink the on board LED with … or so much complicated for me.
#include <FastLED.h>
#define NUM_LEDS 1
#define DATA_PIN 8
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup()
{
FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); // GRB ordering is typical
}
void loop()
{
// Turn the LED on, then pause
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}
Thanks Boris, I try to adapt the working example from Arduino IDE to VS-Code/PIO without succes for C6.For your information rgbLedWrite requiere FastLED library and not work.
I have to disagree. rgbLedWrite() is a built-in function of the Arduino 3.x core and does not require an external library. So something else must be wrong.
C:/Users/vince/.platformio/packages/toolchain-riscv32-esp@13.2.0+20240530/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: .pio/build/esp32-c6-devkitm-1/libFrameworkArduino.a(main.cpp.o): in function `loopTask(void*)':
C:/Users/vince/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:55:(.text._Z8loopTaskPv+0x22): undefined reference to `setup()'
C:/Users/vince/.platformio/packages/toolchain-riscv32-esp@13.2.0+20240530/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: C:/Users/vince/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:64:(.text._Z8loopTaskPv+0x4a): undefined reference to `loop()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32-c6-devkitm-1\firmware.elf] Error 1
=============================== [FAILED] Took 13.36 seconds ========
Ok thanks Boris for your help! Do I need really the pioarduino add on ? my next investigation are to use the BLE and Midi (I was not able to work on it with Arduino IDE) …