‹ 首页

native-sim

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

Host-based simulation using the Zephyr native_sim board. Covers building for Linux/macOS/Windows, automated testing, host-side debugging (GDB, Valgrind), and host-target integration. Trigger when developing application logic without hardware or setting up CI/CD tests.

适合你,如果需要开发 Zephyr 应用但手头没有物理开发板,或需要搭建自动化测试

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

怎么用

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

安装后,Claude 能帮助你使用 Zephyr 的 native_sim 板在主机上编译、运行和调试应用程序,无需实际硬件。它会指导你使用 west、GDB、Valgrind 等工具,以及设置自动化测试。

什么时候触发

当你需要开发 Zephyr 应用逻辑但没有硬件,或者要设置 CI/CD 测试时触发。

装好后可以这样说
Claude 会给出构建命令和运行步骤。
Claude 会指导使用 west debug 等调试流程。
Claude 会提供使用 twister 的参考和检查清单。
技能原文 SKILL.md作者撰写 · Apache-2.0 · ed63cdf

Zephyr Native Simulation

Develop, test, and debug Zephyr applications with the speed and convenience of your host machine.

Core Workflows
1. Simulation Basics

Understand when to use native_sim vs. QEMU and how to map host resources.

  • Reference: [simulation_basics.md](references/simulation_basics.md)
  • Key Tools: west build -b native_sim.
2. Host-Side Debugging

Use professional host tools to find the most elusive bugs.

  • Reference: [debugging.md](references/debugging.md)
  • Key Tools: gdb, valgrind, gprof, pcap.
3. Automated Testing (CI/CD)

The foundation of modern firmware development.

  • Reference: See the testing-debugging skill (Phase 3) for comprehensive testing workflows.
  • Key Tools: twister -p native_sim.
Quick Start
# Build for host
west build -b native_sim samples/hello_world

# Run the app
./build/zephyr/zephyr.exe

# Debug with GDB
west debug
Automation Tools
  • [native_log_scan.py](scripts/native_log_scan.py): Scan native simulation logs for common crash/failure signatures.
Examples & Templates
  • [native_sim_ci_checklist.md](assets/native_sim_ci_checklist.md): Starter checklist for CI simulation coverage.
Validation Checklist
  • [ ] west build -b native_sim succeeds for at least one sample and one app target.
  • [ ] Built binary runs on host and emits expected startup logs.
  • [ ] Host debugger (GDB/Valgrind) can attach and surface expected symbols.
  • [ ] Simulation test path is integrated into CI (for example Twister native_sim run).
Resources
  • [References](references/):
  • simulation_basics.md: Architectural overview and usage patterns.
  • debugging.md: GDB, Valgrind, and profiling guide.
  • [Scripts](scripts/):
  • native_log_scan.py: Failure signature scanner for native_sim logs.
  • [Assets](assets/):
  • native_sim_ci_checklist.md: CI simulation review checklist.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

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