/teensy_bare_metal

Bare-metal Code Examples for the Teensy 3.1/3.2

Primary LanguageCApache License 2.0Apache-2.0

Bare-metal Code Examples for the Teensy 3.1/3.2

This repository contains bare-metal (no Arduino compatibility) C code written from scratch based on the reference manuals. It's aimed to be heavily commented to allow a smooth start for C-developers diving into embedded coding with the Teensy.

The code is split into two parts:

  • common contains general-purpose/framework code, Makefile, linker script etc. shared amongst the different examples.
  • src has subdirectories with different examples.

To start experimenting yourself, simply create a new subfolder in src and create a symlink Makefile -> ../../common/Makefile.

Prerequisites

  • GNU make
  • GCC arm-none-eabi
  • libusb (for teensy_loader_cli)

On Debian/Ubuntu, the following should install the necessary requirements:

apt-get install build-essential gcc-arm-none-eabi libusb-dev

If you did not use --recursive when cloning, don't forget to init submodules (for teensy_loader_cli):

git submodule init
git submodule update

You should now be able to run make build in any of the examples in src. Use make load to also load the resulting hex file with teensy_loader_cli.

Reading Material