Spark Cuts Out When Attempting to Flash New Apps

The core will initially flash magenta but then dies soon after (no LED lights at all). After a couple seconds the cyan lights come back on and are breathing.

The the web IDE says everything went fine, however the previous program is still on the spark.

I have already installed the cc3000 update via terminal (OSX).

@daflippymaster, it sounds like the firmware you currently have on the core has some issues and is preventing a proper OTA flashing.

Since you have spark-cli installed,

  1. Place the core in DFU mode (blinking yellow)

  2. spark flash --usb tinker

This will overwrite the firmware on the core. Thereafter, try an OTA download again :wink:

It sounds like you are getting hit by this:

We’re hot on the trail of this, but one work around is to add something to change the size of the resulting binary. If you add 16 bytes to the binary (by declaring a const char array of 16 elements) - you may get working again.

1 Like

That did indeed fix it

However, i’ve had issue flashing programs two other times earlier today (both times fixed by reflashing tinker/cc3000

Any ideas on why I would need to keep doing this/why this problem keeps reoccurring?

EDIT: It would seem i’m a victim of CFOD as well -___-

1 Like

You are not really experiencing CFOD since you already did the CC3000 patch :wink:

It’s a bug in OTA causing the issue. For now, the best and least invasive method is spark flash --usb tinker if OTA hanged.

have fun!

Hi @daflippymaster,

One thing that may cause an issue is that your code isn’t run in any kind of sandbox, so it’s possible to write apps that interfere with OTA when you’re doing rapid development. I would try flashing your app over USB with a simple spark flash --usb myapp.bin if you’re developing locally, and then fix any issues preventing OTA when you’re ready. :slight_smile:

We’re also hoping to take another look at our OTA process in the next few weeks, and make some significant improvements. :slight_smile:

I hope that helps!

Thanks!
David

@Dave, how do you go from the .ino file to the .bin?

Hi @daflippymaster,

If you’re using the CLI, you can convert from a ‘.ino’ file to a ‘.bin’ by using the compile command:

spark compile myApp.ino --saveTo myApp.bin

Thanks,
David

1 Like

Thanks @Dave, that’ll save a ton of time

1 Like