Skip to content

A template for building firmware for Texas Stellaris ARM microcontrollers

Notifications You must be signed in to change notification settings

JamesGlanville/reverse_geocache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stellaris Template

Toolchain

Dependencies:

  • 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

Writing and Building Firmware

NOTE: This is only tested with the LM4F120H5QR, which is the target on the Stellaris Launchpad.

  1. Clone the stellaris-template repository (or fork it and clone your own repository).

     git clone git@github.com:uctools/stellaris-template
    
  2. 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)
  3. Run make

  4. The output files will be created in the 'build' folder

Flashing

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

Credits

Thanks to Recursive Labs for their guide which this template is based on.

About

A template for building firmware for Texas Stellaris ARM microcontrollers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published