Build Firmware on Windows
This How-to is intended for:
Microcontroller Developers
Set up to create your own programs for the Make Controller.
Problem
You want to get set up to write your own programs for the Make Controller on Windows.
Solution
There are a few steps here:
- Download and install a GnuArm toolchain.
- Download the source for the firmware that we want to build.
- Compile the program.
GnuArm Toolchain
First, you'll need to download and install an appropriate toolchain to compile firmware for the Make Controller. For the Make Controller, there are a couple options, but this how-to goes over how to install a free GNU toolchain that targets ARM processors like the Make Controller. There are a couple pre-built toolchains out there (otherwise you can try to build one from source yourself if you're feeling lucky). WinARM is a good option, but because it doesn't include a convenient installer we'll focus this how-to on YAGARTO, another Windows-based toolchain maintained by Michael Fischer.
In order to create programs for the Make Controller, we'll need to download 2 things:
- YAGARTO Tools - standard tools like make, sh, etc. if you don't already have them installed.
- YAGARTO GNU ARM toolchain - GnuArm specific tools like arm-elf-gcc (compiler), arm-elf-gdb (debugger), arm-elf-ld (linker).
Firmware Source
Then we'll of course need to download the source code for the firmware that we want to build. The easiest place to start is usually to download the source for Heavy, the default firmware on the Make Controller. The easiest way to do this is to download the latest release of Heavy on the Downloads page. Otherwise, you can check the latest version of the code out from the MakingThings Subversion repository on SourceForge.
Compile
Once you have the source downloaded, open up a command prompt, navigate to the directory with the Heavy source code in it, and type make. This should create a file called heavy.bin in the outputs directory. This is the file that you'll want to upload to the Make Controller. Alternatively, you can use an IDE like Eclipseto work with the code for the Make Controller.
Discussion
The nice thing about YAGARTO and WinARM is that they don't require Cygwin, which can introduce a bunch of complications to your system.For breakpoint debugging, we'll need to install a few more things - check the debugging tutorial for more info.
Shopping Cart