Giter Club home page Giter Club logo

teensy-cmake's Introduction

teensy-cmake

Mac only! help make this work on other platforms. teensy-cmake is a template for Teensy projects that uses CMake to build your sketches. It is forked from https://github.com/xya/teensy-cmake and is intended to be simpler and also it works on Mac OS. This lets you develop for Teensy using your favorite text editor and terminal. I use Clion: https://www.jetbrains.com/clion/ which can easily import CMake projects. CLion is a great IDE and even has a Serial console plugin available so you never need to open the Arduino IDE again.

This has been tested on Mac OS 10.11.2 with a Teensy 3.2

Requirements- install newer/older versions at your peril!

Once all the above items have been installed it is probably a good idea to test out your Teensy with the Arduino app. Try uploading an example sketch.

Create a build directory:

Building

mkdir build
cd build

Run CMake:

cmake ..

Build with:

make -j main

Flashing sketches to the Teensy

make -j main_Upload

Custom configuration

For some sketches, the Teensy needs to run in a different 'USB mode'. You can set this in the sketch's CMakeLists.txt file:

set(TEENSY_USB_MODE MIDI)

add_teensy_executable(...)

You can set the 'default' mode in the CMake GUI ('TEENSY_USB_MODE' variable).

Importing libraries

Here is a simple example of how to import a library:

import_arduino_library(Bounce)

add_teensy_executable(...)

teensy-cmake's People

Contributors

drichelson avatar xya avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.