Imported project has incorrect highlighting for preprocessor conditional macros

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Imported project has incorrect highlighting for preprocessor conditional macros

303 次查看
anthony_asterisk
Contributor II

I have a project imported to MCUXpresso for VSCode extension.

The extension has detected the repository as a zephyr repository and can build the default Build Configuration. 

When I load c files from the project, they do not have the correct set of preprocessor conditions highlighted.  It is only showing the default (nothing defined) path when in reality there are many variables set through KConfig (zephyr).

How do I configure the intellisense highlighting to be based on the cmake generated configuration that is used during the build?

@dereksnell maybe you have some hints? 

 

0 项奖励
回复
1 回复

241 次查看
HangZhang
NXP Employee
NXP Employee

Hi @anthony_asterisk 

To ensure that IntelliSense recognizes these settings and highlights them, you need to ensure that the VS Code correctly loads the configuration file generated by CMake, and it is recommended to use the CMakePresets.json file to configure the build settings. This file is directly supported by CMake.
If the problem persists, it may be necessary to check if your compiler and build toolchain are installed correctly.

Hope this will help you.

BR

Hang

0 项奖励
回复