‹ 首页

devicetree

@beriberikix · 收录于 昨天 · 上游提交 2 个月前

Devicetree management for Zephyr RTOS. Covers syntax, bindings, overlays, Hardware Model v2 (HWMv2), and advanced node/property deletion patterns. Trigger when defining hardware topology, creating overlays, or mapping pins and peripherals.

For you if you need to define hardware topology or peripherals with Zephyr RTOS

/ 通过 npx 安装 校验哈希
npx oh-my-skill add beriberikix/zephyr-agent-skills/devicetree
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- beriberikix/zephyr-agent-skills/devicetree
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify beriberikix/zephyr-agent-skills/devicetree
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
58GitHub stars
~547最小装载
~1.7K含声明引用
~1.8K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 ed63cdf · 表述以原文为准
它做什么

Claude 能帮你创建和修改 Zephyr 项目的硬件描述文件(Devicetree),包括节点、属性、绑定和覆盖。还会验证配置并提供正确语法。

什么时候触发

当你要求定义硬件拓扑、创建设备覆盖或分配引脚外设时触发。

装好后可以这样说
Claude 会生成对应的 overlay 代码。
Claude 会运行语法检查并反馈问题。
技能原文 SKILL.md作者撰写 · Apache-2.0 · ed63cdf

Zephyr Devicetree

The Devicetree (DT) is the source of truth for your hardware topology in Zephyr.

Core Workflows
1. Understanding Syntax & Nodes

Nodes, properties, and phandles form the hierarchy.

  • Reference: [dt_syntax.md](references/dt_syntax.md)
  • Key Tools: Labels (&label), Properties (reg, status, compatible).
2. Working with Bindings

Mapping hardware descriptions to driver schemas.

  • Reference: [dt_bindings.md](references/dt_bindings.md)
  • Key Tools: YAML bindings, compatible strings, pinctrl.
3. Application Overlays & HWMv2

Modifying board behavior for specific application needs.

  • Reference: [dt_overlays.md](references/dt_overlays.md)
  • Key Tools: .overlay files, zephyr,chosen, variant-specific overlays.
4. Advanced Hardware Modification

Deleting and redefining nodes/properties for product variants.

  • Reference: [dt_overlays.md](references/dt_overlays.md#advanced-customization-from-golioth)
  • Key Tools: /delete-node/, /delete-property/.
Quick Start (Overlay)
/* app.overlay */
&i2c1 {
  status = "okay";
};

&uart0 {
  status = "disabled";
};
Tooling & Validation
  • west build -t rom_report: See how devicetree definitions impact memory.
  • build/zephyr/zephyr.dts: Inspect the FINAL resolved devicetree after all overlays are applied.
  • build/zephyr/include/generated/zephyr/devicetree_generated.h: Inspect generated DT macros consumed by C code.
Automation Tools
  • [overlay_include_check.py](scripts/overlay_include_check.py): Run basic sanity checks on .overlay files.
Examples & Templates
  • [app_overlay_template.overlay](assets/app_overlay_template.overlay): Starter overlay with common node status changes.
Validation Checklist
  • [ ] Overlay compiles with no DTS syntax errors during west build.
  • [ ] Expected node status/properties are present in build/zephyr/zephyr.dts.
  • [ ] Expected DT macros exist in build/zephyr/include/generated/zephyr/devicetree_generated.h.
  • [ ] Application runs with peripherals enabled/disabled exactly as described by the overlay.
Resources
  • [References](references/):
  • dt_syntax.md: Core syntax and properties.
  • dt_bindings.md: Binding definitions and compatible mapping.
  • dt_overlays.md: Overlays, HWMv2, and deletion patterns.
  • [Scripts](scripts/):
  • overlay_include_check.py: Overlay sanity checker.
  • [Assets](assets/):
  • app_overlay_template.overlay: Baseline overlay template.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。