Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 40 of 40

Thread: PlatformIO IDE: The next generation IDE for IoT development

  1. #26
    Member
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    87
    Well, it's hard to definitively say but I've done PlatformIO builds and uploads using a Raspberry Pi. Not super fast, but has been reliable for me.

  2. #27
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,534
    I have not played at all with platform IO.

    But earlier I did play some with trying to run Arduino build headless... As if you look at the release notes for 1.8.0, one of the points was:
    * Linux: running in command line mode doesn't require an X11 display anymore

    So I tried it. With the Teensy I was able to run the compiler, but the load of the Teensy program to upload failed. I thought about editing the boards.txt or like to see about maybe using command line version of loader... But have not tried yet.

  3. #28
    Quote Originally Posted by Epyon View Post
    Can PlatformIO be a an alternative, like can I SSH into the Linux board and have PlatformIO compile and flash the connected Teensy with the sketches I developed on my main rig? Keeping in mind I do my main development in Arduino IDE and that I need customised libraries (shakes fist at Particle).
    No need to open any SSH ports or etc. Just start PIO Remote Agent on RPi and program connected devices from anywhere in the world. See

    - http://docs.platformio.org/page/plus/pio-remote.html

  4. #29
    Senior Member Epyon's Avatar
    Join Date
    Apr 2013
    Location
    Belgium
    Posts
    443
    Quote Originally Posted by KurtE View Post
    I have not played at all with platform IO.

    But earlier I did play some with trying to run Arduino build headless... As if you look at the release notes for 1.8.0, one of the points was:
    * Linux: running in command line mode doesn't require an X11 display anymore

    So I tried it. With the Teensy I was able to run the compiler, but the load of the Teensy program to upload failed. I thought about editing the boards.txt or like to see about maybe using command line version of loader... But have not tried yet.
    Arduino 1.8.3 on ARM Linux throws
    Code:
    Picked up JAVA_TOOL_OPTIONS:
    java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
            at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
            at processing.app.Base.<init>(Base.java:211)
            at processing.app.Base.main(Base.java:140)
    It should have been fixed with this merge, but alas.

    Quote Originally Posted by ikravets View Post
    No need to open any SSH ports or etc. Just start PIO Remote Agent on RPi and program connected devices from anywhere in the world. See

    - http://docs.platformio.org/page/plus/pio-remote.html
    That's only in the paying version?

    Can you btw confirm that I can use code made in Arduino with custom libraries on Platformio?
    Last edited by Epyon; 06-10-2017 at 03:43 PM.

  5. #30
    Quote Originally Posted by Epyon View Post
    That's only in the paying version?
    Who did say? See details in #3 PIO Remote™. Basic features of PIO Remote are FREE and included in Community plan.

    Quote Originally Posted by Epyon View Post
    That's only in the paying version?

    Can you btw confirm that I can use code made in Arduino with custom libraries on Platformio?
    Opposite quetion: Why you can't use? See docs for Library Manager:

    - http://docs.platformio.org/page/libr...ger/index.html

  6. #31
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,534
    Quote Originally Posted by Epyon View Post
    Arduino 1.8.3 on ARM Linux throws
    Code:
    Picked up JAVA_TOOL_OPTIONS:
    java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
            at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
            at processing.app.Base.<init>(Base.java:211)
            at processing.app.Base.main(Base.java:140)
    It should have been fixed with this merge, but alas.


    That's only in the paying version?

    Can you btw confirm that I can use code made in Arduino with custom libraries on Platformio?
    I have not tried too much with 1.8.3 as there is no teensyduino to install on it yet... I do have a version of 1.8.1 with 1.36 Teensyduino installed, where I was able to program a teensy, with a command that looks something like: arduino --verbose-build --upload --preserve-temp-files --port /dev/ttyACM0 ~/arduino-1.8.1/examples/01.Basics/Blink/Blink.ino

    More details about this in the thread: https://forum.pjrc.com/threads/42790...Ty-or-the-like

  7. #32
    Junior Member
    Join Date
    Dec 2016
    Posts
    17
    Has anyone tried building code with build_flags = -std=c++11? I am getting the following errors.

    Code:
    In file included from /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:37:0,
    from /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:1,
    from /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/IPAddress.cpp:1:
    
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h: In function 'boolean isAscii(int)':
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h:64:22: error: 'isascii' was not declared in this scope
    return ( isascii (c) == 0 ? false : true);
    ^
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h: In function 'int toAscii(int)':
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h:146:20: error: 'toascii' was not declared in this scope
    return toascii (c);
    ^
    In file included from /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:37:0,
    from /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:1,
    from /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/Stream.cpp:23:
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h: In function 'boolean isAscii(int)':
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h:64:22: error: 'isascii' was not declared in this scope
    return ( isascii (c) == 0 ? false : true);
    ^
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h: In function 'int toAscii(int)':
    /Users/joe/.platformio/packages/framework-arduinoteensy/cores/teensy3/WCharacter.h:146:20: error: 'toascii' was not declared in this scope
    return toascii (c);
    ^
    *** [.pioenvs/teensy36/FrameworkArduino/IPAddress.o] Error 1
    *** [.pioenvs/teensy36/FrameworkArduino/Stream.o] Error 1

  8. #33
    Junior Member
    Join Date
    May 2015
    Posts
    6

    Getting breakpoints to work?

    Has anyone successfully gotten breakpoints to work with PlatformIO & Teensy? I have a 3.x here, and put a breakpoint in my setup code, but the breakpoint is never hit. I like the VS Code integration (We're a .Net shop, so it's comfortable), but I was really hoping to get breakpoints and better debugging.

    Anyone?

  9. #34
    Junior Member
    Join Date
    May 2015
    Posts
    6
    From what I read on the PlatformIO site, Teensy doesn't support debugging. Bummer.

    It's not on this list:

    http://docs.platformio.org/en/latest...debugging.html

  10. #35
    Junior Member
    Join Date
    May 2014
    Posts
    18
    Quote Originally Posted by Plympton View Post
    From what I read on the PlatformIO site, Teensy doesn't support debugging. Bummer.

    It's not on this list:

    http://docs.platformio.org/en/latest...debugging.html

    But they give an example with a Teensy 3.1 and J-Link Debugger
    http://docs.platformio.org/en/latest...r-and-uploader

    Also [Erich Styger], who already hacked the Teensy 3.1, modified a 3.6/3.5 for Debugging - but he had to remove the Bootloader Chip.

  11. #36
    Junior Member
    Join Date
    Sep 2017
    Location
    Bay Area, USA
    Posts
    17
    Does anyone know if it's possible to get the pio command to generate a Makefile? I want to experiment with another compiler and don't have time to create a complex makefile by hand.

  12. #37
    Member
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    87
    Quote Originally Posted by smachin View Post
    Does anyone know if it's possible to get the pio command to generate a Makefile? I want to experiment with another compiler and don't have time to create a complex makefile by hand.
    No, PlatformIO provides its own build system and doesn't use makefiles. Its configuration is remarkably simple, much simpler than make.

  13. #38
    Junior Member
    Join Date
    Nov 2015
    Location
    Germany
    Posts
    14
    Hello,

    i am using Platformio (Atom) now for a while.

    I played around with cycle time and found out that the Arduino IDE (v1.8.5) with teensyduino (1.41) seems to compile in a different way.

    When i compile with Arduino IDE / teensyduino it is much faster.

    I did just a test with 144MHz overclocking of the teensy 3.2 and i compared the exact same "program", compiled with Arduino IDE and Platformio.

    The result is:
    PIO cycles per second 399516

    Arduino cycles per second 495000

    At Arduino i selected the 144 MHz overclock option
    At PIO i add this line at platformio.ini: build_flags = -Wno-write-strings -DF_CPU=144000000L

    So what is the reason for the much faster Arduino IDE compared to the compiled PIO hex file?

    I want to keep the nice PlatformIO for programming.

    Maybe i need to add some more compiler options? If so, how can i find out what and where i have to add it?

    I hope someone can help me

    Thanks,
    Thomas

  14. #39
    Sure, you need PlatformIO Core, command line tool.

  15. #40
    Member CorBee's Avatar
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    73
    Hi,


    I am using a Teensy 3.6 with PlatformIO (as well as TI MSP430, stellaris and ESP8266) and think it is a great platform. One thing however does not seem to work (I am using PlatformIO in a Linux Mint environment) and that is the serial-connection. When I use the Arduino-IDE serialout from the teensy shows up at the terminal, in PlatformIO I dont get that to work. Not a big issue.

    regards
    Cor

Posting Permissions

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