Skip to content

A template for building firmware for Texas Stellaris ARM microcontrollers

Notifications You must be signed in to change notification settings

catabriga/tiva-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiva 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 Tiva targets. You can get a toolchain from the gcc-arm-embedded project that is pre-built for your platform. Extract the package and add the bin folder to your PATH.

The TivaWare package contains all of the header files and drivers for Tiva parts. Grab the file SW-TM4C-1.1.exe from here and unzip it into a directory then run make to build TivaWare.

mkdir tivaware
cd tivaware
unzip SW-TM4C-1.1.exe
make

Note: for the Tiva Connected Launchpad get SW-EK-TM4C1294XL-2.1.0.12573.exe.

Writing and Building Firmware

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

    git clone [email protected]:uctools/tiva-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 TIVAWARE_PATH to the full path to where you extracted and built TivaWare (eg: TIVAWARE_PATH = /home/eric/code/tivaware)
  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

Debugging with gdb

These chips are supported in openocd HEAD (credit to Karl Palsson). The openocd website has instructions on how to install it.

With openocd installed, run gdb with this command:

arm-none-eabi-gdb -ex 'target extended-remote | openocd -f board/ek-tm4c1294xl.cfg -c "gdb_port pipe; log_output openocd.log"; monitor reset; monitor halt'

lmicdi can also support gdb but it appears openocd has better support for breakpoints and source-level debugging right now. You may want to check back later for updates on the situation.

Credits

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

Thanks to Rob Stoddard for digging into the issue on soft FP versus hardware FP.

About

A template for building firmware for Texas Stellaris ARM microcontrollers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.5%
  • Makefile 10.5%