gregd72002
New member
command line linux development without teensyduino - howto
Hi,
I thought it will be a good idea to share my experience with setting up development environment for Teensy LC (v3, should also work for v2) on linux without X nor any Java crazy stuff.
In the normal scenario you would install Arduino IDE and then Teensyduino. Both of them have dependencies on graphical interface. So here it is how to set it up using terminal.
(The following has been tested on Raspbian (Jessie))
At this stage you should be able to develop to Arduino but not for Teensy yet.
To add Teensy support:
All done. You should be now able to create a quick test:
All done!
Gregory
Hi,
I thought it will be a good idea to share my experience with setting up development environment for Teensy LC (v3, should also work for v2) on linux without X nor any Java crazy stuff.
In the normal scenario you would install Arduino IDE and then Teensyduino. Both of them have dependencies on graphical interface. So here it is how to set it up using terminal.
(The following has been tested on Raspbian (Jessie))
- install standard ardunio libraries (sudo apt-get install arduino-core)
- install arduino-makefile which allows you to compile project without the IDE (sudo apt-get install arduino-mk); ensure this is one of the latest version, it should include Teensy.mk file; otherwise it won't work
At this stage you should be able to develop to Arduino but not for Teensy yet.
To add Teensy support:
- install compiler (sudo apt-get install binutils-arm-none-eabi gcc-arm-none-eabi)
- navigate to /usr/share/arduino/hardware/tools where you should see a folder and create there the following symlinks "arm/lib" and "arm/bin" to "/usr/lib" and "/usr/bin" respectively
Code:cd /usr/share/arduino/hardware/tools sudo mkdir arm cd arm sudo ln -s ../../../../../bin sudo ln -s ../../../../../lib
- install teensy cores (https://github.com/PaulStoffregen/cores) into /usr/share/arduino/hardware/teensy/ directory
Code:cd /usr/share/arduino/hardware/ sudo mkdir teensy cd teensy sudo git clone https://github.com/PaulStoffregen/cores
- create boards.txt file in /usr/share/arduino/hardware/teensy/ (teensyduino 1.29 boards.txt is attached: View attachment boards.txt)
All done. You should be now able to create a quick test:
- create a new folder for your projectcd ~; mkdir project1; cd project1)
- create project.ino file as you would normally would (i.e. containing blink led code)
- create Makefile file with the following content (you might want to change the BOARD_TAG and remove F_CPU as this is only needed for teensyLC)
Code:BOARD_TAG=teensyLC F_CPU=48000000 USB_TYPE = USB_SERIAL include /usr/share/arduino/Teensy.mk
- run 'make' what should compile everything
- you can now flash it using teensy cli loader: https://www.pjrc.com/teensy/loader_cli.html
All done!
Gregory
Last edited: