-
下载 dt-schema(可选,更完整的检查) git clone https://github.com/devicetree-org/dt-schema
-
在settings.json中配置: // 1. 设置工作目录为你的内核源码绝对路径
"devicetree.cwd": "/root/project/linux",
// 2. 指定为 Linux 的设备树组织规范(而不是单片机的 Zephyr)
"devicetree.defaultBindingType": "DevicetreeOrg",
// 3. 必须使用绝对路径!让 LSP 能够跨越 SSH 找到头文件,从而实现宏定义补全
"devicetree.defaultIncludePaths": [
"/root/project/linux/include",
"/root/project/linux/arch/arm/include",
"/root/project/linux/arch/arm/boot/dts"
],
//引入标准的元模式(Meta-Schemas),用于规范 YAML 本身的语法
"devicetree.defaultDeviceOrgBindingsMetaSchema": [
"/home/yang/dt-schema/dtschema/meta-schemas"
],
// 4. 导入内核自带的硬件绑定规则属性(用于提示 compatible 属性)
"devicetree.defaultDeviceOrgTreeBindings": [
"/home/yang/dt-schema/dtschema/schemas",
"/root/project/linux/Documentation/devicetree/bindings"
],
vscode编辑设备树插件 devicetree LSP
bush42026-06-05 16:03
相关推荐
顧棟3 小时前
组件生命周期设计:从硬编码初始化到状态机jianqiang.xue17 小时前
Espressif-IDE进入维护模式:乐鑫把ESP32开发的宝押给VS Code2601_967980113 天前
世界上最好的Python编辑器是什么?我投PyCharm一票拼图2095 天前
VSCode 正则表达式使用指南#六脉神剑6 天前
myBuilder 11 月新版本:AI辅助设计小李不困还能学6 天前
VSCode_RemoteSSH_一直卡在下载服务器_解决教程独隅7 天前
WebStorm macOS 安装部署与高效调优完全指南独隅8 天前
WebStorm macOS 安装调优与实战效能全景