A complete repository for writing, compiling and flashing code for the TI Stellaris, along with a sample project. Based on a completely open-source toolchain, without the need to rely on cumbersome development environments.
Tested on OS X. Should work on most GNU/Linux/POSIX environments.
Follow the instructions in the next section to install the required packages.
-
Create a duplicate of this repository for you own local development by doing the following:
- Create a new github repository and name it to your liking. Make sure it is Private.
- Open terminal.
- Create a bare clone of the repository:
$ git clone --bare https://github.com/jishminor/ee445l-linux.git
- Mirror push to the new repository made in step i:
$ cd ee445l-linux.git $ git push --mirror https://github.com/exampleuser/your-repository.git
- Remove the temporary local repository you created in step iii:
$ cd .. $ rm -rf ee445l-linux.git
- Now navigate to a directory of your choice and clone your new repository:
$ git clone https://github.com/exampleuser/your-repository.git
-
In the root directory of your repo, run
$ bash setup.sh
to install all dependencies.
-
If prompted to override rwxr-xr-x root/admin for /usr/local/bin/lm4flash, enter y and press enter.
Hook up an unlocked TM4C via USB on the debug port (top). Move to the TestProject directory then build the project and flash by running:
$ cd TestProject
$ make flash
If all goes correctly, the blue LED should come on and your up and running!
The general workflow for beginning a new project is a follows:
- Create directory in git root directory corresponding to the lab you are working on (ie lab1, lab2, etc). To use the given gitignore, make sure it is all lower case.
$ mkdir lab1
- Copy over Makefile from the TestProject directory into the new lab directory.
$ cp TestProject/Makefile lab1/
- Run text editor of choice to modify lab1/Makefile, for example vim
$ vim lab1/Makefile
- Find the line
and change it to
PROJ_NAME = TestProject
PROJ_NAME = lab1
- Add all the starter files you need to the lab1 directory and get coding!
Good Practice: The shared directory is great to for placing the modules you write that can be shared across projects. There's already a few in there from ValvanoWare which you will find useful through the semester. To include files from this directory in your projects just place a
#include shared/your_file.h
at the top of a c file which you need the module in.
To build project in current directory:
$ make
To flash the TM4C:
$ make flash
To clean up the directory:
$ make clean
- Thanks to Christian Jann for his tutorial https://www.jann.cc/2012/12/11/getting_started_with_the_ti_stellaris_launchpad_on_linux.html