本文へ移動
cccskills
無料GitHub で公開

storage

Storage management for Zephyr RTOS. Covers Non-Volatile Storage (NVS) for persistent settings, flash partition management in Devicetree, and runtime flash layout access. Trigger when implementing persistent data storage, managing flash wear leveling, or configuring device partitions.

インストール方法を見る

含まれるファイル(6)

  • SKILL.md2.5 KB
  • assets/partition_overlay_template.overlay570 B
  • references/flash_management.md2.2 KB
  • references/nvs_storage.md2.0 KB
  • scripts/nvs_id_lint.py2.4 KB
  • skill-meta.yaml579 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Zephyr Storage

Implement reliable persistent data handling using Zephyr's storage subsystem and flash management utilities.

Core Workflows

1. NVS Storage

Utilize Non-Volatile Storage (NVS) for efficient, wear-leveled data persistence.

  • Reference: nvs_storage.md
  • Key Tools: nvs_mount(), nvs_read(), nvs_write().

2. Flash Management

Configure and manage flash partitions and hardware page layouts.

  • Reference: flash_management.md
  • Key Tools: fixed-partitions, FLASH_MAP, flash_get_page_info_by_offs().

Quick Start (NVS Write)

#include <zephyr/storage/nvs/nvs.h>

void save_data(struct nvs_fs *fs, uint16_t id, void *data, size_t len) {
    nvs_write(fs, id, data, len);
}

Professional Patterns (Reliability)

  • Settings Integration: Use NVS as the backend for the settings subsystem for a standard key-value configuration experience.
  • Collision Prevention: Define NVS Entry IDs in a centralized header file to prevent accidental overwrites across modules.
  • Runtime Layout Checks: Always query the flash controller for page sizes (flash_get_page_layout) rather than assuming hardcoded sector sizes.

Automation Tools

  • nvs_id_lint.py: Detect duplicate NVS_ID_* macro values across source/header files.

Examples & Templates

Validation Checklist

  • nvs_mount() succeeds on boot for the configured storage partition.
  • Written values survive reset and read back with matching length and content.
  • Partition layout in DTS matches runtime flash-map queries.
  • Repeated write cycles do not produce mount/read corruption errors.

Resources

  • References:
    • nvs_storage.md: Using NVS for data blobs and integers.
    • flash_management.md: Devicetree partitions and page information.
  • Scripts:
    • nvs_id_lint.py: Duplicate ID detector for NVS namespaces.
  • Assets:
    • partition_overlay_template.overlay: Flash partitioning template.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Custom board bringup for Zephyr RTOS using Hardware Model v2 (HWMv2). Covers directory structure, board.yml metadata, core configuration files (Kconfig, defconfig, CMake), and revision management. Trigger when creating new board definitions or porting Zephyr to custom hardware.

日本語の概要は準備中です。原文の説明を表示しています。

beriberikix/zephyr-agent-skills692026年5月19日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

beriberikix/zephyr-agent-skills692026年5月19日 更新

Bluetooth Low Energy (BLE) integration for Zephyr RTOS. Covers GATT Services/Characteristics, GAP advertising, connection parameters, power optimization strategies, and the professional Send-When-Idle design pattern. Trigger when adding BLE connectivity, optimizing battery life for wireless devices, or implementing custom GATT profiles.

日本語の概要は準備中です。原文の説明を表示しています。

beriberikix/zephyr-agent-skills692026年5月19日 更新

IP networking fundamentals for Zephyr RTOS. Covers IoT protocol selection (LwM2M, CoAP, MQTT), IP stack configuration and trimming (IPv4/IPv6, UDP/TCP), and professional SDK integration as Zephyr modules using West manifests. Trigger when building cloud-connected applications, optimizing network memory usage, or integrating external cloud SDKs.

日本語の概要は準備中です。原文の説明を表示しています。

beriberikix/zephyr-agent-skills692026年5月19日 更新

USB and CAN connectivity for Zephyr RTOS. Covers USB device stack configuration (CDC ACM, HID, MSC), CAN controller integration, and professional USB-to-CAN adapter patterns including buffering and protocol packetization. Trigger when adding USB interfaces, implementing CAN bus communication, or building hardware diagnostic tools.

日本語の概要は準備中です。原文の説明を表示しています。

beriberikix/zephyr-agent-skills692026年5月19日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

beriberikix/zephyr-agent-skills692026年5月19日 更新

beriberikix のスキルをすべて見る

このスキルの問題を報告する