Sysprogs forums › Forums › VisualGDB › Using the new STM32CubeMX Project Wizard
- This topic has 2 replies, 2 voices, and was last updated 1 year, 6 months ago by GeneM.
-
AuthorPosts
-
May 29, 2023 at 16:31 #34286GeneMParticipant
I’ve been experimenting with the STM32CubeMX Project Wizard and it seems like a really useful feature. I do have a couple of startup questions.
- By default, it builds a CMake project. I only know a bare minimum about CMake. I’m pretty sure I know the answer to this question but is there a way to use the STM32CubeMX Project Wizard and create a MSBuild project?
- I’ve used the VGDB fast semihosting feature on every VGDB project I’ve built, typically in C++ with std::cout so I have to have a main.cpp and #include <iostream>. Following the Creating Advanced STM32CCube MX based projects tutorial, I was able to rename the default main.c in my new project to main.cpp and edit the CMake file so it builds. But when I #include <iostream>, it can’t find it unless I #include it with the full path like this: #include “C:\SysGCC\arm-eabi\arm-none-eabi\include\bits\c++\10.3.1\iostream”. VGDB then tells me it need to include 2 additional include directories which I do. When I rebuild after this, I get this error: bits/c++config.h: No such file or directory. I’ve been through this before and in the past with MSBuild projects just renaming main.c to main.cpp solved the problem. There don’t seem to be any project properties that allow me to specify additional include directories. Is this something I have to manually add to a CMake file somewhere? If so, what do I add and where?
Thanks
- This topic was modified 1 year, 6 months ago by GeneM.
May 31, 2023 at 12:22 #34314supportKeymasterHi,
The STM32CubeMX project wizard uses a different workflow compared to the regular Embedded project wizard and can only use CMake. If you would like to use MSBuild, please consider generating an STM32CubeIDE project with STM32CubeMX and then importing it into VisualGDB using the regular Embedded project wizard.
The second error looks like you have ended up with an invalid combination of settings. VisualGDB’s automated header discovery feature is designed to automatically search most likely locations for the missing headers, but it’s still up to the user to review the suggestions and double-check that they make sense. If using it ends up breaking the project, please try resolving the build issues manually without using this feature.
May 31, 2023 at 13:14 #34315GeneMParticipantThanks for the quick response. I’ve been using VGDB quite happily for a couple of years now but almost entirely with MSBuild projects that I start from scratch or from the ST examples provided in VGDB or the excellent VGDB tutorials. That works great. Now that I’m moving outside my experience base, I’m trying to come up with an efficient work flow. My next attempt will be importing a STM32CubeMX (or STM32CubeIDE) project into a VGDB project that sits in the same folder as the original CubeMX folder so all the necessary files are in the same place. thanks again.
-
AuthorPosts
- You must be logged in to reply to this topic.