-
下载 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
相关推荐
摇滚侠8 天前
IDEA 创建 Java 项目 手动整合 SSM 框架霸道流氓气质9 天前
Trae IDE 新手入门指南爱就是恒久忍耐9 天前
VSCode里如何比较2个branch意法半导体STM329 天前
【官方原创】如何为STM32CubeMX2配置Visual Studio Code配置方案bloglin999999 天前
vscode中可视化的合并分支,在“合并编辑器中解析”中“与基线进行比较”是什么意思终将老去的穷苦程序员9 天前
IntelliJ IDEA 的安装教程天疆说9 天前
在 Ubuntu 的 VSCode 中配置 MATLAB春日见10 天前
vscode的AI编程插件推荐:lazy H10 天前
Spring Boot 项目如何连接 Redis?新手入门配置和常见错误总结2601_9620549510 天前
终端与IDE形态的vibe coding实测:两款AI编程工具迭代能力对比