Teensyduino IDE replacement

Status
Not open for further replies.

lamikam

Active member
I am using teensy 3.6 + audio shield, and LOVE the capabilities. What I don't love so much, is the Arduino IDE. In fact, I hate it. There are several IDE arduino plugin, for exampel for Eclipse c++ ide. Has anyone tried getting the teensyduino tool chain to work in Eclipse?

THanks
Leor
 
I‘m using „Sloeber“ (written and actively maintained by a Belgian or Dutch guy called Jantje) which exists either as an Arduino plugin for an existing Eclipse Installation or as a full bundle including the needed Eclipse packages for many years now. During the setup, you point once towards the Arduino installation directory which serves as a container for the Teensyduino install and you are done. Sloeber picks everything from there. No more need to touch the Arduino IDE afterwards.
 
"you point once towards the Arduino installation directory" - Hmm, I did not get any prompt to enter a path.
 
Check out Platformio at https://platformio.org

It has terrific support for Teensy and Arduino, plus tons of other boards, platforms and frameworks. Kind of amazing, actually.

It's free and open source with optional pay for additional services. And the team developing it is quite responsive.

Works with both Atom and VSCode, but I prefer the basic command-line interface with my preferred text editor.

I can't imagine going back to Arduino IDE (or any other development environment).
 
OS wasn't noted? If Windows Frank_B made a batch file that will run the installed IDE Builder from cmdline or any IDE that can launch it.

I wrote a second batch file and tested it to work with SublimeText - that batch file queries for Board params like the IDE Tools menu: Board, Speed, Optimize, Serial Type

This POST link points to Github and context for SublimeText.

The github is the tweaks to setup Frank's batch file for the current sketch with needed :: Compile.cmd
 
Hi could you offer a brief explanation of what PlatformIO is and how I can go about using it? A tutorial or something would be nice.

I've resorted to skipping the Arduino IDE Anand using GNU make + ARM toolchain to work on the teensy 3.2.

It works really well, but I should probably use something more adopted 😊
 
Hi could you offer a brief explanation of what PlatformIO is and how I can go about using it? A tutorial or something would be nice.

Sure thing. Platformio is a system that automates the build environment for embedded applications. It runs on Mac/Windows/Linux and supports hundreds of hardware boards (like Teensy), twenty or so frameworks (like Arduino, mbed, etc...) and hundreds of libraries. It takes care of downloading and installing all the support code and tools and builds binaries fast. It works from the command line or you can use it with Atom or VSCode IDEs (and others). It has continuous integration facilities, test, debugging and much more.

The Teensy integration is excellent. They track the latest releases of the Teensy software quickly and automatically update as you use it, so you don't have to reinstall new versions by hand.

Here's a quick tutorial for the command line use of Platformio.

First go here to get it installed:

https://platformio.org/install/cli

This will lead you to platform specific installation instructions. On my Mac with Homebrew, it was just

Code:
brew install platformio

It's a little more complicated on other platforms.

The website has a bunch of tutorials and demos, but here's what you do to build and upload a minimal "blink" project.

First create a project directory:

Code:
mkdir blink

Then drop down into it:

Code:
cd blink

Then have platformio create a project for you:

Code:
platformio init --board teensy31

(This is for both Teensy 3.1 and 3.2) Then put a blink.cpp file in the "src" directory, here's the example that they provide:

Code:
/*
 * Blink
 * Turns on an LED on for one second,
 * then off for one second, repeatedly.
 */

#include "Arduino.h"

// Set LED_BUILTIN if it is not defined by Arduino framework
// #define LED_BUILTIN 13

void setup()
{
  // initialize LED digital pin as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
  // turn the LED on (HIGH is the voltage level)
  digitalWrite(LED_BUILTIN, HIGH);
  // wait for a second
  delay(1000);
  // turn the LED off by making the voltage LOW
  digitalWrite(LED_BUILTIN, LOW);
   // wait for a second
  delay(1000);
}

Then cd back to the original blink folder and do

Code:
platformio run --target upload

This will build and upload your blink project. That's it!

You can customize the platformio.ini file in that directory to do all sorts of things like create build targets formultiple hardware platforms, change compiler directives, specify libraries if platformio doesn't find what you need automatically, etc.
 
The OP asked explicitly about Eclipse, so it's somewhat strange that this thread went totally noisy with unsolicited stuff and OT within only 9 posts.

"you point once towards the Arduino installation directory" - Hmm, I did not get any prompt to enter a path.

Following the Sloeber install guidelines, use the Preferences - Arduino settings to point towards the Arduino/Teensyduino hardware and library paths:
Capture d’écran 2018-12-30 à 12.17.56.jpg
 
The OP asked explicitly about Eclipse, so it's somewhat strange that this thread went totally noisy with unsolicited stuff and OT within only 9 posts.
...

I took this in the OP -- "There are several IDE arduino plugin, for exampel for Eclipse c++ ide." -- as an open ended query looking to avoid a firm but non-specific hate of the Arduino IDE.

It seemed a forum search exclusively for 'Eclipse' that an existing thread might have been found without asking ... I hesitated but recently replied because the IDE may be awful but the FORUM revolves around it.
 
Sorry, defragster, it's perhaps because I'm not a native English speaker. For me,
Has anyone tried getting the teensyduino tool chain to work in Eclipse?
sounded explicit enough...

Besides of that, I guess (including my own professional experience) that Eclipse has established itself as a quasi-standard multi-platform IDE for professional developers, since support for tons of different programming languages can be added with a few mouse clicks, always keeping the same look and feel, and workflow. I was using Eclipse already before I entered the Teensy world for Java and PHP development at my day job and thus, it seemed logical to me to use it for my embedded stuff too, instead of polluting everything with again another IDE.
 
If it is JUST (or mostly) the Arduino IDE text editor that bothers you then you can still use your favourite text editor. In Arduino, goto preferences and select "Use External Editor". Edit code in your fave text editor, save and use Arduino to compile/upload. Probably not the solution the OP wanted but it remains an option, of sorts, for small projects.

While this is better than using Arduino for editing it could not be described as elegant - I use this method with VScode on a secondary PC just for 'tweaks' and it is OK, at a push, almost, kindof.

Personally, I find the Arduino text editor perfectly dissatisfying - a bit like trying to cook beautiful food in a overflowing sewer.
 
I am having issues with Platform IO finding the Teensy libraries can anyone explain how to set it up so it can see the Teensy libraries at a specific path as I am struggling?
 
Vs code + platform io does actually not run and throws errors on macOS Catalina (beta). Several people have notified the issue for more than two weeks but nothing happened from developer side
 
Hi,

If you want specific libraries to be used you can edit the platform.ini of your project (you need to first create a project), here's an example of one of my platform.ini files where I do use a specific directory for the libraries
Code:
[platformio]
lib_dir = [B]/home/corbee/CloudStation/Documents/Coding/Libraries/MSP430Libraries[/B]
env_default =lpmsp430g2553

[env:lpmsp430g2452]
platform = timsp430
board = lpmsp430g2452
framework = energia
debug_tool = mspdebug
upload_protocol = rf2500


[env:lpmsp430g2553]
platform = timsp430
board = lpmsp430g2553
framework = energia
debug_tool = mspdebug
upload_protocol = rf2500
 
Status
Not open for further replies.
Back
Top