Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 5 months ago.
MbedStudio and C++11 support
Hello.
I have some experience with microcontrollers and c++, kind of bare metal approach. But by now I would like to try mbed for a course. Did the blinky example on a nucleo f103 board and works great, As far as I understand, keil compiler support some c++11 extensions and I would like to use it (constexpr, for example). Tried to change the json profile files inside the mbed-os folder but apparently id does not have any effects. Is it possible to change it?
1 Answer
5 years, 1 month ago.
Hi Carlos,
I assume that you were using Mbed Studio 0.4.0. In that version Mbed Studio was not using profiles located in the program. Instead, it was using profiles bundled inside Mbed Studio. The functionality you request is now possible with Mbed Studio 0.5.3. To use c++11 please either:
1) Navigate in your program into mbed-os/tools/profiles/{profile_name}.json and modify ARMC6.cxx entry to use -std=gnu++11 or -std=c++11 instead of -std=gnu++98. 2) Create a new custom profile and load it using `import custom profiles` feature in profiles dropdown. In your custom profile you can also override ARMC6.cxx entry to use C++11
- Arek Zaluski