Skip to main content
Graduate
January 31, 2025
Question

C++ setup in VS code for STM32

  • January 31, 2025
  • 1 reply
  • 1090 views

Hello, Can someone advise me for a "blueprint" how to set up C++ in VS Code for stm32 mcu, I've changed Cmakelists.txt to be able to compile C++ and I am not getting an error at Cmakelists.txt, but I am still getting errors from undefined macros. I sense that it is related to IntelliSense and I've set all include paths in properties.json and stil it doesn't recognize some macros from different libraries. I just wanted to ask you if you know certain procedure for any type of project involving setting up C++ for STM32 in VS code.

Thanks in advance

 

 

    This topic has been closed for replies.

    1 reply

    Super User
    January 31, 2025

    @NymerisV wrote:

    I am still getting errors from undefined macros.


    What errors, exactly?

     


    @NymerisV wrote:

    I sense that it is related to IntelliSense


    Should be easy to distinguish actual compiler errors from just "IntelliSense" issues?

    NymerisVAuthor
    Graduate
    February 1, 2025

    Hi, yes exactly, I figured it out, those were errors from missing libraries. I thought that CubeMX has generated them. From Intellisense.

    And the rest of errors was that I had to incorporate also the ST-Link server file location in properties.json and also location of gcc, but the gcc from CubeCLT location. And also the gcc location to Cmakelists.txt-s,

    Many thanks,

    NymerisVAuthor
    Graduate
    February 1, 2025

    I mean  the errors were from intellisense, it couldn't locate them.