How do I build manually on OS X? [SOLVED]

Good Day,

My name is Raaj, and I’ve just started using the spark.io core. I was hoping there might be instructions online that show one how to flash and program the core via USB rather than over the cloud.

Basically, messing with the STM libraries, building a binary and uploading it. I’ve worked with the STM32F4 before. Can I know if there is a nice instruction list out there?

This video worked for me. Its not very fun but it works :smile:

I need one for mac. Your instructions are for windows :frowning:

Better install bootcamp :smiley:

Or wait for somebody else who knows how to do it on Mac.

It’s much easier to do on the Mac!

Simply follow these instructions: https://github.com/spark/core-firmware

When you go to install the GCC ARM Package, you’ll specifically want this one. Then follow this GIST to get it installed. You’ve already got make as part of OS X (assuming you’ve got Xcode installed, if not it’s available on the App Store for free). Then you’ll want to install Homebrew and use it to install dfu-util. After that just clone the three repositories outlined in the above instructions and you should be set!

Let me know if you need any help with it. :smile:

1 Like

Thanks. I've been following the instructions and am stuck at this part:

Make sure you have downloaded and installed all the required dependencies as mentioned previously.37

Open up a terminal window, navigate to the build folder under core-firmware and type:

make clean dependents all

I tried doing that and the build died here:

make: *** No rule to make target `dependents'. Stop.

I’m not sure where you see that at?

Look Here: https://github.com/spark/core-firmware#how-do-we-build-these-repositories

Simply get into core-firmware/build and type make.

1 Like

@timb i was following the conversation on arm-c development here which was PC focused. i have managed to copy the master repos over and flash the spark fine. but taking it further eg pulling branch repos from the Elite and building those / writing my own then seems i am a piece of the jigsaw puzzle missing. i see mention of Eclipse / CodeSourcery etc elsewhere - assume this is where they would come into the workflow ? EDIT - if not clear, trying to do this under OSX Mavericks.

Because it's still incorrectly listed here: The Spark Core Firmware - Getting Started - Particle

It really should be shortened to:

make clean all

Or maybe:

make clean
make

(Given how quickly the firmware builds, there's really no reason not to do a clean, as that prevents a large class of problems from popping up and wasting peoples' time.)

Edit: Note that the article is PINNED, under Getting Started.

1 Like

Thanks! managed to get it to work :smile:

What an amazing first experience. Got it to flash locally via USB under 15 mins and got code running and writing stuff to a server. People on the forum respond so fast too so i managed to get it working. What an amazing easy to use platform!

4 Likes

Ah, thanks, I edited that old getting started post to match the current “make clean all”

Thanks. You might also want to change the default target from all to something like:

cleanbuild: clean all