- flex
- bison
- libgmp3-dev
- libmpfr-dev
- libncurses5-dev
- libmpc-dev
- autoconf
- texinfo
- libftdi-dev
- python-yaml
- zlib1g-dev
To get all dependencies on Ubuntu:
apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev \
libmpc-dev autoconf texinfo build-essential libftdi-dev python-yaml \
zlib1g-dev
You will need an ARM bare-metal toolchain to build code for Stellaris targets.
You can get a toolchain for the Stellaris targets by using
summon-arm-toolchain. Add the
bin
folder to your path.
Once you've installed the ARM toolchain, add the binaries to your path.
The StellarisWare package contains all of the header files and drivers for
Stellaris parts. Grab the file SW-EK-LM4F12XL-9353.exe from
here and unzip it into a directory
then run make
to build StellarisWare.
unzip SW-EK-LM4F120XL-9453.exe
cd stellarisware
make
NOTE: This is only tested with the LM4F120H5QR, which is the target on the Stellaris Launchpad.
-
Clone the stellaris-template repository (or fork it and clone your own repository).
git clone [email protected]:uctools/stellaris-template
-
Modify the Makefile:
- Set TARGET to the desired name of the output file (eg: TARGET = main)
- Set SOURCES to a list of your sources (eg: SOURCES = main.c startup_gcc.c)
- Set STELLARISWARE_PATH to the full path to where you extracted and built StellarisWare (eg: STELLARISWARE_PATH = /home/eric/code/stellarisware)
-
Run
make
-
The output files will be created in the 'build' folder
The easiest way to flash your device is using lm4flash. First, grab lm4tools from Git.
git clone git://github.com/utzig/lm4tools.git
Then build lm4flash and run it:
cd lm4tools/lm4flash
make
lm4flash /path/to/executable.bin
Thanks to Recursive Labs for their guide which this template is based on.