Using the new STM32CubeMX Project Wizard

Sysprogs forums Forums VisualGDB Using the new STM32CubeMX Project Wizard

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34286
    GeneM
    Participant

    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.

    1. 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?
    2. 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 11 months ago by GeneM.
    #34314
    support
    Keymaster

    Hi,

    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.

    #34315
    GeneM
    Participant

    Thanks 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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.