Git Product home page Git Product logo

ee445m-cmake-lab-template's Introduction

ECE 380L.12/445M Labs

This project contains the lab starter code for ECE 380L.12/ECE 445M at the University of Texas at Austin taught by Andreas Gerstlauer and Jonathon Valvano. The original starter code is available on Dr. Valvano's website.

Getting Started

Linux Dependencies:

sudo apt install gcc-arm-none-eabi gdb-multiarch binutils-multiarch cmake
sudo apt install openocd
sudo apt install lm4flash

lm4flash is optional -- the flash script is configured to flash with OpenOCD for Windows compatibility.

Windows Dependencies:

Install the following dependencies:

  • CMake
    • Make sure to select add to path in the installer (either user or system path will work)
  • Ninja (or make)
    • Download latest ninja-win.zip from the official Github
    • Copy ninja.exe to C:\Program Files\CMake\bin\ (Or elsewhere in your path)
  • GNU Arm Embedded Toolchain (get latest gcc-arm-none-eabi-*-win32.exe)
    • Make sure to select "Add path to environment variable" at the last step
  • OpenOCD
    • Download Windows release from Github.
      • v0.11.0 and v0.12.0 worked for me. Earlier versions did not work, future versions probably should work.
    • Extract the contents of openocd-v0.12.0-i686-w64-mingw32.tar.gz to C:\openocd-v0.12.0 (7-Zip can be used to extract .tar.gz archives on Windows)
    • Add C:\openocd-v0.12.0\bin to your path.
  • Visual Studio Code

Set up Visual Studio Code:

Install vscode from Microsoft

Install these extensions:

  • C/C++
  • CMake
  • CMake Tools
  • Cortex-Debug

When you first open this project in VSCode, you will need to set the "CMake Kit" to TM4C Toolchain to select the installed arm-gcc compiler and set the CMake Generator to Ninja. You will also need to set the build variant (Debug) and build target (Test.elf). Once this has been done, you should be able run CMake: Configure and CMake: Build (ctrl-shift-P to open command palette). The shortcut ctrl-shift-B can be used to run the default build task (set in .vscode/tasks.json).

When working on a lab, you should set the active target in the bottom status bar to the executable for the lab you're currently working on. This prevents building the other labs at the same time. (ex: RTOS_Lab1_Interpreter.elf, RTOS_Lab2_RTOSkernel.elf, etc.)

Command Line Development

This project will work without VSCode if you want to use another text editor. To compile and flash from the command line:

mkdir build
cd build
cmake ..
make Test.elf
make flash

Or on Windows:

mkdir build
cd build
cmake -G "Ninja" ..
ninja Test.elf
ninja flash

Notes:

  • Lab 5 User code builds and launches, though the ELF loader seems to be leaking more memory when running the ELF generated by this project than when running User.axf from Keil.

ee445m-cmake-lab-template's People

Contributors

benmarsan avatar

Watchers

 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.