cancel
Showing results for 
Search instead for 
Did you mean: 

C++ setup in VS code for STM32

NymerisV
Associate II

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

 

 

3 REPLIES 3

@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?

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,

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