New Arduino Eclipse Plugin V2.2 and Arduino Eclipse IDE

Status
Not open for further replies.
Things I see in that GCC command line

C:/arduino-1.5.2
Seems wrong. Should be using Arduino 1.0.5 for Teensy 3.x

-DARDUINO=152
Teensy 3.x needs Arduino 1.0.5 not 1.5.2

-DF_CPU=
is blank. I think it should be
-DF_CPU=96000000

Compare all this to what shows for Teensy 3.0's command line.

The boards.txt file has entries for Teensy3.1 but I don't know how that file is parsed and used.

I really like Eclipse for Teensy 2. I, frankly, ran out of patience trying to cope with the flawed adaptation for Teensy 3.0 and 3.1 which requires the older Arduino version, and other differences.
 
Last edited:
Fixed the 3.1 problem by editing the boards text and replacing the Teensy 3.1 parts with the fixed config:


Code:
teensy31.name=Teensy 3.1
teensy31.upload.protocol=halfkay
teensy31.upload.maximum_size=262144
teensy31.upload.maximum_ram_size=65536
teensy31.upload.speed=12000000
teensy31.upload.disable_flushing=true
teensy31.bootloader.path=undefined
teensy31.serial.restart_cmd=true
teensy31.serial.safe_baud_rates_only=true
teensy31.upload.tool=teensy_reboot
teensy31.build.mcu=cortex-m4
teensy31.build.cpu=cortex-m4
teensy31.build.option1=-mthumb
teensy31.build.option2=-nostdlib
teensy31.build.option3=-D__MK20DX256__
teensy31.build.cppoption1=-fno-rtti
teensy31.build.linkoption1=-mthumb
teensy31.build.linkscript=mk20dx256.ld
teensy31.build.architecture=arm-none-eabi
teensy31.build.command.gcc=arm-none-eabi-gcc
teensy31.build.command.g++=arm-none-eabi-g++
teensy31.build.command.ar=arm-none-eabi-ar
teensy31.build.command.objcopy=arm-none-eabi-objcopy
teensy31.build.command.objdump=arm-none-eabi-objdump
teensy31.build.command.size=arm-none-eabi-size
teensy31.build.core=teensy3
teensy31.build.noarchive=true
teensy31.build.elide_constructors=true
teensy31.build.gnu0x=true
teensy31.build.dependency=true
teensy31.build.time_t=true
teensy31.build.ldscript=teensy/all/cores/teensy3/mk20dx256.ld
#teensy31.build.linker_relaxation=true
teensy31.build.post_compile_script=teensy_post_compile
#teensy31.build.serial_number=true
teensy31.menu.usb.serial=Serial
teensy31.menu.usb.serial.build.define0=-DUSB_SERIAL
teensy31.menu.usb.hid=Keyboard + Mouse + Joystick
menu.usb.teensy31.hid.build.define0=-DUSB_HID
menu.usb.teensy31.hid.fake_serial=teensy_gateway
menu.usb.teensy31.serialhid=Serial + Keyboard + Mouse + Joystick
menu.usb.teensy31.serialhid.build.define0=-DUSB_SERIAL_HID
#menu.usb.teensy31.int_disk=Disk(Internal) + Keyboard
#menu.usb.teensy31.int_disk.build.define0=-DUSB_DISK
#menu.usb.teensy31.int_disk.fake_serial=teensy_gateway
#menu.usb.teensy31.int_disk.build.elfpatch=mktinyfat
#menu.usb.teensy31.sd_disk=Disk(SD Card) + Keyboard
#menu.usb.teensy31.sd_disk.build.define0=-DUSB_DISK_SDFLASH
#menu.usb.teensy31.sd_disk.fake_serial=teensy_gateway
menu.usb.teensy31.midi=MIDI
menu.usb.teensy31.midi.build.define0=-DUSB_MIDI
menu.usb.teensy31.midi.fake_serial=teensy_gateway
menu.usb.teensy31.rawhid=Raw HID
menu.usb.teensy31.rawhid.build.define0=-DUSB_RAWHID
menu.usb.teensy31.rawhid.fake_serial=teensy_gateway
menu.usb.teensy31.flightsim=Flight Sim Controls
menu.usb.teensy31.flightsim.build.define0=-DUSB_FLIGHTSIM
menu.usb.teensy31.flightsim.fake_serial=teensy_gateway
menu.speed.teensy31.96=96 MHz (overclock)
menu.speed.teensy31.48=48 MHz
menu.speed.teensy31.24=24 MHz
menu.speed.teensy31.96.build.f_cpu=96000000
menu.speed.teensy31.48.build.f_cpu=48000000
menu.speed.teensy31.24.build.f_cpu=24000000
menu.keys.teensy31.en-us=US English
menu.keys.teensy31.en-us.build.define1=-DLAYOUT_US_ENGLISH
menu.keys.teensy31.fr-ca=Canadian French
menu.keys.teensy31.fr-ca.build.define1=-DLAYOUT_CANADIAN_FRENCH
menu.keys.teensy31.xx-ca=Canadian Multilingual
menu.keys.teensy31.xx-ca.build.define1=-DLAYOUT_CANADIAN_MULTILINGUAL
menu.keys.teensy31.da-da=Danish
menu.keys.teensy31.da-da.build.define1=-DLAYOUT_DANISH
menu.keys.teensy31.fi-fi=Finnish
menu.keys.teensy31.fi-fi.build.define1=-DLAYOUT_FINNISH
menu.keys.teensy31.fr-fr=French
menu.keys.teensy31.fr-fr.build.define1=-DLAYOUT_FRENCH
menu.keys.teensy31.fr-be=French Belgian
menu.keys.teensy31.fr-be.build.define1=-DLAYOUT_FRENCH_BELGIAN
menu.keys.teensy31.fr-ch=French Swiss
menu.keys.teensy31.fr-ch.build.define1=-DLAYOUT_FRENCH_SWISS
menu.keys.teensy31.de-de=German
menu.keys.teensy31.de-de.build.define1=-DLAYOUT_GERMAN
menu.keys.teensy31.de-dm=German (Mac)
menu.keys.teensy31.de-dm.build.define1=-DLAYOUT_GERMAN_MAC
menu.keys.teensy31.de-ch=German Swiss
menu.keys.teensy31.de-ch.build.define1=-DLAYOUT_GERMAN_SWISS
menu.keys.teensy31.is-is=Icelandic
menu.keys.teensy31.is-is.build.define1=-DLAYOUT_ICELANDIC
menu.keys.teensy31.en-ie=Irish
menu.keys.teensy31.en-ie.build.define1=-DLAYOUT_IRISH
menu.keys.teensy31.it-it=Italian
menu.keys.teensy31.it-it.build.define1=-DLAYOUT_ITALIAN
menu.keys.teensy31.no-no=Norwegian
menu.keys.teensy31.no-no.build.define1=-DLAYOUT_NORWEGIAN
menu.keys.teensy31.pt-pt=Portuguese
menu.keys.teensy31.pt-pt.build.define1=-DLAYOUT_PORTUGUESE
menu.keys.teensy31.pt-br=Portuguese Brazilian
menu.keys.teensy31.pt-br.build.define1=-DLAYOUT_PORTUGUESE_BRAZILIAN
menu.keys.teensy31.es-es=Spanish
menu.keys.teensy31.es-es.build.define1=-DLAYOUT_SPANISH
menu.keys.teensy31.es-mx=Spanish Latin America
menu.keys.teensy31.es-mx.build.define1=-DLAYOUT_SPANISH_LATIN_AMERICA
menu.keys.teensy31.sv-se=Swedish
menu.keys.teensy31.sv-se.build.define1=-DLAYOUT_SWEDISH
menu.keys.teensy31.tr-tr=Turkish (partial)
menu.keys.teensy31.tr-tr.build.define1=-DLAYOUT_TURKISH
menu.keys.teensy31.en-gb=United Kingdom
menu.keys.teensy31.en-gb.build.define1=-DLAYOUT_UNITED_KINGDOM
menu.keys.teensy31.usint=US International
menu.keys.teensy31.usint.build.define1=-DLAYOUT_US_INTERNATIONAL

teensy31.build.use_archiver=false
teensy31.recipe.c.o.pattern="{compiler.sam.path}arm-none-eabi-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib  -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DTIME_T=1365449461 {build.define0} {build.define1} -MMD -D{software}={runtime.ide.version} {build.extra_flags} -mthumb  -D__MK20DX256__  {includes} "{source_file}" -o "{object_file}"
teensy31.recipe.cpp.o.pattern="{compiler.sam.path}arm-none-eabi-g++" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -fno-rtti -fno-exceptions -mcpu={build.mcu} -DF_CPU={build.f_cpu} {build.define0} {build.define1} -MMD -D{software}={runtime.ide.version} {build.extra_flags} -mthumb  -D__MK20DX256__  -felide-constructors -std=gnu++0x {includes} "{source_file}" -o "{object_file}"
teensy31.recipe.ar.pattern="{compiler.sam.path}arm-none-eabi-ar" -r "{build.path}/{archive_file}" {object_file} 
teensy31.recipe.c.combine.pattern="{compiler.sam.path}arm-none-eabi-gcc"  -Os -Wl,--gc-sections -mcpu={build.mcu} -mthumb "-T{runtime.hardware.path}/{build.ldscript}" -o "{build.path}/{build.project_name}.elf" {object_files} -L"{build.path}" -lm 
teensy31.recipe.objcopy.eep.pattern="{compiler.sam.path}arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep" 
teensy31.recipe.objcopy.hex.pattern="{compiler.sam.path}arm-none-eabi-objcopy" -O ihex -R .eeprom "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" 
teensy31.recipe.size.pattern="{compiler.sam.path}arm-none-eabi-size" -A "{build.path}/{build.project_name}.elf"

After this stuff builds fine (Although I did have to copy my libraries I was using from the 1.0.5 arduino libs folder to my custom libs folder).
 
Last edited:
@opcode
Thank you very much! It's great if someone contributes something back to the community. I will send this on to Jantje so he can include it in the official builds.

The fact that I forgot to mention that the Teensyduino libraries occurred to me last night. Just have not had the time to add it to the instructions!

@stevech,
There is nothing flawed in the adaption of Teensy 3 in the Eclipse plugin. Given the conversation further up in this thread I don't believe you are in any position to make that statement!
 
You're right. Instead of flawed I should have said that the installation and use required tasks have a few glitches. The above is the most recent.
But, with freeware, we value what people can do in their spare time.
 
Last edited:
@stevech
Here is a link to someone sharing his win 7 64 bit experiance. http://rlogiacco.wordpress.com/2014/01/24/stepping-up-in-arduino-development/
He states
The installation wasn’t issue-free though, but if read carefully the instructions on the official web site and Google a little bit about the issues you might encounter, you will get up and running in no time.
From what I see I think you have not configured the plugin. In other words told it where Arduino IDE is located.
Can you create a new sketch by pressing on the new sketch button?
 
thank you much! I'll re-read.
I had Eclipse-Juno with Arduino 1.5.2 working. I hope that user's experience can help with the vagueness on how to get Juno or Kepler working with Teensyduino 3 (ARM) - which must use the older Arduino 1.0.5.
Alas, first skimming, the URL points to a discussion of Arduino (AVR not ARM), and for Arduino 1.5.2.
 
Last edited:
I don't think re-reading another user experience that, as you have correctly discovered, is AVR based will help you in your case. You really need to post what still does not work, what error messages you are getting etc.

Opcode's experience shows that it can be installed relatively problem free.

Something I completely forgot to mention in the documentation is that the installation process as written only copies the Teensy tool chain files from Arduino 1.0.5 to Arduino 1.5.2. It does not copy any of the Teensyduino Library files.
 
Yeah I followed the Windows 7 instructions and when I was done I could have compiled and pushed anything to a teensy 3.0. The only problem was the teensy 3.1 part, which the changes I showed will fix the 3.1 compile problems. The instructions have to be followed exactly, the folder creation and copying of files is easy to mess up.

As you said the libraries are a problem, what is the recommended way of getting libraries into a project using eclipse? I have been copying the libraries I need into the custom library folder, which works fine.
 
I think that is the best practice as it keeps your Arduino 1.5.2 and Teensyduino things cleanly separated.
 
I have followed all the steps on your guide and am now in preferences defining the path of the Arduino IDE. I have on my computer 1.0.5 and 1.5.2. In this step should I select version 1.5.2 as the path in my applications folder?
 
So I chose 1.0.5 but it is saying this plugin is for Arduino 1.5.x and to use V1 of the plugin for earlier versions. Am i missing something? I may have messed up by following the 'install new software' steps instead of going straight to preferences. Should I uninstall the new software from bayens?
 
Sorry, my bad! You need to pick 1.5.2.

What software have you actually installed ? Insted of a separate installation of Eclipse and the plugin, you can get both integrated as the Eclipse Arduin IDE.

Which one of the instructions have you been following ?
 
Last edited:
ahh ok, that is why I thought we made the extension file for. Ive been following the eclipse IDE and plugin V2.2 instructions, hopped over to the extension file instructions after the first 4 steps, then back to plugin instructions up to step 9 and then changed the directories in 'preferences'. I have the arduino environment, I will test my teensy when I have the time later today. Although a little confusing, thanks for the instructions! I will most likely have questions then
 
Ok, I have my first question: How do I upload the blinky example to my teensy 3.0? What (if any) files need to be imported to my workspace? I set my workspace as the same location that my sketches were being saved originally
 
I did try doing that but the teensy 3.0 does not show up in the list of boards. I also cannot get the right board.txt file in its appropriate place
 
I am glad you did! You mentioned earlier that some of the instructions are confusing. I am open to suggestions as to what I can improve.

Your instructions at times can be confusing because some of them are unnecessary for specific applications. For example, I did all the steps as stated in your arduino eclipse plugin instructions as well as the teensy extension file instructions (minus the 'skip to step 9' part).

I am confused by these instructions: http://trippylighting.com/teensy-ar...ino-eclipse-ide-and-plugin-v2-2-installation/ only because the first part also says 'skip to step 9'. In what cases would you not install the arduino eclipse plugin?

Also, you should explicitly say to put the teensy extension file inside the arduino 1.5.2 hardware folder where the avr and sam folders are.

Other than that, I understood most of it pretty quickly. Can I now start asking general eclipse questions about my teensy projects on this thread or is there a better place to do it? Thank you so much by the way for taking the time to make a complete installation guide.

Edit: Maybe just completely erase the "Arduino Eclipse IDE" section as that may lead to confusion, unless you think it is necessary.
 
Last edited:
It would be awesome/wonderful/totally-good
If "someone" would keep a diary of a successful windows install of Eclipse for Teensy 3. Then revise this diary to be a concise set of instructions that do work (lacking a scripted installer as we wish for).
 
@chadder_all
Ah..thats why you mean. I agree that it is not entirely clear which instructions are exactly for what. I've thought about changing the instructions but I may just wait for a little while. See next paragraph. If you have general questions about the Arduino-Eclipse IDE you can ask these here. If I cannot answer them I'll refer you to the thread on the Arduino forum.

@stevech
What I am actually hoping for is that one of the next Teensyduino installations will support the newer Arduino 1.5.x IDEs so that one can just simply install the Arduino IDE and then Teensyduino as normal. Then a user will simply be able to download and unzip the Arduino-Eclipse IDE, set folder locations and thats it. That possibly confusing file moving and copying would then hopefully be a thing of the past.
 
@stevech
What I am actually hoping for is that one of the next Teensyduino installations will support the newer Arduino 1.5.x IDEs so that one can just simply install the Arduino IDE and then Teensyduino as normal. Then a user will simply be able to download and unzip the Arduino-Eclipse IDE, set folder locations and thats it.

I wonder if that's any time soon?
 
I'm not sure if this will be helpful, but if your running Windows vista or better, you can use the mklink command to make symbolic links to the correct directories instead of copying all the files and folders.

on my setup I created the following directory tree:
"C:\teensyclipse\hardware\teensy\all\"

I then created a symlink to the "cores" folder on my Arduino 1.0.x directory tree using the folllowing command:
Code:
mklink /d "C:\teensyclipse\hardware\teensy\all\cores" "C:\Program Files (x86)\Arduino\hardware\teensy\cores"

I then created the following directory tree:
"C:\teensyclipse\hardware\teensy\tools\"
and used the following command:
Code:
mklink /d "C:\teensyclipse\hardware\teensy\tools\windows" "C:\Program Files (x86)\Arduino\hardware\tools"

I then placed the boards.txt and platform.txt (found in this thread) in the "c:\teensyclipse\hardware\teensy\all" folder.

I followed the rest of the instructions found in this thread and am now a happy Eclipse user. :cool:

All without having to make copies of all those files and folders..

I would think you could do about the same on linux using symlinks also.

as a side note:
this could probably be turned into a bat file without to much effort.
something like this:
(this is completely untested, use at your own risk..)

create a file named "createTeensyClipse.bat" and place the following code in it:
Code:
@echo off
if not "X"=="X%~3" goto DOCMD
echo Usage:
echo createTeensyClipse "My_new_hardware_folder_path" "path_to_teensy_cores_folder" "path_to_arduino(1.5.x)_tools_folder"
echo Where:
echo "My_new_hardware_folder_path" = the path to the new hardware folder (i.e. "C:\hardware")
echo "path_to_teensy_cores_folder" = the path to the teensy installed cores directory (i.e. "C:\Arduino\teensy\cores")
echo "path_to_arduino(1.5.x)_tools_folder" = the path to your version 1.5.x installs tools folder (i.e. "C:\Arduino-1.5.5\hardware\tools")
echo
goto BAT_DONE
:DOCMD
Set ($TEENSY_ALL_DIR)="%~1\teensy\all"
Set ($TEENSY_CORES_DIR)="%~1\teensy\tools\"
mkdir %($TEENSY_ALL_DIR)%
mkdir %($TEENSY_CORES_DIR)%
mklink /d "%~($TEENSY_ALL_DIR)%\cores " "%~2"
mklink /d "%~($TEENSY_CORES_DIR)%\windows" "%~3"
echo folder tree is setup, now create the "boards.txt" 
echo and "platform.txt" files and place them in the "%~($TEENSY_ALL_DIR)" folder.
:BAT_DONE
@echo on

Hope that looks right.

Enjoy,
g-
 
Status
Not open for further replies.
Back
Top