An error occurred while uploading the sketch

In the IDE >> a sketch upload >> the sketch “Blink” will be compiled but not uploaded

In the log:
Sketch uses 9736 bytes (3%) of program storage space. Maximum is 262144 bytes.
Forcing reset using 1200bps open/close on port COM5
PORTS {COM5, } / {COM5, } => {}

Uploading using selected port: COM5
C:\Users\KHoff\Documents\ArduinoData\packages\arduino\tools\bossac\1.7.0/bossac.exe -i -d --port=COM5 -U true -i -e -w -v C:\Users\KHoff\AppData\Local\Temp\arduino_build_979054/Blink.ino.bin -R

after a long time 4-10 min

An error occurred while uploading the sketch

What can I do?

Windows10 Pro – Version 1709
Window-Manager COM & LPT

Arduino MKR1000(COM5)
9600 bps
Databits: 8
Parität: none
Stoppbits: 1
Flow control: none

In the IDE >> preferences.txt


log.txt (49.7 KB)



Quickly double press the reset button.

Windows will do a "new hardware found" and put the MKR on a new COM port once you get the timing right for the double press.

AT that point select the new COM port and upload blink.

Be aware also that USB 3.0 type ports are very hit/miss so upload using USB 2.0 ports.

1 Like

Thank you for your help!

After I have connected the USB cable I press 3x the reset button on the MRK.
In the Device Manager >> I got a new port: COM3 - for the Arduino.

Then I checked the Port: COM in the IDE. It was now COM3.

And the Upload works well.

I use a Z370M-ITXac mainboard.
In the BIOS >> I select Legacy USB Support >> Legacy OS Support for USB 2.0 devices

Yes legacy support is another way to do that.

Good thinking !

Just be aware it doesn’t always work.
In that is ever the case a good USB 2.0 POWERED hub between the USB 3.0 port and the Arduinos is a very good choice.