My scripts for compiling and uploading to teensies. Your mileage may vary.
This makefile requires the following programs and binaries to be installed on your system for operation:
For arduino code compilation:
- Arduino Software IDE (make sure to get <= 1.6.12!)
- Teensyduino beta
For C/C++ code and MicroPython:
- gcc-arm-embedded
For MicroPython code compilation:
For all code:
Once all pre-requisites have been installed, clone this repository and run the setup script
sudo python setup.py install
There are two ways to use this library either as a script:
pyteensy --upload -p my_project -d teensy31
or use the utilities from within python:
from pyteensy import list_devices
latest_hex = find_hexes()
teensies = list_devices()
for teensy in teensies:
upload_latest(teensy, latest_hex)
If you get an error message like:
/bin/sh: tyc: not found
Make sure the directories are in your PATH environment variable, without using the tilda (~) shortcut. Python cannot handle these shortcuts. You must set your environment variables as:
PATH=$PATH:$HOME"/arduino-builder/"
PATH=$PATH:$HOME"/ty/build/linux"
If you get an error message like:
Warning: Board teensy:avr:teensy32 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY32
fork/exec ~/installed/arduino-1.6.12/hardware/teensy/../tools/: permission denied
You specified a device that doesn't exist. For example, you used -d teensy32 for the teensy 3.2 when you should have used -d teensy31.