Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Teensy 3.x Compiler?

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Location
    Melbourne, FL
    Posts
    1

    Teensy 3.x Compiler?

    I'm a huge fan of the Teensy/Teensy++ 2.0 (developing with C) and am eager to work with the Teensy 3.x but I'm confused about the compiler toolchains. -- I've been studying the product pages but haven't been able to figure out the suggested toolchains.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,540
    For Teensy 3.X, the only toolchain is in the Teensyduino installer.

    http://www.pjrc.com/teensy/td_download.html

    Run the installer. You don't have to ever use Arduino, but I recommend at least using Arduino to upload the LED blink and make sure everything works.

    Inside hardware/teensy/cores/teensy3 is a sample makefile. See the comments regarding the toolchain directory. You can delete the rest of Arduino.

    Sometime next year I'm going to make a C-only download without Arduino. Until then, you have to get it by installing into Arduino and then grab the parts you want.

  3. #3
    Would be nice to have a C download with a sample makefile to get people started. Also, some code samples on how to manipulate ports, timers and UART / SPI would be nice.

    I'm planning to make an SD Music Player with an HifyBerry DAC+ Pro which has an I2S interface. For that I require a Teensy 3 (which has I2S on board). I'm currently still using Teensy 2 (AVR), but more and more boards are requiring 3.3V, so I'm gonna have to switch sometime in the future.

  4. #4
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    494
    To be clear, you have that, there is a sample makefile in the Teensy core:
    https://github.com/PaulStoffregen/co...master/teensy3

    You can also download the latest ARM gcc and use it instead of the one included with Teensyduino:
    https://developer.arm.com/open-sourc...olchain/gnu-rm

    I use hand coded makefiles or cmake for all of my projects. They all have unique requirements and I need to be able to lock down the Teensy configuration (processor, CPU speed, F_BUS) and modify some of the "core" libraries, like hardware serial, to use larger buffers. Using makefiles lets me keep those changes project specific and then also keep a clean Arduino/Teensyduino install for developing libraries, tutorials, or doing quick prototyping.

    The standard Teensy cores will require C++, but I've managed to create a C only version as well (with a lot of lost functionality - the C only version only supports chip startup, analog read/write, eeprom, hardware serial, and usb serial).

  5. #5
    Senior Member
    Join Date
    Jan 2013
    Posts
    180
    Quote Originally Posted by PaulStoffregen View Post
    Sometime next year I'm going to make a C-only download without Arduino.
    For what purpose?

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,212
    Quote Originally Posted by markonian View Post
    For what purpose?
    Note the date of posting 2013

  7. #7
    Senior Member
    Join Date
    Jan 2013
    Posts
    180
    LOL. Thank you KurtE! That is very good advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •