How compatible is PJRC's "The GCC Compiler and Tools" system with Arduino IDE?

Status
Not open for further replies.

wolfv

Well-known member
How compatible is PJRC's "The GCC Compiler and Tools" system with Arduino IDE?

Paul posted a "The GCC Compiler and Tools" on https://www.pjrc.com/teensy/gcc.html

I have a project that makes extensive use of the following Arduino libraries:
#include <Arduino.h>
#include <Wire.h>
#include <Keyboard.h>
#include <Mouse.h>
Can Paul's system use the Ardunio libraries?

I would like to keep my project compatible with the Arduino IDE (for the novice programmers).
Will the code that compiles on Paul's system also compile on Arduino IDE?

I will be using Teensy 2.0 and TeensyLC.

Thank you.
 
Paul's Teensyduino libraries, and others that are Teensy user contributed, are Arduino compatible. The Teensy 3 and LC are each ARM processors as you know. But Paul has slaved for a long time to make the majority of legacy AVR oriented code run unchanged on the ARM Teensy boards. I suggest skipping the Teensy 2 so you won't have the AVR's constrained RAM size.
The Teensy collection of libraries is very much a superset of the AVR type of Arduino libraries - to exploit the speed and added I/O devices that the ARM processors bring.

The Teensy uses the Arduino IDE with some enhancements.

There are other (free) and more sophisticated IDEs available if you wish.
 
Hi stevech. Thank you for the quick response.

I am currently using Arduino IDE on Teensy 2.0. But ran into a limitation of Arduino IDE.
Aruduino IDE can only #include files that are in Arduino\libraries\, and I need to include a file that has a relative path from the sketch.
I plan to place a Makefile in the same folder as the sketch, and specify the include path in the Makefile.
Can Paul's "The GCC Compiler and Tools" Makefile be used in this way?
 
Last edited:
if you trade the <> for "" your relative include can work - sometimes trying relative paths doesn't go so flash for me but an explicit path works, eg.;
Code:
#include "/home/rob/Documents/libs/something-clever-i-did-earlier.h"
// or, for Windows etc
#include "c:\the\windows\path\clever-stuff.h"

Any good?
 
Thanks robsoles, that's what I needed to know.
I am going to give Paul's "The GCC Compiler and Tools" Makefile a try.
 
this is a free alternative as well, and can run with Teensyduino's libraries.
http://www.visualmicro.com/ (optional low cost debugger, hardware-less.)
It's a plug-in to MS VIsual Studio 2013 and later - which are now free.

Me/myself, I left Makefiles behind in the 90's.
 
I plan to place a Makefile in the same folder as the sketch, and specify the include path in the Makefile.
Can Paul's "The GCC Compiler and Tools" Makefile be used in this way?

For Teensy-LC, after installing Teensyduino, look at the same makefile in hardware/teensy/avr/cores/teensy3.

Teensy 3.0, 3.1 and LC use a completely different toolchain than Teensy 2.0 and Teensy++ 2.0, so you will want to started with that makefile & toolchain which is meant for the 32 bit chips.
 
Status
Not open for further replies.
Back
Top