A mixture my c_cpp_properties.json looks like this: { "configurations": [ { "name": "Linux", "defines": [], "includePath": ["${workspaceRoot}/**"], "compilerPath": "/home/bashton/toolchains/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gcc", "compileCommands": "${workspaceRoot}/nuttx/compile_commands.json", "cStandard": "c99", "cppStandard": "c++14", "intelliSenseMode": "gcc-arm", "browse": { "limitSymbolsToIncludedHeaders": true, "path": [] } } ], "version": 4 }
And I run the build with "bear -a make -j8" which lets bear generate the compilation database. If an entry is not in the compilation database it will fall back to the includePath entry which I keep very wide. You can be more specific, but I find that I end up having to maintain a lot of paths which is error prone. Maybe I'll write up a blog or something on my configuration if it is of interest. With JLink and the imxrt1060 my setup has a few extra tweaks because JLink does not by default protect against reads to reserved memory which leads to the debugger doing bad things when it tries to do things like read memory addresses from uninitialized registers. Basically GDB command data-list-register-values is not safe unless your debugger knows what not to touch. OpenOCD is much better about this, but the imxrt is not supported by it :/ --Brennan On Wed, Dec 9, 2020 at 6:01 PM Matias N. <mat...@imap.cc> wrote: > > Brennan, > what do you use to pick up the project files in VSCode? Do you use a > compilation database? > That's what I use with QtCreator. > > Matias