Teensy

platform = teensy

Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard USB cable and a PC or Macintosh with a USB port.

For more detailed information please visit vendor site.

Configuration

USB Features

If you want to use Teensy USB Features, you need to add special macro/define using build_flags:

  • -D USB_SERIAL

  • -D USB_KEYBOARDONLY

  • -D USB_TOUCHSCREEN

  • -D USB_HID_TOUCHSCREEN

  • -D USB_HID

  • -D USB_SERIAL_HID

  • -D USB_MIDI

  • -D USB_MIDI4

  • -D USB_MIDI16

  • -D USB_MIDI_SERIAL

  • -D USB_MIDI4_SERIAL

  • -D USB_MIDI16_SERIAL

  • -D USB_AUDIO

  • -D USB_MIDI_AUDIO_SERIAL

  • -D USB_MIDI16_AUDIO_SERIAL

  • -D USB_MTPDISK

  • -D USB_RAWHID

  • -D USB_FLIGHTSIM

  • -D USB_FLIGHTSIM_JOYSTICK

  • -D USB_EVERYTHING

  • -D USB_DISABLED

A default macro is set to -D USB_SERIAL if no one is specified.

Example:

[env:teensy_hid_device]
platform = teensy
framework = arduino
board = teensy20
build_flags = -D USB_RAWHID

See Teensy USB Examples.

Examples

Examples are listed from Teensy development platform repository:

Debugging

PIO Unified Debugger - “1-click” solution for debugging with a zero configuration.

Supported debugging tools are listed in “Debug” column. For more detailed information, please scroll table by horizontal. You can switch between debugging Tools using debug_tool options.

External tools

Boards listed below are compatible with PIO Unified Debugger but depend on external debugging tools. See “Debug” column for compatible debugging tools.

ID

Name

Debug

MCU

Frequency

Flash

RAM

teensy31

Teensy 3.1 / 3.2

J-LINK

MK20DX256

72MHz

256KB

64KB

teensy35

Teensy 3.5

J-LINK

MK64FX512

120MHz

512KB

192KB

teensy36

Teensy 3.6

J-LINK

MK66FX1M0

180MHz

1MB

256KB

teensylc

Teensy LC

J-LINK

MKL26Z64

48MHz

62KB

8KB

Stable and upstream versions

You can switch between stable releases of Teensy development platform and the latest upstream version using platform option as described below:

; Custom stable version
[env:stable]
platform =teensy@x.y.z
board = ...
...

; The latest upstream/development version
[env:upstream]
platform = https://github.com/platformio/platform-teensy.git
board = ...
...

Packages

Name

Description

framework-arduinoteensy

Arduino Wiring-based Framework

framework-mbed

mbed Framework

tool-teensy

Teensy Loader

toolchain-atmelavr

avr-gcc

toolchain-gccarmnoneeabi

gcc-arm-embedded

Warning

Linux Users:

Windows Users:

Teensy programming uses only Windows built-in HID drivers. When Teensy is programmed to act as a USB Serial device, Windows XP, Vista, 7 and 8 require this serial driver is needed to access the COM port your program uses. No special driver installation is necessary on Windows 10.

Frameworks

Name

Description

Arduino

Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.

mbed

The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.

Boards

Note

Teensy

ID

Name

Debug

MCU

Frequency

Flash

RAM

teensy20

Teensy 2.0

No

ATMEGA32U4

16MHz

31.50KB

2.50KB

teensy20pp

Teensy++ 2.0

No

AT90USB1286

16MHz

127KB

8KB

teensy30

Teensy 3.0

No

MK20DX128

48MHz

128KB

16KB

teensy31

Teensy 3.1 / 3.2

Yes

MK20DX256

72MHz

256KB

64KB

teensy35

Teensy 3.5

Yes

MK64FX512

120MHz

512KB

192KB

teensy36

Teensy 3.6

Yes

MK66FX1M0

180MHz

1MB

256KB

teensylc

Teensy LC

Yes

MKL26Z64

48MHz

62KB

8KB