Firmware upgrade

I want to utilize the Spark.sleep() function that allows the spark to wake based on the value of a pin (rising, falling or change). Do I need to upgrade the firmware my spark shipped with?

What is the easiest way to tell which firmware version I have…? I ask because in the docs, it says the upgrade is mandatory. However, when I try to follow the tutorial I get stuck on step 2, Make.

The error I receive is:

C:\Program: No such file or directory
makefile:221: recipe for target ‘check_external_deps’ failed
mingw32-make: *** [check_external_deps] Error 127

Which leads me to believe I messed up on one of the previous steps, but I followed everything to a tee. I might have unpacked or installed one of the dependencies wrong but I’m not sure how to check this. I’ve been stuck on this for a few hours so any help is greatly appreciated! The Spark community has been extremely helpful so far and you guys have never let me down :smile: thanks so much in advance for your time!


You don’t need to build the firmware yourself to apply that patch to your Core. There is an already built core-firmware.bin in the build/ folder. Just flash your Core with it and it will be upgraded :slight_smile:

Follow the steps described in this post and you are done!

@John9570, but first I’d like to ask when you’ve got your Core (what color is the PCB)? Since you may not have to go through all the patching if you already have a Core that allows you to do what you want.

Have you tried out the code of my post here?
If it already stays asleep after you call the Spark.function you already got a good bootloader.

1 Like

Thanks guys!

@netropo I haven’t seen that post before but if ScruffR says I need to upgrade I will follow those steps.

And @ScruffR I got my core about a month ago, maybe less. The color of its PCB is black.

@ScruffR does the Core color absolutely change the game? I got my Core about 20 days ago (no white) and my firmware still did not support wake on pin out of the box

Guys, the color as such does not actually change anything, but it does help to figure out if it has the really old bootloader (white Cores) which does work as expected, but seems to lack the watchdog as it was introduced later on. But if you have a black one, you could just decide to go through with the bootloader update anyhow, or just test your Core by means of some code like the one I posted.
Unfortunately the purchase date won’t really give you a clue unless it was long ago but a black Core, then you definetly would need to upgrade the bootloader.
If it was fairly recent it could be an old black just lingering in stock or a brand new one with the most recent bootloader version.

I most likely have to upgrade then.

@ScruffR I tried the code and it didn’t seem to work properly at the time, I could’ve been doing something wrong though but I think it would probably be best if I go ahead and upgrade it so I can be sure. The issue I have with upgrading is that in the link @netropo posted:

I downloaded dfu-util but when I try to run it on my command line or powershell, the command isnt recognized.

I guess you haven’t added the dfu-util location to your PATH or haven’t changed into the respective directory before trying to run it.

@ScruffR I am trying to follow @netropo earlier post because I am still having trouble with the building part. I can run dfu-util now, but am stuck while trying to build the code. However, if I try to pull the repository that @netropo mentions by typing:

git clone

I get an access denied message because I do not have the correct permissions.

How can I get around this…?


Okay I think I’ve made some good progress so far. I downloaded VMware and got a Ubuntu machine up and running and installed everything on there. dfu-util is on version 0.5 for ubuntu though and I think that may be causing me some problems.

I saw a similar post on these forums, but the issue isn’t resolved on my end. Here is the output from my ubuntu terminal:

Opening DFU USB device… john9570@ubuntu:~/Spark/core-firmware/build$
john9570@ubuntu:~/Spark/core-firmware/build$ sudo dfu-util -d 1d50:607f -a 0 -s 0x08005000 -D core-firmware.bin
dfu-util 0.5

© 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010-2011 Tormod Volden (DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU USB device… ID 1d50:607f
Run-time device DFU version 011a
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/20001Ka,108001Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuDNLOAD-IDLE, status = 0
aborting previous incomplete transfer
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash "

I’m willing to try to do it on Windows or Ubuntu but I think it would be easiest to fix the issue I’m encountering on Ubuntu than it would be to continue pursuing this on windows.

Again, thank you guys so much for you help, I’m sorry to have taken up so much of your time!


I was able to find the correct dfu-util version from here:

and it is complete with instructions for ubuntu. After I DL’ed that, everything worked fine :smile:

1 Like

I just received my (black) Spark Core a few days ago, and it won’t stay in stop mode (wakes up after 5 seconds). All the docs and forum posts (including this thread) that I’ve seen seem to indicate that I need to flash the bootloader update from here:

However, I find it hard to believe a brand new Spark Core would need an update. Is there a way I can check the bootloader version my device has?

I’m hesitant to flash the bootloader from the bootloader-patch-update branch because it is now 151 commits behind the master branch (see: Seems like I could inadvertently be downgrading the bootloader, losing other potential fixes. Is there a later bootloader with the stop mode fix that I should upgrade to instead?


For what it’s worth, I had the same hesitation.
I just received my core mid-April, did the deep update, and saw that it wouldn’t stay asleep. I assumed that since I had a recent Core and had the latest firmware update, I would be good.

I took a risk and flashed the bootloader, and now it stays asleep perfectly. I’d say go flash it.