I am hoping you can help[ me understand this error message. I was able to previously upload this program fine. I have copied the “list” of “dependencies” and do not see Arduino or Arduino.h. Is that a problem?
Resolving esp32doit-devkit-v1 dependencies…
Platform espressif32 @ 6.4.0 (required: espressif32)
├── framework-arduinoespressif32 @ 3.20011.230801 (required: platformio/framework-arduinoespressif32 @ ~3.20011.0)
├── tool-esptoolpy @ 1.40501.0 (required: platformio/tool-esptoolpy @ ~1.40501.0)
├── tool-mkfatfs @ 2.0.1 (required: platformio/tool-mkfatfs @ ~2.0.0)
├── tool-mklittlefs @ 1.203.210628 (required: platformio/tool-mklittlefs @ ~1.203.0)
├── tool-mkspiffs @ 2.230.0 (required: platformio/tool-mkspiffs @ ~2.230.0)
├── tool-openocd-esp32 @ 2.1100.20220706 (required: platformio/tool-openocd-esp32 @ ~2.1100.0)
└── toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5 (required: espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5)
Libraries
└── ESP Async WebServer @ 1.2.3 (required: ESP Async WebServer)
│ ├── AsyncTCP @ 1.1.1 (required: AsyncTCP)
│ └── ESPAsyncTCP @ 1.2.2 (required: ESPAsyncTCP)
* Terminal will be reused by tasks, press any key to cl
I did install MinGW-W64 and the extension Code Runner between the last time this worked for me and now at which time I am receiving these error messages on my MAC. I can’t tell if that is connected or what to do about it.
I have uninstalled Code Runner but it did not help.
Executing task: platformio run –target upload
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
—————————————————————————————————————————-
Verbose mode can be enabled via `-v, –verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 (6.4.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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:
– framework-arduinoespressif32 @ 3.20011.230801 (2.0.11)
– tool-esptoolpy @ 1.40501.0 (4.5.1)
– tool-mkfatfs @ 2.0.1
– tool-mklittlefs @ 1.203.210628 (2.3)
– tool-mkspiffs @ 2.230.0 (2.30)
– toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies…
Dependency Graph
|– ESP Async WebServer @ 1.2.3
|– AsyncTCP @ 1.1.1
|– WiFi @ 2.0.0
Building in release mode
Retrieving maximum program size .pio/build/esp32doit-devkit-v1/firmware.elf
Checking size .pio/build/esp32doit-devkit-v1/firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [= ] 14.9% (used 48820 bytes from 327680 bytes)
Flash: [======== ] 78.5% (used 1029249 bytes from 1310720 bytes)
Configuring upload protocol…
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port…
Auto-detected: /dev/cu.usbserial-0001
Uploading .pio/build/esp32doit-devkit-v1/firmware.bin
esptool.py v4.5.1
Traceback (most recent call last):
Serial port /dev/cu.usbserial-0001
File “/Users/judsonbelmont/.platformio/packages/tool-esptoolpy/esptool.py”, line 34, in <module>
esptool._main()
File “/Users/judsonbelmont/.platformio/packages/tool-esptoolpy/esptool/__init__.py”, line 1032, in _main
main()
File “/Users/judsonbelmont/.platformio/packages/tool-esptoolpy/esptool/__init__.py”, line 674, in main
esp = esp or get_default_connected_device(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/judsonbelmont/.platformio/packages/tool-esptoolpy/esptool/__init__.py”, line 920, in get_default_connected_device
_esp = chip_class(each_port, initial_baud, trace)
File “/Users/judsonbelmont/.platformio/packages/tool-esptoolpy/esptool/loader.py”, line 302, in __init__
self._port = serial.serial_for_url(port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/judsonbelmont/.platformio/penv/lib/python3.11/site-packages/serial/__init__.py”, line 90, in serial_for_url
instance.open()
File “/Users/judsonbelmont/.platformio/penv/lib/python3.11/site-packages/serial/serialposix.py”, line 332, in open
self._reconfigure_port(force_update=True)
File “/Users/judsonbelmont/.platformio/penv/lib/python3.11/site-packages/serial/serialposix.py”, line 517, in _reconfigure_port
termios.tcsetattr(
termios.error: (22, ‘Invalid argument’)
*** [upload] Error
File “/Users/judsonbelmont/.platformio/penv/lib/python3.11/site-packages/serial/serialposix.py”, line 517, in _reconfigure_port
termios.tcsetattr(
termios.error: (22, ‘Invalid argument’)
*** [upload] Error 1
================================================ [FAILED] Took 1.23 seconds ================================================
* The terminal process “platformio ‘run’, ‘–target’, ‘upload'” terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
I just ran the same program on a second MAC computer and received this message.Slightly different but still confusing to me.
[Running] cd “/Users/judsonbelmont/Documents/1_1_Hello_World_WS/src/” && g++ main.cpp -o main && “/Users/judsonbelmont/Documents/1_1_Hello_World_WS/src/”main
main.cpp:9:10: fatal error: ‘Arduino.h’ file not found
#include <Arduino.h>
^~~~~~~~~~~
1 error generated.
[Done] exited with code=1 in 0.248 seconds
Hi.
How does your platformio.ini file looks like on your second computer?
Did you create an ESP32 platformio project? Did you install the ESP32 boards on platformio as mentioned in the tutorials?
Regards,
Sar
Thank you. I didn’t do anything different and it’s working now on both computers. There’s an evil gremlin inside.