I cannot upload my sketch...it compiles, but when I try to upload, it says that COM 3 does not exist - my board, an ESP32S2 DEV, is connected to COM 4...
I am new to Arduino IoT and trying to create a project that will utilize an Alexa connection...
I saw posts in the forum that indicated there were previous issues to port connections to ESP32 boards, but supposedly they have been corrected - is this the same type of issue?
I tried restarting the Agent, but that made no difference, tried unplugging/replugging the board, tried creating a new Device, restarting the console, you know, all the usual stuff, but nothing seems to work...the IDE still seems to think it should be using COM 3...
Seems funny Arduino did not just include a dropdown like in the desktop IDE, but I guess that has been rehashed, eh!
I think this is a "red herring". The board is put into a boot mode at the start of the upload phase. Windows enumerates the port produced by the board in boot mode to a different serial port number than it has when the board is running the sketch program. So it is normal and expected for the port to change during the upload.
I'm going to ask you to provide the full output from an upload attempt.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Open your sketch in Arduino Cloud Editor.
Click the ➜ button in the Cloud Editor toolbar.
Wait for the upload to fail.
If the black "Console" panel at the bottom of the Cloud Editor page is minimized, click the ˄ icon at the right side of the "Console" toolbar to expand it.
Click the icon in the top right corner of the black "Console" panel at the bottom of the Cloud Editor page that looks like two pieces of paper ("Copy Console Output"):
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the error output from the upload into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
/usr/local/bin/arduino-cli compile --fqbn esp32:esp32:esp32s2:UploadSpeed=921600,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,EraseFlash=none,JTAGAdapter=default --build-cache-path /tmp --output-dir /tmp/1983669920/build --build-path /tmp/arduino-build-EECD989C1ECB1A12B237B08C74D7E18E /tmp/1983669920/Jarvis_oct11a
[info] Sketch uses 895798 bytes (68%) of program storage space. Maximum is 1310720 bytes.
[info] Global variables use 42660 bytes (13%) of dynamic memory, leaving 285020 bytes for local variables. Maximum is 327680 bytes.
Flashing with command:C:/Users/herme/.arduino-create/esp32/esptool_py/4.5.1/esptool.exe --chip esp32s2 --port COM3 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 C:/Users/herme/AppData/Local/Temp/extrafiles2531930907/Jarvis_oct11a.bootloader.bin 0x8000 C:/Users/herme/AppData/Local/Temp/extrafiles2531930907/Jarvis_oct11a.partitions.bin 0xe000 C:/Users/herme/AppData/Local/Temp/extrafiles2531930907/tools/partitions/boot_app0.bin 0x10000 C:/Users/herme/AppData/Local/Temp/arduino-create-agent159281177/Jarvis_oct11a.bin
esptool.py v4.5.1
Serial port COM3
A fatal error occurred: Could not open COM3, the port doesn't exist
Executing command: exit status 2
Above is the copied output from the console...
Of note, this particular board requires that you hold down the upload button to load new code...I have tried two ways - first, holding the button down throughout the compile/upload sequence and then trying by waiting until I see that the compile is done and then the holding it down before the upload starts - neither makes any difference...
/usr/local/bin/arduino-cli compile --fqbn esp8266:esp8266:d1_mini:baud=921600,xtal=80,eesz=4M,dbg=Disabled,lvl=None____,ip=lm2f,vt=flash,exception=disabled,wipe=none --build-cache-path /tmp --output-dir /tmp/2060234335/build --build-path /tmp/arduino-build-EECD989C1ECB1A12B237B08C74D7E18E /tmp/2060234335/Jarvis_oct11a
[info] Sketch uses 422008 bytes (40%) of program storage space. Maximum is 1044464 bytes.
[info] Global variables use 36208 bytes (44%) of dynamic memory, leaving 45712 bytes for local variables. Maximum is 81920 bytes.
Flashing with command:C:/Users/herme/.arduino-create/esp8266/esptool/2.5.0-3-20ed2b9/esptool.exe -vv -cd nodemcu -cb 921600 -cp COM3 -ca 0x00000 -cf C:/Users/herme/AppData/Local/Temp/arduino-create-agent3722356988/Jarvis_oct11a.bin
esptool v0.4.13-1-gf80ae31 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 921600
setting port from COM1 to COM3
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
error: Failed to open COM3
error: espcomm_open failed
error: espcomm_upload_mem failed
Executing command: exit status 2
I tried with a different board that did not required holding down a programming button, a WEMOS D1 R2 Mini (ESP8266), and got the similar result above...
I guess I will order a non ESP32/8266 Arduino board and give it another try...??
I found I had an Arduino NONO 33 IoT in the spares box...connected it up and the Cloud IDE Device configurator recognized it right away so I should be good for now...it found it on COM6...
/usr/local/bin/arduino-cli compile --fqbn arduino:samd:nano_33_iot --build-cache-path /tmp --output-dir /tmp/1421087926/build --build-path /tmp/arduino-build-EECD989C1ECB1A12B237B08C74D7E18E /tmp/1421087926/Jarvis_oct11a
[info] Sketch uses 96636 bytes (36%) of program storage space. Maximum is 262144 bytes.
[info] Global variables use 5988 bytes (18%) of dynamic memory, leaving 26780 bytes for local variables. Maximum is 32768 bytes.
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
Restarting in bootloader mode
Flashing with command:C:/Users/herme/.arduino-create/arduino/bossac/1.7.0-arduino3/bossac.exe -i -d --port=COM3 -U true -i -e -w -v C:/Users/herme/AppData/Local/Temp/arduino-create-agent341156600/Jarvis_oct11a.bin -R
No device found on COM3
Executing command: exit status 1
Oh gees...got same result with the NANO 33 IoT, and this is after the Device widget recognized the NANO, updated its firmware and set it up as a device, all on COM6!
So, something else going on...obviously can't reinstall the IDE!...I tried compiling and uploading through the desktop IDE but it was a library disaster...maybe try reinstalling the Agent?
The NANO is apparently a ESP33 based device so maybe something there and I will still therefore try another MCU based Arduino...have to order that...
Thanks for the update! I'm glad it is working now. Even though it is not as satisfying as finding an explanation for the problem, I guess we can be happy enough that the problem is no longer occurring.
If it comes back later, let us know and we'll see if we are able to investigate further.