Boilerplate code to compile, run, and debug an embedded program running on the EK-TM4C123-GXL chip (a.k.a. the Tiva C Series Launchpad). This boilerplate contains:
- A
Makefileto compile (make all), flash (make flash), or debug your project (make debug) using GDB - A YouCompleteMe config file for Vim users wanting to have intelligent autocompletion and other excellent IDE-like features
- An example
blinkyproject to show how the boilerplate fits together
This is platform-independent and makes use of the free libraries supplied by TI as well as these open-sourced tools:
-
lm4tools for flashing
-
OpenOCD for creating a GDB bridge (recommend you install this via your package manager, the
Makefileassumes the executable and board configs are in your path, which your package manager will do by default) -
GDB to provide us with all the useful debugging tools you'd normally find in an IDE. I'd recommend installing this via your package manager rather than installing from source (i.e.
homebrewfrom Mac OSX,apt-getfor Ubuntu, etc.) -
GNU ARM Cross Compiler for cross-compiling
Unfortunately, the current TI-implemented debugging bridge used in lm4tools
is not supported in Windows. According to the lm4tools README concerning the
lmicdiusb utility:
Works on all Linux, Mac OS X, and BSD systems. Currently not on Windows, due to the use of poll() which does not work for USB on Windows.
Newer versions of OSX will need to add libusb-1.0 to the package config path
in order for the makefile in lm4tools to properly build. Assuming you
installed libusb via Homebrew:
$ brew list libusb
...
several paths...
/usr/local/Cellar/libusb/<some_version_number>/lib/pkgconfig/libusb-1.0.pc
...
You'll need to add the path to the pkgconfig directory to the
PKG_CONFIG_PATH environment variable. Assuming you are using bash, simply
add the following line to your .bashrc:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/libusb/1.0.20/lib/pkgconfig
Then you should have no problem compiling the lm4tools tools. Watch those
version numbers in case libusb updates later on down the road!