.c files to teensy 3.x

Status
Not open for further replies.
Hi,
Is there a way I can program teensy 3.x models with avr-gcc, and not arduino?
I want to practice avr-gcc and I want to use teensies as the primary platform.
 
Probably not, avr-gcc is gcc for an AVR processor such as used in an Arduino Uno or Mega...

The Teensy 3.x boards are ARM based boards, so require a different compiler. You can build programs for the Teensy using the ARM based compiler, that is installed with Teensyduino. You can also use makefiles to build with this compiler and the like. There are also setups that allow you to use other IDEs and the like, including a Visual Studio setup or using Eclipse,, or ...

Not sure what you mean when you say you wish to practice avr-gcc? If you are saying you wish to practice C or C++ programming than yes you can do this.

If you wish to practice doing stuff specific for AVR processors, than you can do some of this with a Teensy as Paul has done a good job of emulating a lot of the AVR registers and the like, to map them to the ARM setup, but there are differences.

Again sorry I am not sure what you are really asking?
 
No, it's the answer I wanted, thanks!
So I have to install a different compiler? Like, one for ARM, not AVR?
I did a quick google search and the ARM toolchain is called arm-gcc-none-eabi.
Is this the correct one?
 
Probably the simplest way to figure some of this stuff out is to install Arduino like Arduino 1.8.1 and the latest Teensduino and try it out. If you go to preferences and turn on verbose mode during compilation. You will see things like:

If you are building for Teensy 3.2 - D:\arduino-1.8.1\hardware\teensy/../tools/arm/bin/arm-none-eabi-gcc-ar

So yes...
 
The Teensy toolchain is based on the GNU ARM Embedded Toolchain. You can use the version that's installed by Teensyduino. It's under 'arduino/hardware/tools/arm'. Or you can download a new one.

Under the hoods, Arduino is just bunch of C and C++. If you want to exclude C++ for some reason, the core Teensy functionality is implemented in C and has C++ wrappers for Arduino compatibility (look under 'arduino/hardware/teensy/avr/cores/teensy3').
 
Status
Not open for further replies.
Back
Top