Jump to content
mitov

Enabling C++11/14 support in Energia

Recommended Posts

Hello everyone,

 

I am trying to add Visuino https://www.visuino.com supportfor the TI controllers, so I downloaded Energia, and copied the Visuino libraries to the "C:\Energia\hardware\msp430\libraries" .

The libraries are developed for C++14 to use the latest compiler optimizations, and simplify the code base. They work fine on all Arduino, ARM, and ESP8266 controllers as they all have the C++11/14 support enabled by default.

How to enable the C++14 support in Energia?

 

With best regards,

  Boian Mitov

Share this post


Link to post
Share on other sites

-std=gnu++11 is not supported in the current version of the msp430 gcc compiler (v 4.6.3 ). A new compiler for MSP430 from TI is available which does support this feature. I will be releasing a package that included this compiler in a couple of weeks. You will need the new Energia IDE that is currently in beta which includes the core/manager. A beta is available here:  http://forum.43oh.com/topic/9752-energia-1610e18b6-beta-available/

 

The official release should be out sometime this week.

 

Robert

Share this post


Link to post
Share on other sites

Sorry for not being clear in the post above. The current beta includes the older gcc version. I will be releasing an updated MSP430 board package in the next couple of weeks that will include the aforementioned updated msp430-elf-gcc compiler that will feature gnu++11.

Share this post


Link to post
Share on other sites

Perhaps I have missed something but it seems that the latest Energia 1.8.7E21 with Eneriga MSP430 boards package 1.05 is still using gcc 4.6.3 from 2012. Where can I find the updated board package with the msp430-elf-gcc compiler?

If this project hasn't been completed yet, what can be done to help it forward, how can I help?

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for pointing me to right location. 👍 I always assumed that msp430-lg-core stood for legacy so didn't look further in the tree...

I haven't been able to try this yet because the make_mito_release.sh script tries to download this file but the website constantly reports that it's offline due to maintenance for 2 days.

Edit: Searching for the correct link via the Design Resources webpage on the ti.com website I get a new link to the latest Linux compiler.

Edited by LIJsselstein
Additional info

Share this post


Link to post
Share on other sites
On 8/10/2016 at 10:19 AM, energia said:

-std=gnu++11 is not supported in the current version of the msp430 gcc compiler (v 4.6.3 ). A new compiler for MSP430 from TI is available which does support this feature. I will be releasing a package that included this compiler in a couple of weeks.

Thank you Robert,

In the last 4 years, Visuino has become very popular, and now it supports most controllers on the market, and even has partial support for Raspberry Pi.

The only controllers that are not currently supported are the Energia TI controllers, and I am looking again into adding support for them.

I just tested the latest Energia IDE version, and it appears that it still is missing the C++11/14 😞 . Is there a way to enable the C++11 support, so I can add prodly Energial to the growing list of boards supported by Visuino 🙂
www.visuino.com

I am at present testing direct compilation inside the Visuino IDE, without the needs of the Arduino IDE, so I will be able to add support for the Energia IDE without problem, but I need to have the C++11/14 support in order for this to work, since all the code generation and Visuino libraries are specifically designed to use modern C++ features 😞

With best regards,

  Boian Mitov

Share this post


Link to post
Share on other sites

  Hello Robert,


Is Energia actually supported? I even have a customer that has project that needs the C++1X . Can you please update the compiler so I can make some progress?
Cheers,
  Boian

Share this post


Link to post
Share on other sites

Can this be figured out @Rei Vilo  @energia? I use TI MCUs in a lot of projects and it would be fantastic to have access to modern C++ functions. As it is currently, you have to rewrite any example code that manufacturers provide. Often times, this isn't practical so some sort of update would be nice. Can you at least confirm that anything is in the works or that it's unsupported at this point? 

 

Thanks, 

Share this post


Link to post
Share on other sites

You can try and edit the platform.txt file and set a different version for C and C++. 

However, this may rise conflicts with the default libraries, as they target an older version of C and C++. 

For more advanced use of the Energia SDK, I would recommend using Code Composer Studio. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...