successful build and flash of esp32-c6-devkitc-1

I managed to order three of the ESP32-C6-DevKitC-1 developer boards from the Espressif store on Amazon. They’ve been advertised since mid-2022, and where-ever I went to try to buy them, they were advertised as out of stock. Finally I stumbled onto them on Amazon, and grabbed three examples. They arrived at my home earlier this week. They had to wait until today before I could sit down and begin to work with them.

These are not supported in any existing release of Espressif’s ESP-IDF. I had to clone from the master, or trunk, of their GitHub repo. This is what I used to perform that clone:

git clone --recursive https://github.com/espressif/esp-idf.git esp-idf-main

Once cloned I installed the ESP-IDF software and enabled the development environment I then moved into my wifi-scan folder that I’d migrated to ESP-IDF V5, and ran the following:

idf.py --preview set-target esp32c6

You have to run --preview for everything to be properly set up for the build. After that you can run a regular idf.py build, followed by the flash and monitor commands. You will need to do this before the boards will work. Out-of-the-box the boards, when powered up via USB-C, will immediately go into an endless boot loop because they’re flashed with the wrong code.

Here’s a small portion of what I saw on successful boot after a successful flash.

...ESP-ROM:esp32c6-20220919Build:Sep 19 2022rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)SPIWP:0xeemode:DIO, clock div:2load:0x4086c510,len:0xd3cload:0x4086e610,len:0x2a64load:0x40875720,len:0x1790entry 0x4086c510I (23) boot: ESP-IDF v5.1-dev-3462-g045163a2ec 2nd stage bootloaderI (24) boot: compile time Feb 17 2023 13:48:04I (24) boot: chip revision: v0.0I (28) boot.esp32c6: SPI Speed  : 40MHzI (33) boot.esp32c6: SPI Mode   : DIOI (38) boot.esp32c6: SPI Flash Size : 2MBI (42) boot: Enabling RNG early entropy source...W (48) bootloader_random: bootloader_random_enable() has not been implemented yet...

Here’s some interpretation of those output lines. Line 2 shows that it’s an ESP32-C6 due to the boot ROM on the chip. Line 11 says it was built with ESP-IDF v5.1-dev. I cloned that specific tag, but it won’t support ESP32-C6. You have to use master. I found that a little concerning as the README says that ESP-IDF v5.1, when it’s formally released, is supposed to support the ESP32-C6 device. Oh well.

Everything else seems to be behaving normally, especially support for C++20 in the tool chain. This chip is also supposed to support Zigbee, but I haven’t researched that bit yet. Another goody to check out later.