Should flashing from Build IDE really take 1m20s?

After some startup problems I finally have two Sparks working.

Just doing over the air firmware updates using the web based Spark Build IDE take 1 minute 20 seconds for even the simplest (Flash LED) example. Thats really long compared to my “old school” Arduino Uno etc. experience - granted that was over a cable, but should it really take this long or is something wrong or misconfigured on my end ?

Is it because it is literally reflashing the WHOLE firmware instead of just the few bytes that represent my trivial sample program ? Why would that be necessary ? Seems that slowness could make development iterations more tedious than expected ?

4 Likes

Nothing wrong.

It does send the whole ~64K firmware, because your program is in reality just few functions that the main part calls in its main loop. The extra slowness is explained somewhere in this topic:

(My PC won’t load that particular topic for some reason so I can’t give direct link, but it is post ~ #40.)

With decent computer and usb, clean compile is ~15sec and flash 10sec. Second make when the core libraries are already build, the complile only takes few seconds. So if you like to make little tweaks and try them everytime the code changes even a bit (like me), it is really worth the trouble to set up local development enviroment.

2 Likes

Definitely worth spending a few minutes setting up the local environment, even if you end up using the cloud later for minor changes, once you have everything working.

1 Like

Hi @SparkToad,

The status text on the build site is a little misleading. Compiling generally takes less than a second, what takes a long time is the flashing over the air to the core.

Our current process for sending the firmware is extremely fault tolerant, but as a result it can be very slow on high-latency connections. We’re working on making some changes to fix this in high-latency connections, but I wrote about this a bit more here: https://community.spark.io/t/the-spark-core-firmware/532/39

edit: hah, oops, @weakset beat me to it. – I’ve gotta start reading the whole thread before I reply… :blush:

Thanks!
David