LEAP#220 Arduino gcc toolchain
How to do it from scratch? This is my experiement and guide to building software for an Arduino from the command line. I use a Mac and homebrew, so it is somewhat MacOSX-specific.
As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub.