AgentSkillsCN

build-system

Zephyr RTOS 的构建系统管理。涵盖 West 工作区的初始化、清单管理、Sysbuild 多镜像构建、Kconfig 符号定义,以及 CMake 集成。在设置工作区、配置构建过程,或排查构建时错误时,可触发此流程。

SKILL.md
--- frontmatter
name: build-system
description: Build system management for Zephyr RTOS. Covers West workspace initialization, manifest management, Sysbuild multi-image builds, Kconfig symbols, and CMake integration. Trigger when setting up workspaces, configuring builds, or troubleshooting build-time errors.

Zephyr Build System

Efficiently manage the complex build and configuration stack of Zephyr RTOS.

Core Workflows

1. West Workspace & Manifests

Manage multi-repo projects and dependency allow-lists.

  • Reference: west.md
  • Key Tools: west init, west update, west manifest --resolve, name-allowlist.

2. Kconfig Configuration

Tune software features and hardware parameters.

  • Reference: kconfig.md
  • Key Tools: west build -t menuconfig, symbol searching (/), help (?).

3. Sysbuild & Multi-Image

Configure complex projects like MCUboot + Application.

  • Reference: cmake.md
  • Key Tools: west build --sysbuild, sysbuild.conf.

4. CMake & Project Structure

Core build logic for applications and modules.

  • Reference: cmake.md
  • Key Tools: CMakeLists.txt, zephyr_library(), target_sources().

Automation Tools

  • find_modules.sh: Scan your build/ directory to automatically identify which modules you should add to your manifest's name-allowlist.

Resources

  • References:
    • west.md: West commands, manifests, and allow-lists.
    • kconfig.md: Project configuration and menuconfig usage.
    • cmake.md: Sysbuild and CMake API integration.
  • Scripts:
    • find_modules.sh: Automated allow-list discovery utility.