A makefile for local builds

I got fed up of git cloning lots of core-firmware directories and editing my $PATH every time I wanted to locally compile a new firmware.

So I’ve made a simple makefile that basically copies your c++ file over application.cpp and runs make (with whatever target you want). It also changes the $PATH to include the gcc-arm-none-eabi cross-compiler environment.

This means now you can have individual directories e.g. in your $HOME, instead of trying to track files inside the core-firmware directory, like you do with Arduino e.g.


Then just run make or make clean all or any other target - it imports them all from core-firmware/build/makefile

I’ve not looked at how libraries or multiple files will be supported yet, but here is the Makefile, note that its 2 tabs (not 8 spaces) before the $(MAKE) line, or i hate how anal that is!

Obviously you need to change the PATH, CPPSRC and FWDIR to match your environment, but after that just change CPPSRC.


Thanks for sharing!!

Thank you!!!

I’m going to give this a try when I get home. After a shower. And a nap. And maybe more napping. 22 hours of no sleep and counting… *snore* So worth it!

1 Like