Code not being pushed from spark build

I have a core that is connected and can receive certain firmware that I push to it. Simple .ino files like blinking an LED get pushed (flsahing magenta) and it works fine.

However, when i am trying to create an app based off the aws SDK for arduino (https://github.com/awslabs/aws-sdk-arduino) the code verifies, saves, and says that it is pushing to the device however the device does not flash magenta. It is as if the code was not sent even though the build IDE is saying it has been. The spark continues to run with whatever flash was previously on there so I know it’s not being pushed.

I have tried a hard reset and that doesn’t work. I only got my core last week so i’m presuming I am on the latest (Sept 9).

Hi @ma78,

Hmm, here are a few things to try:

1.) Try flashing a smaller program, just in case the application you’re flashing is too big (over 108KB) for the Core.

2.) Make sure you can send non-flash commands to your core, does it show up as online in your list of cores in the IDE? (Is it breathing cyan on the screen as well?)

3.) Make sure you’ve starred / selected the core in your list as the target to flash

4.) Double-check to make sure there isn’t a small triangle shaped warning icon near the build info that would indicate an issue.

I hope that helps! :slight_smile:

Thanks,
David

Dave

  1. As mentioned in my original post, small programs do flash correctly. The blink LED app is an example of code that flashes correctly. Is there a way to see what the size of my compiled code is?

  2. The core is showing up as online, also proven by the fact that I can push simple code to it.

  3. I only have one core.

  4. Where would I find this warning?

1.) I managed to push the sample code twice to the core. One thing the sample code is doing is to take over the core RGB led upon boot up and i could not tell the OTA progress until it’s completed.

2.) I don’t have the AWS stuff set-up to test but i managed to reflash a couple of times.

KEN-MBP:desktop kennethlimcp$ spark flash ufl firmware_1413940391738.bin
Including:
firmware_1413940391738.bin
attempting to flash firmware to your core ufl
flash core said  {"id":"53ff65065067544816420487","status":"Update started"}
KEN-MBP:desktop kennethlimcp$ spark flash ufl firmware_1413940391738.bin
Including:
firmware_1413940391738.bin
attempting to flash firmware to your core ufl
flash core said  {"id":"53ff65065067544816420487","status":"Update started"}
KEN-MBP:desktop kennethlimcp$ 

3.) How do you verify that the old code is still running? I see that my OTA flashes is consistent but the code interacting with AWS might be causing the issue.

Hi Kenneth

I am flashing the device via spark web build… am I right in saying you are doing it via USB? Perhaps I should try that method?

I know it’s the old code because the old code was flashing the LED on/off every second, and it continued to do so even after the spark build IDE was saying that my new AWS code was pushed to the device.

Nope. I used the Spark cli tool but essentially doing the same thing you did via the Web IDE.

Try disabling the AWS stuff and test again? :wink:

Hey @ma78…sometimes just refreshing the browser page also does the trick!

Kenneth… what do you mean by disabling the AWS stuff?

Also, I am not able to rename the jsmn.c file to be jsmn.cpp through the web IDE. Is that potentially an issue?

How about considering using Spark-cli to compile instead since there’s quite a number of files and compilation might be an issue?

Not sure if .c files can be added to the Web Ide though.

I’ve moved over to usnig the spark-cli.
So,
When I compile the samples/SparkGetItemSample.ino file + all the cpp/h files the size is 76k and flashes
When I compile the samples/SparkPutItemSample.ino file + the cpp/h files it ends up at 109k and fails

I have no idea how to reduce that code so I’ve added an issue to the github project. Thanks all!

Weird. Is that sample code? I compiled fine 2 days back but haven’t tried with the updated build farm.

Kenneth when you compiled which .ino did you use? Or did you just compile the src directory?