-
It is an old topic on Arduino but even with 1.6.9 IDE, the same situation on my side.
-
The details: when clicking Upload button, the bottom console keeps at Uploading... status all the time and but the program is actually uploaded to the board (because the LED and Serial port output work as the program did.) After a few minutes, "an error occurred while uploading the sketch" appears.
Appendix:
- If I run the upload command directly, everything works perfectly without any error.
ST-LINK_CLI.exe" -c SWD -P "full path of [filename].ino.bin" 0x8008000 -Rst -Run
- The workaround: When at Uploading... status, I click Upload button again then press RESET button on board and if releasing the button at some perfect timing, the upload can finish successfully.