Skip to main content
Graduate
April 16, 2024
Solved

Build a CMake project generated from CubeMX 6.11.0

  • April 16, 2024
  • 1 reply
  • 5354 views

Hello everybody,

in the latest CubeMX ver 6.11.0 I found that it's possible to generate a CMake project. What are the steps to run the build of the code from Windows shell or VS Code ? Is there a tutorial ?

If I open the CMake project from CubeIde (v 1.15.0) then I'm not able to build the code, the Build command is disabled.

Instead, if I follow the doc AN5952 I'm able to build the code also from CubeIde, it seems that the CMake generated files are different if I generate the CMake project files from scratch by using the AN5952 and if I generate the CMake project files from CubeMX 6.11.0

 

Thanks

  Max

 

 

    This topic has been closed for replies.
    Best answer by MaxC

    Hello everybody,

    I have done some tests in order to better understand how to handle STM32 prj from CMake and VS Code.

    • Folllowing the AN5952 doc you can create a CMake prj from scratch or you can load an already available CMake project into CubeIde and you can build that projects from CubeIde.
    • If you want to use VSCode you can install the STM32 VSCode extension from VSCode marketplace  (https://marketplace.visualstudio.com/items?itemName=stmicroelectronics.stm32-vscode-extension) along with other STM32 tools like STM32CubeCLT, STM32CubeMX and STM-MCU-FINDER. After the installation you can follow the user guide available in the STM32 extension, in the user guide there are also some video tutorial links.

    Regards

     

    1 reply

    MaxCAuthorAnswer
    Graduate
    April 23, 2024

    Hello everybody,

    I have done some tests in order to better understand how to handle STM32 prj from CMake and VS Code.

    • Folllowing the AN5952 doc you can create a CMake prj from scratch or you can load an already available CMake project into CubeIde and you can build that projects from CubeIde.
    • If you want to use VSCode you can install the STM32 VSCode extension from VSCode marketplace  (https://marketplace.visualstudio.com/items?itemName=stmicroelectronics.stm32-vscode-extension) along with other STM32 tools like STM32CubeCLT, STM32CubeMX and STM-MCU-FINDER. After the installation you can follow the user guide available in the STM32 extension, in the user guide there are also some video tutorial links.

    Regards