SAMD breakout board compile/upload takes long time

Have questions about a SparkFun product or board? This is the place to be.

Moderators: phalanx, TS-Tim

Post Reply
jelanier
Posts: 10
Joined: Sun Nov 22, 2015 5:34 am

SAMD breakout board compile/upload takes long time

Post by jelanier » Sun Nov 22, 2015 5:53 am

I have a new SparkFun SAMD21 Dev Breakout board. Compile/Upload is where I have a problem.

It takes a long time for even the smallest of programs. The text below is the compile/upload of the blink program.
I don't understand why this is so much different than the other arduino boards I use. Am I doing something wrong?

The text below is the output window in the arduino ide..

Thanks in advance,

Jim


Warning: platform.txt from core 'Arduino SAMD (32-bits ARM Cortex-M0+) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'SparkFun SAMD (32-bits ARM Cortex-M0+) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.

Sketch uses 11,596 bytes (4%) of program storage space. Maximum is 262,144 bytes.
Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Chip ID : 10010005
Version : v1.1 [SparkFun:XYZ] Sep 24 2015 16:50:58
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
Boot Flash : true
BOD : true
BOR : true
Erase flash
done in 46.441 seconds

Write 11772 bytes to flash (184 pages)

[ ] 0% (0/184 pages)
[== ] 9% (18/184 pages)
[===== ] 19% (36/184 pages)
[======== ] 29% (54/184 pages)
[=========== ] 39% (72/184 pages)
[============== ] 48% (90/184 pages)
[================= ] 58% (108/184 pages)
[==================== ] 68% (126/184 pages)
[======================= ] 78% (144/184 pages)
[========================== ] 88% (162/184 pages)
[============================= ] 97% (180/184 pages)
[==============================] 100% (184/184 pages)
done in 28.704 seconds

Verify 11772 bytes of flash

[ ] 0% (0/184 pages)
[== ] 9% (18/184 pages)
[===== ] 19% (36/184 pages)
[======== ] 29% (54/184 pages)
[=========== ] 39% (72/184 pages)
[============== ] 48% (90/184 pages)
[================= ] 58% (108/184 pages)
[==================== ] 68% (126/184 pages)
[======================= ] 78% (144/184 pages)
[========================== ] 88% (162/184 pages)
[============================= ] 97% (180/184 pages)
[==============================] 100% (184/184 pages)
Verify successful
done in 0.203 seconds
CPU reset.

jbernard
Posts: 2
Joined: Wed Dec 09, 2015 7:31 pm

Re: SAMD breakout board compile/upload takes long time

Post by jbernard » Wed Dec 09, 2015 8:02 pm

I am seeing the same problem as jelanier. Upload speed of blink.ino on a Dell Latitude 3550 takes 72 seconds, while on a Dell Latitude E6530 it takes 11 seconds. Both machines are running Windows 7 Professional.
Does the Arduino Zero show similar slow upload behavior (i.e. when programming using the native USB port)?
What about other laptops or OS versions?
Don't know much about USB hardware and drivers so not sure how to troubleshoot.

jbernard
Posts: 2
Joined: Wed Dec 09, 2015 7:31 pm

Re: SAMD breakout board compile/upload takes long time

Post by jbernard » Thu Dec 10, 2015 6:09 pm

Tested the same sketch on a Dell Optiplex 9020 desktop (Windows 7 Professional): upload time 6 seconds.

floske
Posts: 1
Joined: Mon Feb 15, 2016 3:43 am

Re: SAMD breakout board compile/upload takes long time

Post by floske » Thu Feb 18, 2016 11:51 am

To all the poor souls who experience the same problem, here is an official reply from tech support:
We’ve had users have this problem before and the only thing we have been able to think of that’s causing it would be the computer they are using. For reasons unknown to us, some computers USB ports don’t work nicely with the SAMD21. It’s something we are looking into, but so far don’t have a solution for. You might try a different USB port on your computer, a shorter USB cable, or a USB 2.0 hub to see if that helps any. Some users report that one or more of those solutions speed things up for them. As soon as we know the exact cause of the problem, we will get it corrected though.
So actually the answer from jbernard is not that off...

Cheers

deladriere
Posts: 2
Joined: Sat Feb 27, 2016 6:40 am

Re: SAMD breakout board compile/upload takes long time

Post by deladriere » Sat Feb 27, 2016 6:43 am

I have the same problem too but I don't think this is linked to the SAMD21: I have an Arduino zero and a Neutrino and the same sketckes upload in a breeze

hank_scorpio
Posts: 3
Joined: Mon Jun 20, 2016 7:26 pm

Re: SAMD breakout board compile/upload takes long time

Post by hank_scorpio » Mon Jun 20, 2016 7:53 pm

As of Arduino 1.6.9, Arduino SAMD 1.6.5, and Sparkfun SAMD 1.2.0 this issue is not resolved and it is a real PITA. I have it with both the regular and mini versions of this board. I believe that a related issue is that as the sketches get larger, there is an increasing chance the upload will hang. That was the issue that brought me here. My uploads were always slow so I assumed that was normal. I only started researching this when uploading larger sketches started to hang. And when I say large, I'm only talking like 48Kb. Not really that big...

The cable, and/or the USB interface do play a role but at least in my experience it is not a complete fix. The best I can get with my laptop is mostly working with slow uploads. Occasionally I'll see a fast upload and occasionally it will stall.

hank_scorpio
Posts: 3
Joined: Mon Jun 20, 2016 7:26 pm

Re: SAMD breakout board compile/upload takes long time

Post by hank_scorpio » Wed Jun 22, 2016 10:41 am

A bit more info. While this will not help in regards to upload speed, I have noticed that my uploads hang much less frequently when my PC CPU is somewhat loaded. For example, simply scrolling a browser window while a program is uploading. This seemingly affects the upload speed (maybe negatively, since scrolling the window causes the frequency of the tx/rx LEDs to slow) but not by much and overall I'm better off with a program loaded than I am with the upload hung.

Obviously there is a timing issue with certain PC hardware combinations. Must not be that common since this thread hasn't really blown up. Oh well....

hank_scorpio
Posts: 3
Joined: Mon Jun 20, 2016 7:26 pm

Re: SAMD breakout board compile/upload takes long time

Post by hank_scorpio » Wed Nov 09, 2016 12:22 pm

A non-update. As of Arduino 1.6.12, Arduino SAMD 1.6.8, and Sparkfun SAMD 1.2.2 this issue is not resolved. I have a new desktop and it is actually a bit worse in that verification *always* fails. I still have to vigorously scroll in a browser window while uploading to get the upload to succeed at all. If I don't, uploads almost always fail at various points in the process.

What is crazy is that while this seems to affect a small number of users *every* PC I use has this problem. They are all different, except that they have Intel processors and run either Windows 7 or 10.

Post Reply