#author("2026-01-15T10:28:06+09:00;2026-01-14T23:36:49+09:00","","") #author("2026-01-15T11:50:00+09:00;2026-01-14T23:36:49+09:00","","") #notemd # Waveshare ESP32-C6-LCD-1.9 動作確認 ## 開発環境 - RaspberryPI 5 + VSCode + PlatformIO で構築しようとしたが、framework で 使い慣れている arduino が未サポート。 - RaspberryPi 5 + VSCode + PlatformIO で構築しようとしたが、framework で 使い慣れている arduino が未サポート。 (ESP32-S3 はサポートされているが、ESP32-C6 はダメ。なお、本家 Arduino ではサポートされている様子。) - PlatformIO の framework で ESP-IDF がサポートされているが、ここは、"ESP-IDF Extension for VS Code" で構築。 - "Configure ESP-IDF Extension" - "Express" からセットアップ。最新版 ESP-IDF v5.5.2(2026/01/14時点)をインストール。 - idf.py を使用するときは、'$HOME/esp/v5.5.2/esp-idf/export.sh' の実行(環境設定)が必要。 ## flash_idの読み出し #### $ $HOME/.platformio/packages/tool-esptoolpy/esptool.py --port /dev/ttyACM0 flash_id ``` esptool.py v4.5.1 Serial port /dev/ttyACM0 Connecting... Detecting chip type... ESP32-C6 Chip is ESP32-C6 (revision v0.2) Features: WiFi 6, BT 5, IEEE802.15.4 Crystal is 40MHz MAC: a0:85:e3:xx:xx:xx Uploading stub... Running stub... Stub running... Manufacturer: 20 Device: 4017 Detected flash size: 8MB Hard resetting via RTS pin... ``` ## chip_idの読み出し #### $ $HOME/.platformio/packages/tool-esptoolpy/esptool.py --port /dev/ttyACM0 chip_id ``` esptool.py v4.5.1 Serial port /dev/ttyACM0 Connecting... Detecting chip type... ESP32-C6 Chip is ESP32-C6 (revision v0.2) Features: WiFi 6, BT 5, IEEE802.15.4 Crystal is 40MHz MAC: a0:85:e3:xx:xx:xx Uploading stub... Running stub... Stub running... Warning: ESP32-C6 has no Chip ID. Reading MAC instead. MAC: a0:85:e3:xx:xx:xx Hard resetting via RTS pin... ``` ## demoプログラムのコンパイル ## デモプログラムのコンパイル - Waveshare提供のデモプログラムをbuild。 - VSCode から書き込みはできるが、使いたいときに build なしでファームが書き換えられるようにコマンドで書き込み。 ### フラッシュへの書き込み デモ01~07 #### $ $HOME/.platformio/packages/tool-esptoolpy/esptool.py --port /dev/ttyACM0 --chip esp32c6 write_flash 0x0 bootloader-v5.5.2.bin 0x8000 partition-table-v5.5.2.bin 0x10000 04_Ws2812_Test.bin ``` esptool.py v4.5.1 Serial port /dev/ttyACM0 Connecting... Chip is ESP32-C6 (revision v0.2) Features: WiFi 6, BT 5, IEEE802.15.4 Crystal is 40MHz MAC: a0:85:e3:xx:xx:xx Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x00010000 to 0x0003cfff... Compressed 22592 bytes to 13967... Wrote 22592 bytes (13967 compressed) at 0x00000000 in 0.2 seconds (effective 1004.0 kbit/s)... Hash of data verified. Compressed 3072 bytes to 103... Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 984.1 kbit/s)... Hash of data verified. Compressed 183264 bytes to 94107... Wrote 183264 bytes (94107 compressed) at 0x00010000 in 0.8 seconds (effective 1865.2 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin... ``` ### フラッシュへの書き込み デモ08(工場出荷デモ) #### $ $HOME/.platformio/packages/tool-esptoolpy/esptool.py --port /dev/ttyACM0 --chip esp32c6 write_flash 0x0 bootloader-v5.1.6.bin 0x8000 partition-table-v5.1.6.bin 0x10000 08_FactoryProgram.bin - 最新版(v5.5.2)ではbuildでエラーが発生。 - メーカーwikiページに「This example requires a specific IDF version, and versions V5.2.0 and above may not be able to scan for surrounding WiFi.」とあるため、v5.1.6 で build。 - デモ08は、bootloader.bin、partition-table.bin も同じバージョンのBuildでないと動作しなかった。(デモ01から07は、v5.1.6、v5.5.2どちらでも動作した) ``` esptool.py v4.5.1 Serial port /dev/ttyACM0 Connecting... Chip is ESP32-C6 (revision v0.2) Features: WiFi 6, BT 5, IEEE802.15.4 Crystal is 40MHz MAC: a0:85:e3:xx:xx:xx Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x00010000 to 0x0025dfff... Compressed 21472 bytes to 13050... Wrote 21472 bytes (13050 compressed) at 0x00000000 in 0.2 seconds (effective 939.0 kbit/s)... Hash of data verified. Compressed 3072 bytes to 105... Wrote 3072 bytes (105 compressed) at 0x00008000 in 0.0 seconds (effective 947.0 kbit/s)... Hash of data verified. Compressed 2413152 bytes to 1076569... Wrote 2413152 bytes (1076569 compressed) at 0x00010000 in 8.9 seconds (effective 2158.1 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin... ```