I spent a little more time today looking at this issue…
I am using the Arduino 1.8.10 IDE
I am using the Arduino SAMD Boards 1.8.4
I am using the Sparkfun SAMD Boards 1.7.4
I am not using any libraries in the current script.
When this issue has occurred, it only impact the upload time, not the compile time. Compiles only take seconds.
I just went back and compiled/uploaded several old scripts, and they all are experiencing the extended upload times at this time, including Blink, so this is NOT a script related issue.
Then I tried a different SAMD21 board and breadboard and re-compiled and uploaded the script that was currently in that board, and the upload time was seconds. So I tried compiling/uploading blink, and the upload time was seconds. Back to the original script for that breadboard and still fast.
So put that known “fast” SAMD21 into original “slow” breadboard, compiled and uploaded original script for that breadboard. Fast upload.
Found a third SAMD21 and put that into the “slow” breadboard, compiled and uploaded original script. Slow upload.
Went back and compiled/uploaded Blink into the (now) two “slow” SAMD21’s, both outside breadboards (only connected to USB port) Both are still slow.
I tried the double press reset to reset the SAMD21 before uploading – still slow.
So it looks like this is something that happens to the SAMD21 boards as the problem clearly follows the SAMD21 board. I have now tested two slow SAMD21’s and one fast SAMD21. I know they all started out fast, so something must have gotten damaged while in use to cause this problem. Other than being very slow to upload, the boards appear to function fine after uploading.
Tom