Cheers!
I am new to PlatformIO and are trying to set it up to program microcontrollers (specifically Arduino, ESP32-variants).
Where I am at now:
I have successfully installed PlatformIO on my Chromebook (Debian 12) through Linux. It detects my board (Arduino UNO) and can build without any errors, but when I try to upload I get the following error. I have tried to add upload_port = /dev/ttyUSB0 to my platformio.ini file for the project and updated the udev rules according to this documentation.
**Error message:
**
Looking for upload port…
Using manually specified: /dev/ttyUSB0
*** [upload] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: ‘/dev/ttyUSB0’
Any idea what might be going wrong?
Are you running VSCode in a sort of isolated container like through snap? In a PlatformIO Core CLI, what’s the output of pio device list?
I am relatively unskilled in using Linux (but I can follow basic instructions). So not sure what is meant by isolated container/snap.
My setup steps was as following:
1. Downloaded Visual Studio Code for Debian (via apt).
2. Update the package cache and installed the package (via sudo).
3. In VSCode Extension Manager, I searched for PlatformIO IDE extension and installed
4. I then set udev rules to allow uploading sketches.
5. I configured the port in the new projects platformio.ini file to upload_port = /dev/ttyACM0.
Once I have access to the system again I will check pio device list.
My environment is slightly different from yours; I’m using Ubuntu + VS Code, but it’s still a Linux environment.
I usually don’t connect multiple devices, so I don’t specify a port in platformio.ini and leave the upload port selection as “Auto.”
(You should also be able to select and specify from the list.)
Have you actually connected a device via USB and checked which port is active?
I think it would be best to check this first, referring to the attached screenshot.
Scroll through the list of ports and find the same port you specified in platformio.ini:
upload_port = /dev/ttyACM0
Do you find it?