Legacy project help: I need GCC toolchain for Teensy 3.2, but can't find it!

kc5tja

New member
I'm working on a project which uses a legacy Teensy 3.2 board for its microcontroller. I need to locate a version of GCC and relevant utilities for Linux which I can use from command-line. After reviewing available online references, literally all I could find was either the AVR-only version of avr-gcc, the ARM version of GCC (arm-none-eabi-*), or the Teensyduino package, but this appears to be specifically built as a plug-in for the Arduino IDE. Arduino's IDE is nice but too limiting; I need the ability to invoke a gcc build sequence from a Makefile. Upgrading to Teensy 4.1 is not an option for us (yet) because of our inventory of Teensy 3.2s.

What am I missing? Does anyone have any additional resources I can check besides PJRC's current web materials?

Thanks in advance for any help.
 
Teensyduino comes with a sample makefile. Your easiest path to get it to download Arduino 1.8.19 and Teensyduino 1.58. Extract Arduino, then run the installer to add all the files into the Arduino folder. Once installed (you don't need to actually run the Arduino IDE), look for the makefile in hardware/teensy/avr/cores/teensy4 or hardware/teensy/avr/cores/teensy3 (there are 2 sample makefiles, one for Teensy 4.x and the other for Teensy 3.x). You should be able to just run "make" in either folder and it will use the toolchain to build all the core library and a minimal LED blink program. You can info inside the makefile about which folders from the Arduino IDE install its using and which others you can delete if you never wish to run the Arduino IDE.

If you just want to toolchain (as you originally asked) without everything set up in a working manner, the good news is with Arduino IDE 2, the toolchain and other parts are published as separate downloads. You'll need to download the JSON file that's normally copied into Arduino preferences. Inside you can find the URLs for the toolchain and other stuff. If you just read the JSON text, it should be pretty easy to figure out, but if something is unclear Arduino does have an official specification for how it's intended to work. Once you find the URL inside the JSON, just use a browser or wget to download the toolchain.

You will also need at least the core library code to build programs for Teensy. Its URL is also in the JSON, but only 1 URL rather than 6 for the various PC platforms. The code is also on github,

https://github.com/PaulStoffregen/cores

I'm sure you already know this, but just in case, to use Teensy with Linux you must install the udev rules file.
 
Teensyduino comes with a sample makefile. Your easiest path to get it to download Arduino 1.8.19 and Teensyduino 1.58.

...

You will also need at least the core library code to build programs for Teensy. Its URL is also in the JSON, but only 1 URL rather than 6 for the various PC platforms. The code is also on github,

https://github.com/PaulStoffregen/cores

I'm sure you already know this, but just in case, to use Teensy with Linux you must install the udev rules file.

This is very helpful. Thank you! This is exactly what I was looking for.
 
Back
Top