Platformio build problem

Hello - I’m learning to build executable code for my XIAO-ESP32C6 processor using PlatformIO and following the guidance offered here: XIAO ESP32C6 with PlatformIO | Seeed Studio Wiki

I’d appreciate any hints for solving my build problem.

Thanks,

Jim

Source code:

#include <Arduino.h>

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

PlatformIO build log:

Executing task in folder blinkXiaoEsp32C6: platformio run 

Processing seeed_xiao_esp32_c6 (platform: https://github.com/Seeed-Studio/platform-seeedboards.git; board: seeed-xiao-esp32-c6; framework: arduino)
-------------------------------------------------------------------------------------------------
esp configure_default_packages
True
True
True
pop toolchain-xtensa-esp-elf
esp configure_default_packages
True
True
True
pop toolchain-xtensa-esp-elf
Verbose mode can be enabled via `-v, --verbose` option
esp configure_default_packages
True
True
True
pop toolchain-xtensa-esp-elf
board id is seeed-xiao-esp32,will call board_build/esp/esp_build.py
franwork_dir =  /home/jcl/.platformio/packages/framework-arduinoespressif32@src-e0f89a6286f1dc9d7e5bc14cb3c0a9e3
CONFIGURATION: https://docs.platformio.org/page/boards/Seeed Studio/seeed-xiao-esp32-c6.html
PLATFORM: Seeed Studio Xiao Series (1.0.0+sha.c3f8d8e) > Seeed Studio XIAO ESP32C6
HARDWARE: ESP32C6 160MHz, 512KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, 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: 
 - esp32-arduino-libs @ 5.1.0+sha.d38afc77db 
 - framework-arduinoespressif32 @ 3.1.1+sha.108a0792 
 - tool-esptoolpy @ 5.1.0 
 - tool-riscv32-esp-elf-gdb @ 14.2.0+20240403 
 - tool-sreccat @ 1.164.0 (1.64) 
 - tool-xtensa-esp-elf-gdb @ 14.2.0+20240403 
 - toolchain-riscv32-esp @ 13.2.0+20240530
board id is seeed-xiao-esp32-c6, will call board_build/esp/esp_build.py
in _embed_files py
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 25 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
in sizedata.py
Compiling .pio/build/seeed_xiao_esp32_c6/FrameworkArduinoVariant/variant.cpp.o
Compiling .pio/build/seeed_xiao_esp32_c6/src/main.cpp.o
Building .pio/build/seeed_xiao_esp32_c6/bootloader.bin
Generating partitions .pio/build/seeed_xiao_esp32_c6/partitions.bin
Compiling .pio/build/seeed_xiao_esp32_c6/FrameworkArduino/ColorFormat.c.o
Traceback (most recent call last):
  File "/home/jcl/.platformio/packages/tool-esptoolpy@src-c789e87e8acca61ff196b2d4ea81dd1a/esptool.py", line 34, in <module>
    import esptool
  File "/home/jcl/.platformio/packages/tool-esptoolpy@src-c789e87e8acca61ff196b2d4ea81dd1a/esptool/__init__.py", line 41, in <module>
    import rich_click as click
ModuleNotFoundError: No module named 'rich_click'
*** [.pio/build/seeed_xiao_esp32_c6/bootloader.bin] Error 1
Compiling .pio/build/seeed_xiao_esp32_c6/FrameworkArduino/Esp.cpp.o
================================== [FAILED] Took 1.64 seconds ==================================

 *  The terminal process "platformio 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Hi there,

Season’s Greetings. :christmas_tree:

SO , can you show you PlatformIO.ini file contents ?
Also have you done a clean build first?

How did you setup your build environment?

HTH
GL :slight_smile: PJ :v:

Hi PJ - Below please find my PlatformIO.ini file. - Cheers - Jim

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:seeed_xiao_esp32_c6]
platform = https://github.com/Seeed-Studio/platform-seeedboards.git
board = seeed-xiao-esp32-c6
framework = arduino

Also, I followed the instructions given here: XIAO ESP32C6 with PlatformIO | Seeed Studio Wiki

As to doing a clean build first, I don’t know what you are referring to. - Jim