Arduiono上では、ボードマネージャにESP32追加し、ESP32 C3 Dev boardを選択して、サンプルを書き込み
エラー発生
Arduino:1.8.19 (Linux), ボード:"ESP32C3 Dev Module, Disabled, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 160MHz (WiFi), QIO, 80MHz, 4MB (32Mb), 921600, None, Disabled, Disabled"
警告:ライブラリESP_SRのカテゴリ「Sound」は有効ではありません。「Uncategorized」に設定します。
警告:ライブラリHashのカテゴリ「Security」は有効ではありません。「Uncategorized」に設定します。
警告:ライブラリESP Insightsのカテゴリ「」は有効ではありません。「Uncategorized」に設定します。
警告:ライブラリESP RainMakerのカテゴリ「」は有効ではありません。「Uncategorized」に設定します。
警告:ライブラリTFLite Microのカテゴリ「」は有効ではありません。「Uncategorized」に設定します。
警告:ライブラリWiFiProvのカテゴリ「」は有効ではありません。「Uncategorized」に設定します。
最大1310720バイトのフラッシュメモリのうち、スケッチが282882バイト(21%)を使っています。
最大327680バイトのRAMのうち、グローバル変数が14240バイト(4%)を使っていて、ローカル変数で313440バイト使うことができます。
Usage: esptool [OPTIONS] COMMAND [ARGS]...
Try 'esptool -h' for help
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Invalid value for '--port' / '-p': Path '/dev/ttyACM0' is not readable. │
╰──────────────────────────────────────────────────────────────────────────────╯
シリアルポート「
」が選択されていますが、そのポートは存在しないか、ボードが接続されていません。
「ファイル」メニューの「環境設定」から
「より詳細な情報を表示する:コンパイル」を有効にすると
より詳しい情報が表示されます。
確認してみる
まず、USBデバイスが存在しているかを確認
pcuser@ubuntu:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 007: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 008: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 022: ID 303a:1001 Espressif USB JTAG/serial debug unit
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
pcuser@ubuntu:~$
ある
rootユーザでesptoolを実行したらどうなる?
root@ubuntu:~# /home/pcuser/.arduino15/packages/esp32/tools/esptool_py/5.1.0/esptool --port /dev/ttyACM0 chip-id
esptool v5.1.0
Connected to ESP32-C3 on /dev/ttyACM0:
Chip type: ESP32-C3 (QFN32) (revision v0.4)
Features: Wi-Fi, BT 5 (LE), Single Core, 160MHz, Embedded Flash 4MB (XMC)
Crystal frequency: 40MHz
USB mode: USB-Serial/JTAG
MAC: ac:eb:e6:6d:6b:b0
Stub flasher running.
Warning: ESP32-C3 has no chip ID. Reading MAC address instead.
MAC: ac:eb:e6:6d:6b:b0
Hard resetting via RTS pin...
root@ubuntu:~#
情報が取得できる
一般ユーザだとどうなる?
pcuser@ubuntu:~$ /home/pcuser/.arduino15/packages/esp32/tools/esptool_py/5.1.0/esptool --port /dev/ttyACM0 chip-id
Usage: esptool [OPTIONS] COMMAND [ARGS]...
Try 'esptool -h' for help
lq Error qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Invalid value for '--port' / '-p': Path '/dev/ttyACM0' is not readable. x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
pcuser@ubuntu:~$
そして、テストとして「python3 -c “import tensorflow as tf; print(tf.config.list_physical_devices(‘GPU’))”」を実行
[testuser@vgpu ~]$ python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2025-05-15 11:35:31.898614: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1747276531.922384 2049 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1747276531.929813 2049 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
W0000 00:00:1747276531.948919 2049 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1747276531.948946 2049 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1747276531.948951 2049 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1747276531.948954 2049 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
2025-05-15 11:35:31.954990: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
W0000 00:00:1747276535.245548 2049 gpu_device.cc:2341] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
[]
[testuser@vgpu ~]$
[testuser@vgpu ~]$ python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2025-05-15 11:45:19.350181: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1747277119.373769 2108 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1747277119.381364 2108 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
W0000 00:00:1747277119.400331 2108 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1747277119.400358 2108 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1747277119.400362 2108 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1747277119.400365 2108 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
2025-05-15 11:45:19.406358: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
[testuser@vgpu ~]$