Teensy project template for Eclipse 4

Status
Not open for further replies.

TimJ

Member
Hei everyone,

I developed a basic template project for Eclipse. As I develop in both Linux and Windows, I wanted it to compile as easy as possible on both systems.

https://github.com/TimJay/teensy_template

All you need to do to get going are these steps:
1. Install GNU ARM Eclipse Plug-in from http://gnuarmeclipse.livius.net/blog/plugins-install/ into Eclipse CDT (I use 4.4/Luna)
2. Add an environment variable 'TEENSYDUINO_ROOT' pointing to the teensyduino directory (the arduino directory with teensyduino applied)
3. Clone the git repository 'https://github.com/TimJay/teensy_template.git'
4. Copy the 'teensy_template' directory to your workspace
5. Rename the directory and any occurences in '.project' and '.cproject' if you like.
6. Copy the directory '$TEENSYDUINO_ROOT/hardware/teensy/cores/teensy3' into the project root as 'teensy3'
7. Import project into Eclipse workspace
(8. On Linux link 'make' and 'echo' into '$TEENSYDUINO_ROOT/hardware/tools/arm-none-eabi/bin' (the project only uses that folder as 'PATH'))

It would be nice to get some feedback if this works for you out there. Hope this is of help.


Cheers
Tim
 
Last edited:
Instructions are a bit too vague. I've used Eclipse in the past. It just needs a simpler installation procedure. A script, or equiv. Like #1 assumes too much.
 
Last edited:
Are there specific reasons you are not using the Arduino Eclipse plugin or better the Arduino Eclipse IDE ?
 
I work on Eclipse 4.4 and ran into issues with the avr plugin and Arduino Eclipse.
Regarding simplicity, I think the instructions on the ARM Eclipse home page are rather detailed. I added the Eclipse version used, though.
The git repository is just a simple Eclipse project which is pre-setup for Teensy 3.1 use, rather basic. When you have things set up once, it's just a matter of copying the folder and some batch renaming to get a fresh project up and running.
 
Edits for those not up on all the jargon, and assumptions about familiarity with Eclipse for ARM... maybe this helps...

Hei everyone,

I developed a basic template project for Eclipse. As I develop in both Linux and Windows, I wanted it to compile as easy as possible on both systems.

https://github.com/TimJay/teensy_template

All you need to do :p to get going are these steps:
Added clarifications....

0a. Install Oracle Java run time for your computer's operating system. It may be already installed but out of date. http://java.com/en/download/index.jsp

Eclipse "CDT" = (C/C++ Development Tooling)
------------Confusion: install Eclipse Standard 4.4 or Eclipse CDT? What IS "CDT"? It's Eclipse for C/C++ developers, vs. other languages. So don't bother installing Eclipse "Standard".
0b. Install Eclipse "CDT" version, at this time, it's version 4.4 called Luna. http://www.eclipse.org/cdt/downloads.php which leads to http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/lunar (note the "lunar" typo.)
The download installed Eclipse Luna with CDT in the folder you defined. Does not add to "start menu" or the Linux equivalent (no installer). Click on "eclipse.exe" in the folder and it should launch then spend while grinding and initializing. Then a welcome screen. I just exited that without working with Eclipse Luna CDT for the host platform.

1. Install GNU ARM Eclipse Plug-in from http://gnuarmeclipse.livius.net/blog/plugins-install/ into Eclipse CDT (I use 4.4/Luna)

Read slowly, re-read, this: http://gnuarmeclipse.livius.net/blog/plugins-install/ (skip down to the section heading "install plug-ins". In Eclipse CDT, choose support for all ARM types you might wish to target now/later. Click NEXT then accept the license then FINISH

2. Add an environment variable 'TEENSYDUINO_ROOT' pointing to the teensyduino directory (the arduino directory with teensyduino applied)
Example, in Windows: Start menu, type in: "edit system env" to get to the environment variables editor. Add TEENSYDUINO_ROOT. I guessed that the value is C:\Arduino which is my Arduino 1.05 with Teeny's downloaded add-on's. This is confusing in (2) above, the term "applied" isn't clear. Mine looked like:
Grab1.jpg
3. Clone the git repository 'https://github.com/TimJay/teensy_template.git'
well now. This is new for meebee. That URL goes to a page with a "clone" button on the right side of the window.
grab1.jpg
Desktop? That's a place on my screen. Oh, maybe it means the Github Desktop software that I already have installed.
The button yields a screen seemingly asking to install Github, I guess. I already have that. The term, below "For Windows 2.0" is almost funny until you read between the lines.
grab1.jpg
I don't remember Windows 2.0. :rolleyes:
Since I already have Github Desktop installed but don't know how to use it, OMG, am I on a tangent to a prerequisite class that I didn't think was needed for the Eclipse majors?

All righty then, I'm working on instruction #3 and am at a dead end for lack of experience with github which is a tangent to getting Eclipse ARM Freescale going.
So, I'll try the Download Zip button. Save that to a new folder in the new Eclipse Luna folder. I guess. Guessing in this kind of stuff rarely works. We'll see...
I extract the zip, yielding a new folder. I wonder where that goes? There's an ".md" file. It says
Clone this repository `https://github.com/TimJay/teensy_template.git` using either `git` or egit from within Eclipse and import it as a project. In order to rename the project, it should be sufficient to rename the directory and replace any occurence of "teensy_template" within `.project`/`.cproject` before importing.
Yeah! I know how to do that as an Eclipse ARM newbie! Er, Not.

Trail's end. Guessing.
Now at 1.5 hours.

Maybe later.
Maybe OP will rain sympathy and help.
Maybe a few glasses of wine.
4. Copy the 'teensy_template' directory to your workspace
5. Rename the directory and any occurences in '.project' and '.cproject' if you like.
6. Copy the directory '$TEENSYDUINO_ROOT/hardware/teensy/cores/teensy3' into the project root as 'teensy3'
7. Import project into Eclipse workspace
(8. On Linux link 'make' and 'echo' into '$TEENSYDUINO_ROOT/hardware/tools/arm-none-eabi/bin' (the project only uses that folder as 'PATH'))

It would be nice to get some feedback if this works for you out there. Hope this is of help.


Cheers
Tim
 
This answer is properly not for this thread but I spend half a day trying to get Eclipse to compile and download Teensy 3.1 with no luck, finally installed Sublime Text with Stino plug in and worked the first time, I understand that Sublime Text is not freeware but having a functional working editor is worth the price.

Cheers!
 
Did you try the Arduino Eclipse plugin or better the Arduino Eclipse IDE ?

There are some installation instructions here

Works fine for me and is a real IDE, not just an Editor, even though I have to admit that Sublime's abilities as an editor are pretty awesome.
 
Hei everyone,

I developed a basic template project for Eclipse. As I develop in both Linux and Windows, I wanted it to compile as easy as possible on both systems.

https://github.com/TimJay/teensy_template

All you need to do to get going are these steps:
1. Install GNU ARM Eclipse Plug-in from http://gnuarmeclipse.livius.net/blog/plugins-install/ into Eclipse CDT (I use 4.4/Luna)
2. Add an environment variable 'TEENSYDUINO_ROOT' pointing to the teensyduino directory (the arduino directory with teensyduino applied)
3. Clone the git repository 'https://github.com/TimJay/teensy_template.git'
4. Copy the 'teensy_template' directory to your workspace
5. Rename the directory and any occurences in '.project' and '.cproject' if you like.

Please be much clearer about this instruction. Are you saying we can change "teensy_template" to another name, and where this old name
appears in .project and .cproject? Why would I want to do this? Am I renaming this once? I don't know what a eclipse template is so
I have no idea why I'm doing this. Can I assume that when I open Eclipse on my workspace it will scan into this directory?

6. Copy the directory '$TEENSYDUINO_ROOT/hardware/teensy/cores/teensy3' into the project root as 'teensy3'

Do you mean into my workspace directory? If so why not be consistent? Isn't project root same as workspace directory?


7. Import project into Eclipse workspace
(8. On Linux link 'make' and 'echo' into '$TEENSYDUINO_ROOT/hardware/tools/arm-none-eabi/bin' (the project only uses that folder as 'PATH'))

What do you mean "import project"? There is no such functionality under the Project. There's a File::Import but that makes no sense.

I'm trying to get this to work on Linux.

what do you mean "make and echo? Do you mean copies these executable files from where they normally lie and into this directory?

Can you explain which of these changes will help Eclipse find and download the code to the teensy 3.1 target on a USB port?
 
Hei Timbo,

all this is now superseded by PlatformIO, a really great cross-platform build framework for embedded systems.
Just install PlatformIO on your system, create a new folder for your project. In that folder run:
$ platformio init --board=teensy31 --ide=eclipse
To compile your project, you simply use"
$ platformio run
To upload the generated binary to the Teensy run:
$ platformio run --target upload

Because the use of PlatformIO is easier and more flexible, I won't go into further detail on the use of the old template.


Greetings
Tim
 
Hei Timbo,
Because the use of PlatformIO is easier and more flexible, I won't go into further detail on the use of the old template.

Greetings
Tim

This was extremely helpful. thanks TimJ.

I followed the install instructions and it all went very smoothly. I don't see anywhere on the platformio.org site to ask questions specific to platformio, do you know where to seek help other than here?

thanks
 
Status
Not open for further replies.
Back
Top