Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 16 of 16

Thread: Teensyduino IDE replacement

  1. #1

    Teensyduino IDE replacement

    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

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    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.

  3. #3
    Thanks! I will check it out.

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

  5. #5
    Member
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    91
    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).

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,366
    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

  7. #7
    Junior Member
    Join Date
    Dec 2018
    Posts
    10
    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 😊

  8. #8
    Member
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    91
    Quote Originally Posted by RoboRepublic View Post
    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.

  9. #9
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,154
    If you are happy to use VSCode than you can use VisualTeensy build by Luni https://forum.pjrc.com/threads/53604...alCode-(Win10).

  10. #10
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    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.

    Quote Originally Posted by lamikam View Post
    "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:
    Click image for larger version. 

Name:	Capture d’écran 2018-12-30 à 12.17.56.jpg 
Views:	38 
Size:	80.5 KB 
ID:	15441

  11. #11
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,366
    Quote Originally Posted by Theremingenieur View Post
    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.

  12. #12
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    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.

  13. #13
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,366
    ... when I saw that I ignored it ... as a forum search would show it clearly has been tried ...

  14. #14
    Junior Member
    Join Date
    Dec 2018
    Location
    Scotland
    Posts
    12
    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.

  15. #15
    Junior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    16
    I'm using VS Code with Platform IO on a Mac. Really smooth installation and works well with Teensy. https://platformio.org/platformio-ide

  16. #16
    Yeah, I switched to platform.io also. LOVE IT!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •