OS Windows 11, Arduino IDE 2.1.0
I'm currently trying to write basic code on my Arduino IDE and uploading it to my Arduino Uno Wifi Rev2 but the code doesn't upload and the uploading message doesn't go away, i.e. the code doesn't gets uploaded to the Uno. This same board works fine when firmware is uploaded through a mac , or on a different laptop running windows itself.
I tried uploading the same basic Blink code to my Arduino Nano 33 IoT (using the USB port) and it shows no errors and compiles and uploads the code in mere seconds. I tried debugging and finding solutions on the web, but was unable to find anything worthwhile. Below is the text from the Output window when the uploading gets stuck:
Sketch uses 1510 bytes (3%) of program storage space. Maximum is 48640 bytes.
Global variables use 22 bytes (0%) of dynamic memory, leaving 6122 bytes for local variables. Maximum is 6144 bytes.
"C:\Users\shash\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\shash\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega4809 -cxplainedmini_updi -Pusb -b115200 -e -D "-Uflash:w:C:\Users\shash\AppData\Local\Temp\arduino\sketches\0F07BFDF6753DC949DC1F5E2ED22A318/Blink.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x02:m" "-Uflash:w:C:\Users\shash\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8/bootloaders/atmega4809_uart_bl.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\shash\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : usb
Using Programmer : xplainedmini_updi
Overriding Baud Rate : 115200
Have confirmed that antivirus is disabled, have tried running it as administrator without any effect. The board itself is recognized correctly and on the right com port (confirmed through device manager). Thinking that the board might be defective, I have tried another Uno Wifi Rev 2, which also exhibits the same problem. This board also works on all other Windows & macs without any problem.
Tools : -> "Get Board Info" is able to fetch data from the board
Nope, this is all there is. It doesn't go beyond that line and just stops. That's what I meant when I said it just shows the uploading symbol on loop and doesn't finish uploading.
The reason I ask is because there was a bug in Arduino IDE 2.1.0 that could cause processes to hang under certain conditions. The known reproductions of that bug produced a hang during the compilation process rather than the upload process, but the bug was not necessarily specific to compilation (I focused on compilation in the bug report mainly because it avoids introducing a hardware dependency into the demo) so it is possible it could also cause hangs during an upload.
@ptillisch No changes, even when using the nightly build. It still gets stuck on the uploading part and doesn't finish uploading, giving the same result as before when I was using Arduino IDE 2.1.0.
I think the next step in the investigation is to manually run the upload command from the command line. My hope is that it will produce some feedback that would allow us to understand what is happening.
Please try this experiment and then reply here on the forum to let us know the result:
Connect the USB cable of your Uno WiFi Rev2 to your computer as usual.
Hover your mouse pointer over the command on the following line:
You will see an icon that looks like two pieces of paper appear on the right side of the command. Click that icon to copy the command to the clipboard.
Click the Windows "Start" button.
Type powershell in the search field.
Select "Windows PowerShell ISE" from the search results.
A "Windows PowerShell ISE" window will open.
Click on the terminal panel of the "Windows PowerShell ISE" window. ⓘ The terminal panel is the part that has the command prompt like PS C:\Users\per>
Press Ctrl+V.
This will paste the copied command into the PowerShell terminal.
Press the Enter key.
I'm interested in knowing things like:
Does the upload succeed or hang or fail?
If it fails or hangs, is any additional output printed to the terminal compared to what you see in the "Output" panel of Arduino IDE?
Do any Windows dialogs pop up during or after the upload attempt?