I have a git repository for a STM32 H7 dual-core project. Opening the repo-level folder my structure looks like the following:


PARENT DIRECTORY (STM32H755)
├── .git
├── .vscode
│   └── c_cpp_properties.json
│
├── CM4
│   ├── Core
│   │   ├── Inc
│   │   │   └── .h files for CM4 only
│   │   └── Src
│   │       └── .c files for CM4 only
│   └── ...
│   
├── CM7
│   ├── Core
│   │   ├── Inc
│   │   │   └── .h files for CM7 only
│   │   └── Src
│   │       └── .c files for CM7 only
│   └── ...
│
├── Common
│   ├── Core
│   │   ├── Inc
│   │   │   └── .h files for BOTH CM4 and CM7
│   │   └── Src
│   │       └── .c files for BOTH CM4 and CM7
│   └── ...
│

I need to specify the includePath for each of the CM4 and CM7 cores independently, including that specific core's h files as well as the common h files.

How is this achieved?

The default path within c_cpp_properties.json file:

 "includePath": [
                "${workspaceFolder}/**",
            ],

causes issues for similarly named files between the CM4 and CM7 (ie. main.h).

Conversely, using a core specific paths, such as the following for a CM4:

 "includePath": [
                "${workspaceFolder}/CM4/**",
                "${workspaceFolder}/Common/**"
            ],

causes issues for the other core's files (ie. CM7's main.h).

0

There are 0 answers