After compiling and verifying any sort of sketch (for this example a basic blinking LED)...
int LED = 9;
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
...it says the code is OK to upload. In the bottom right corner it says the board is connected and I selected the right COM port. Then I press upload and it starts compiling normally, but right when it says "Uploading..." the board instantly disconnects and connects up again after Arduino IDE spits out the error "error uploading: exit status 1". This is not the board's fault, as I tried three different ones (2 Arduino Pro Micros and a Raspberry Pi Pico). Even more, I tried uploading from two different Windows 10 computers (A custom PC and a ThinkPad laptop) and three different USB cables. What is even more worrying is that when I tried uploading from a Mac, it worked perfectly fine. But I still need a solution for Win 10, as the Mac isn't mine. I think I found the exact issue, but I just don't know how to fix it.
Here is the part that I think causes the error:
You see, the board is connected to COM11 (I tried different ones but the same thing happens). Right when it starts uploading, it performs a reset on that port and then starts uploading to COM13 for some reason. The board is obviously still on COM11 so it doesn't recieve the code.
From Device Manager's perspective, it sees the connected board on COM11 up until the error happens. Then it stops seeing it but right after Ardu IDE spits out the error, everything goes back to the state before.
I still don't know how to fix that problem, so any feedback is highly appreciated (If anyone solves this I'll make sure to pay tribute to you on my YouTube channel)!
Additional information:
Arduino IDE version: 2.0.3
Sorry, I'm a beginner and that was the only thing that drew my attention
The full output:
Performing 1200-bps touch reset on serial port COM11
Waiting for upload port...
Upload port found on COM13
"C:\Users\badacz\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\badacz\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega32u4 -cavr109 "-PCOM13" -b57600 -D "-Uflash:w:C:\Users\badacz\AppData\Local\Temp\arduino-sketch-675DDCF20EECA37F63C3329255887445/sketch_mar1a.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions