First impressions, first questions

Hi,

First post. First Core. First Impressions. Neat little unit.
Very impressive the way that it’s managed in the cloud. Am looking forward to buying the Proton. I’d like a simple tool to manage it completely off-cloud (like the Arduino IDE) but am sure that’s only a matter of time.

A few things that I’m struggling to understand, probably because I’m looking too hard:

  1. Firmware.

As far as I can tell the Core has several bits of firmware/software. Is this correct:

a) Bootloader – permanently burned in to the Core

b) A read-only copy of firmware that is reinstated on factory-reset

c) The ‘deep’ firmware, eg deep_update_2014_06.bin

d) A combined operating system plus my own code – which is replaced in its entirety when I flash the firmware with my code.

  1. Does spark flash call dfu-util? If so then does that mean I can use dfu-util directly to deploy my own code (having compiled it in the cloud and then downloaded it)? The reason that I ask is that it would be useful to be able to reinstate a known-good bit of code without the overhead of having to install spark-cli (because nodejs and npm are proving a pain to get working at the moment).

  2. I’d like to understand the lifecycle of the code when it executes. I’ve read somewhere that loop() gets repeatedly called every 10-15 milliseconds and that if loop() takes more than five seconds then it starts to affect the system because of the interaction with the cloud. Is that correct? During the execution of loop(), does my code get interrupted by anything – for instance the Core wanting to talk to the cloud or other events handling?

Thanks,

Tim.

Glad you like it, it really is awesome ;)!
As far as the “I’d like an Arduino-ish IDE” goes, there is the Spark Dev. You can find the relevant info for it in the docs: http://docs.spark.io/dev/

1 Like

Spark Dev is a dream. As somebody who worked with spark before DEV I cant even begin to tell you how much more I love SPARK with the Dev software

2 Likes

Hi @timx

  • The bootloader is not permanent but requires special hardware or a special bootloader updater program to change it.
  • The factory-reset firmware is writable by you at a special address and you can change it from Tinker using dfu-util but I wouldn’t make that change lightly! The core memory map shows where it lives.
  • The “deep update” firmware is a patch to the TI CC3000 WiFi chip which is completely separate from the ARM core firmware. Only TI can create patches to the TI chip.
  • I wouldn’t call the core firmware a full OS–it is a lot like Arduino in that way.

dfu-util is a general purpose program that can read and write memory on USB devices like the core. You can use dfu-util to put new firmware on a core or new crypto keys or new factory reset firmware.

You can turn the cloud off if you don’t need it and only manually connect to it if you like.

4 Likes

In the next version of Spark-dev, flashing via DFU will be available: https://github.com/spark/spark-dev/commit/3579a9bff83e801343c422f1e93fb23f42ca686c

3 Likes

Many thanks for the replies. Tim.