Get the FREE Ultimate OpenClaw Setup Guide →

build-system

npx machina-cli add skill beriberikix/zephyr-agent-skills/build-system --openclaw
Files (1)
SKILL.md
1.7 KB

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.

Source

git clone https://github.com/beriberikix/zephyr-agent-skills/blob/main/skills/build-system/SKILL.mdView on GitHub

Overview

This skill streamlines Zephyr RTOS build system management, covering West workspace initialization, manifest management, Sysbuild multi-image configuration, Kconfig tuning, and CMake integration. It helps teams set up reliable workspaces, configure complex builds, and quickly troubleshoot build-time errors.

How This Skill Works

It orchestrates West commands (west init, west update, manifest resolution), Kconfig menus, Sysbuild options, and CMake project structure. The automation script find_modules.sh scans the build/ directory to auto-discover modules for the manifest's name-allowlist.

When to Use It

  • Setting up a new Zephyr workspace
  • Troubleshooting build-time errors in a multi-image Sysbuild
  • Automatically adding modules to the manifest's name-allowlist
  • Tuning software features and hardware parameters via Kconfig
  • Integrating CMake changes for applications and modules

Quick Start

  1. Step 1: Initialize and update the West workspace (west init <path> && west update)
  2. Step 2: Configure Kconfig and Sysbuild (use west build -t menuconfig, adjust symbols, set up sysbuild.conf)
  3. Step 3: Validate the build (check CMakeLists.txt, zephyr_library usage, and run west build --sysbuild)

Best Practices

  • Start with a clean West workspace using west init and west update
  • Keep the manifest name-allowlist focused with automated module discovery
  • Use west build --sysbuild for multi-image projects like MCUboot + App
  • Utilize Kconfig via menuconfig or symbol search to adjust features
  • Regularly verify CMakeLists.txt, zephyr_library(), and target_sources for new modules

Example Use Cases

  • Configuring a MCUboot + Application Sysbuild workflow
  • Managing a large Zephyr project across multiple repos with a manifest allowlist
  • Automating module discovery with find_modules.sh and updating the allowlist
  • Tuning Kconfig symbols across images using menuconfig and symbol search
  • Diagnosing build-time issues through CMake integration and project structure checks

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers