Is it possible to generate C++ projects from CubeMX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-05 12:56 AM
Hi!
I'm trying to program a STM32F031C6 with CubeIDE. The CubeMX tool puts out a Project that is c native. Since I wrote my program in C++, i'd like to Change it into a c++ Project. Doing this manually is very error prone. Is there an Option that I missed?
Yours
timtim
- Labels:
-
STM32CubeMX
-
STM32F3 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-05 1:17 AM
Hello @timtim , For the moment it's not possible ! But your request has been submitted to the team.
Best Regards,
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-07 7:33 AM
@timtim - Unfortunately, CubeMX can't directly generate a C++ project.
You can change the generated project's nature to C++.
Make sure to back up your project file before you regenerate the project (after changing pins for example),
because CubeMX will destroy anything you've modified (paths, settings, etc.)...
C++ works just fine with the above caveat.
@Khouloud GARSI - STM really needs to fix both problems:
- C++ as an option in CubeMX
- clobbering user settings in project file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-07 8:20 AM
I recommend using this approach:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-09-18 1:53 PM
Let's have a try relying on Project Explorer view contextual menu. Select your project then right click. Some "Convert to C++" menu entry is promoted if C project. If C++ project "Convert to C" is available.
