Dependencies
brew install teensy_loader_cli
- Teensyduino: https://www.pjrc.com/teensy/td_download.html
git submodule update --init
Deploy
make upload
Debug
Comment line 15 and uncomment line 16 in the Makefile. Rebuild and upload. Connect to serial via
screen /dev/tty.usbmodem2470841 9600
or
make serial
Project started from the project template https://github.com/apmorton/teensy-template
An easy starting point for a Teensy 3.X project which might not fit inside the arduino build environment.
- You need to modify the teensy core
- You don't love Java IDE's
- You love Make
- Because
Install the Teensy udev rule: sudo cp tools/49-teensy.rules /etc/udev/rules.d/
Then unplug your Teensy and plug it back in.
- Put your code in
src/main.cpp
- Put any libraries you need in
libraries
- Set the TEENSY variable in
Makefile
according to your teensy version - Build your code
make
- Upload your code
make upload
make
alias formake hex
make build
compiles everything and produces a .elfmake hex
converts the elf to an intel hex filemake post_compile
opens the launcher with the correct filemake upload
uploads the hex file to a teensy boardmake reboot
reboots the teensy
- The
teensy3
sub-folder is taken from The Teensy 3 Cores - The
tools
sub-folder is taken from Teensyduino - The
src/main.cpp
file is moved, unmodified fromteensy3/main.cpp
- The
Makefile
file is moved, modified fromteensy3/Makefile
- The
49-teensy.rules
file is taken from PJRC's udev rules
Modifications to Makefile
include
- Add support for arduino libraries
- Change tools directory
- Calculate target name from current directory
- Prettify rule output
- Do not upload by default, only build