The three files libavr's consumers carry, in the vendored shape: this repo rides as a submodule (wateralarm), so .clangd names no database -- the checkout that is opened as a folder names build/atmega328p-generated in .vscode/settings.json -- and holds the stand-ins clang needs for GCC's AVR dialect plus the removals for the codegen flags the loader TUs carry and clang has no spelling for (-fira-algorithm, -fno-split-wide-types, -fno-tree-ter, -fno-ivopts). The libavr pin advances to the editor-audit fixes. The preset builds green from the pin and clangd reports zero errors on pureboot.cpp. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.3 KiB
JSON
38 lines
1.3 KiB
JSON
{
|
|
// clangd is the language server; the cpptools engine would parse every file
|
|
// a second time and disagree, since nothing tells it about a cross
|
|
// compiler.
|
|
"C_Cpp.intelliSenseEngine": "disabled",
|
|
|
|
// --query-driver lets clangd ask the cross compiler for its own system
|
|
// includes and target. The database is named here rather than in .clangd
|
|
// because that file travels with the driver into a consumer's submodule,
|
|
// where a build tree of this repo's own need not exist.
|
|
"clangd.arguments": [
|
|
"--compile-commands-dir=${workspaceFolder}/build/atmega328p-generated",
|
|
"--query-driver=**avr-g++*",
|
|
"--header-insertion=never"
|
|
],
|
|
|
|
// The presets are the build interface; the toolchain file inside the
|
|
// libavr submodule is the one place the compiler is chosen. The submodule
|
|
// carries no local/toolchain for it to discover, so the prefix is named
|
|
// here, for the window that opens this folder.
|
|
"cmake.useCMakePresets": "always",
|
|
"cmake.environment": {
|
|
"LIBAVR_TOOLCHAIN": "D:/dev/libavr/local/toolchain/avr-gcc-16.1.0-mingw"
|
|
},
|
|
"cmake.configureOnOpen": true,
|
|
"cmake.options.statusBarVisibility": "compact",
|
|
|
|
"files.watcherExclude": {
|
|
"**/build/**": true,
|
|
"**/libavr/**": true
|
|
},
|
|
|
|
"files.associations": {
|
|
".clangd": "yaml",
|
|
".clang-format": "yaml"
|
|
}
|
|
}
|