feat: update ESP32 board version and add LSP configs

This commit is contained in:
2026-02-18 16:07:31 -08:00
parent 9f7a383b38
commit 34ca86d771
6 changed files with 3669 additions and 24 deletions

View File

@@ -193,5 +193,35 @@ clang-format -i --style=file \
libraries/KlubhausCore/*.properties
"""
[tasks.gen-compile-commands]
description = "Generate compile_commands.json for LSP (uses BOARD env var)"
run = """
rm -rf /tmp/arduino-build
source ./boards/$BOARD/board-config.sh
arduino-cli compile --only-compilation-database --fqbn "$FQBN" --build-path /tmp/arduino-build ./boards/$BOARD
cp /tmp/arduino-build/compile_commands.json .
echo "[OK] compile_commands.json generated"
"""
[tasks.gen-crush-config]
description = "Generate .crush.json with BOARD-based FQBN"
run = """
source ./boards/$BOARD/board-config.sh
cat > .crush.json << EOF
{
"lsp": {
"arduino": {
"command": "arduino-language-server",
"args": ["-fqbn", "$FQBN"]
},
"cpp": {
"command": "clangd"
}
}
}
EOF
echo "[OK] Generated .crush.json with FQBN: $FQBN"
"""
[env]
BOARD = "esp32-32e-4"