Build Firmware With Eclipse
This How-to is intended for:
Microcontroller Developers
Use Eclipse (a free development environment) to create programs for the Make Controller Kit.
Problem
You want to use the free and open source Eclipse IDE to build firmware for the Make Controller. The latest version of Eclipse at the time of this writing is 3.4 - you find that you need to slightly adjust the instructions for later versions.Eclipse is a great open source option for creating firmware for the Make Controller
Solution
Overview
The steps to set up a development environment with Eclipse are:- Install the GnuArm tools that you need to compile firmware on your platform.
- On OS X, download and run the GnuArm installer from the Downloads section.
- On Windows, check this how-to.
- On Linux, follow the link from the Downloads section. Once you've unpacked it, be sure to add the arm/bin directory within to your system PATH - adding a link from /usr/bin or /usr/local/bin can work well.
- Download Eclipse.
- Download the Make Controller source code.
- Create and configure your project.
Download Eclipse
Eclipse was originally a tool for Java, but now supports building projects in many different languages. In order to build code for the Make Controller, we'll need to grab appropriate version of Eclipse to build projects in C, and a GNU toolchain to build executables for the Make Controller.
At the Eclipse downloads page, select Eclipse IDE for C/C++ Developers and select a mirror near you to being your download.
Download the Make Controller Source Code
The easiest place to start is usually by building Heavy (the default firmware on the Make Controller) and starting to make modifications to create your own project. To do this, either grab the latest firmware source download from the Downloads section or check out the very latest code via Subversion (brief overview in the Downloads section). The projects folder, not surprisingly, is where you'll want to create your new projects.Create and Configure Your Project
First, Eclipse will ask you which workspace you want to open - it doesn't matter much so just put whatever you like.Then we need to create a new Eclipse project:
- Click File -> New -> Project
- Then under C, select C Project
- For Project name, choose whatever you like and then, un-click Use default location, click Browse, and select the firmware directory that you downloaded. If Eclipse does not automatically add the name of your project onto the end of the Location field, make sure you do that yourself.
- Click Finish and Eclipse will create the empty directory myproject within the projects folder.
- Copy over a few files from the heavy project folder into your myproject folder: make.c, config.h, Makefile and the output folder.
The New Project dialog.
Now we need to configure our project slightly:

The Project Properties dialog.
- Click Project -> Properties from the menu bar.
- First, click on C/C++ Build in the lefthand column
- In the Build Location section, click Workspace and then select your myproject folder. If your myproject folder is not in the directory you specified as your Workspace, click on the File system button and navigate to it from there.
- You should be able to leave the Builder section as is. If you have some trouble, you might try deselecting Use default, and specifying the full path to your make executable.
- In the Behaviour tab, I always like selecting Stop on first build error in the Build Setting section, but this is not crucial.
- Click OK.
The Project Properties dialog.
Now we should be all set to build the firmware. Back in the Eclipse C/C++ perspective, click Project -> Build All from the menu bar, or just hit Command-B (Apple-B on OS X). You will have produced a brand new heavy.bin file in the output directory. This is the file you can now upload to your Make Controller using mchelper.
Discussion
Make sure to check the Programming tutorial for more details on writing code for the Make Controller.