Coder Social home page Coder Social logo

tiva-template's Introduction

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.

tiva-template's People

Contributors

davidhubbard avatar ericevenchick avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.