Skip to content
Back to skills

Zephyr Knowledge Patch

ASecurity

Zephyr RTOS

  • 25 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 5, 2026
developmentpythongoshellnodetestingapibackendsecurity

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill zephyr-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Zephyr Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Zephyr Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-zephyr-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-zephyr-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: zephyr-knowledge-patch
description: Zephyr RTOS
version: "4.5.0"
license: MIT
metadata:
  author: Nevaberry
---


# Zephyr RTOS Compatibility

Load this skill when migrating Zephyr applications, board definitions, drivers,
configuration, or tests, or when using the APIs and services indexed below.
Use the topic references for complete migration details and examples.
Reference entries retain their source batch attribution; consult it when applying
an intermediate migration or a maintenance-release fix.

## Reference index

| Reference | Topics |
| --- | --- |
| [Builds, boards, and testing](references/build-boards-testing.md) | Toolchains, CMake, sysbuild, runners, board targets, simulation, Twister, SBOMs, release support |
| [Kernel and architecture](references/kernel-architecture.md) | Core APIs, pipes, scheduling, memory, userspace, exception handling, POSIX |
| [Devicetree and drivers](references/devicetree-drivers.md) | Bindings, macros, ADC, DAC, comparators, buses, clocks, GPIO, sensors, power and memory hardware |
| [Bluetooth](references/bluetooth.md) | Host and controller migration, HCI, buffers, pairing, GATT, LE Audio, Classic, Mesh |
| [Networking and protocols](references/networking-protocols.md) | Sockets, Ethernet, Wi-Fi, OpenThread, HTTP, CoAP, LwM2M, MQTT, routing, radio transports |
| [Security, storage, and updates](references/security-storage-update.md) | PSA Crypto, Mbed TLS, TF-M, Secure Storage, flash, filesystems, MCUboot, OTA, MCUmgr |
| [Graphics, input, and USB](references/graphics-input-usb.md) | Displays, LVGL, video, media pipelines, input, haptics, stepper controllers, USB |
| [Application subsystems](references/application-subsystems.md) | Device lifecycle, power management, Zbus, state machines, RTIO, shell, logging, tracing, encoding |

## Breaking changes and deprecations

### Build prerequisites and generated headers

Upgrade to Python 3.12 or later and Zephyr SDK 1.0.0 or later.
The default minimum C standard is C17; a toolchain without C17 support can still
select the deprecated `CONFIG_STD_C99` or `CONFIG_STD_C11`.
If an application CMake library including `<zephyr/kernel.h>` can compile before
`zephyr/heap_constants.h` exists, give it a dependency on `zephyr_generated_headers`.

### Application snippets and board qualifiers

The application source directory is no longer added to `SNIPPET_ROOT` automatically.
Set `snippet_root` in `zephyr/module.yml` or add the directory in application CMake
before finding Zephyr. `BOARD_QUALIFIERS` omits its leading slash; construct qualified
targets with `${BOARD}/${BOARD_QUALIFIERS}`. Add `full_name` to new `board.yml` entries.

### Devicetree validation

Replace `status = "ok";` with `status = "okay";`.
Binding defaults for `status`, `#address-cells`, and `#size-cells` are rejected;
move the required values into the affected nodes.
Use `DT_REG_ADDR_RAW` variants for addresses used as Devicetree indices.
Register address and size macros emit unsigned C literals with a `U` suffix;
only address macros have raw variants.

### Core API and configuration names

Replace `K_THREAD_STACK_MEMBER` with `K_KERNEL_STACK_MEMBER`, `ceiling_fraction`
with `DIV_ROUND_UP`, and `struct z_arch_esf_t` with `struct arch_esf`.
Replace `CONFIG_MP_NUM_CPUS` with `CONFIG_MP_MAX_NUM_CPUS`,
`CONFIG_SCHED_DUMB` with `CONFIG_SCHED_SIMPLE`, and `CONFIG_WAITQ_DUMB`
with `CONFIG_WAITQ_SIMPLE`. The deprecated scheduler and wait-queue aliases are removed.

### Kernel pipes

The legacy pipe object API is removed. Replace `k_pipe_put()` and `k_pipe_get()`
with `k_pipe_write()` and `k_pipe_read()`, both flush calls with `k_pipe_reset()`,
and dynamic allocation with caller-provided storage. Transfers return the byte
count and drop `min_xfer`; callers must handle minimum-transfer requirements.
Closing wakes pending readers and writers with an error and allows buffered data
to drain. Reinitialize with `k_pipe_init()` before further writes or reads beyond
the buffered data.

### Networking namespaces and callback types

Use `net_`, `NET_`, or `ZSOCK_` identifiers from networking headers, or temporarily
include `<zephyr/net/net_compat.h>` for old names. Include POSIX headers directly
when calling POSIX APIs. `CONFIG_NET_SOCKETS_POSIX_NAMES` is removed; enable
`CONFIG_POSIX_API=y` for BSD names or use `zsock_` functions with POSIX APIs disabled.
Network-management event and request handlers take `uint64_t` values.
Use `socklen_t` for socket API lengths; it is always `uint32_t`.

### HTTP callback and transaction migration

Read request payload, length, and headers from `struct http_request_ctx`.
Dynamic resource callbacks take `enum http_transaction_status`; reset resource
state on `HTTP_SERVER_TRANSACTION_COMPLETE` after the response has been sent.
HTTP services enforce `_concurrent` and `_backlog` and honor `_config`.
HTTP client response callbacks return `int`: return `0` to continue processing,
or use the return value to abort the connection.

### Crypto modules and provider selection

Mbed TLS 4.1.0 provides TLS and X.509; cryptography comes from the separate
TF-PSA-Crypto 1.1.0 west module. Run `west update` to fetch it.
TF-M still builds with Mbed TLS 3.6.5.
TinyCrypt is removed; use PSA Crypto for new code and migrating TinyCrypt users.
`CONFIG_PSA_CRYPTO=y` selects the TF-M provider with `CONFIG_BUILD_WITH_TFM=y`
and the Mbed TLS provider otherwise; an application can select
`CONFIG_PSA_CRYPTO_PROVIDER_CUSTOM` for its own provider.

### Secure Storage persistence

The default `psa_storage_uid_t` width changed from 64 to 30 bits, causing
authentication of previously stored entries to fail with the new default.
Set `CONFIG_SECURE_STORAGE_64_BIT_UID=y` when upgrading an installation that
needs to retain existing entries. Enable the selected store backend's dependencies
explicitly. OpenThread's default PSA security configuration without TF-M implies
Secure Storage, which requires a Settings, ZMS, or custom backend for PSA ITS.

### MCUboot layouts and TF-M updates

MCUboot defaults to swap using offset. Rebalance layouts optimized for swap using
move so the secondary slot has one more sector than the primary, or use equal-sized
slots. Keep a move layout with `SB_CONFIG_MCUBOOT_MODE_SWAP_USING_MOVE=y`.
For TF-M firmware updates, use the signed secure and non-secure BIN artifacts.
Updated images are unconfirmed by default; call `psa_fwu_accept()` after successful
boot to prevent rollback on the next reboot.

### Bluetooth connection and security contracts

Initialize `struct bt_conn *` output variables to `NULL` before
`bt_conn_le_create()` or `bt_conn_le_create_synced()`.
`bt_le_set_auto_conn()` is removed; implement reconnection in the application
when `bt_conn_cb.disconnected` runs. LE pairing defaults to Secure Connections only.
Legacy LE passkey entry no longer provides authenticated MITM protection, and
stored bonds made with that method are downgraded to unauthenticated when loaded.
For outgoing CIS security, call `bt_conn_set_security()` on the ACL connection
before `bt_iso_chan_connect()`.

### Bluetooth buffers, audio, and Mesh persistence

`CONFIG_BT_BUF_ACL_RX_COUNT` is removed. Additional receive buffers use
`CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA`; the default allocation is `CONFIG_BT_MAX_CONN + 1`.
Call `bt_pacs_register()` before `bt_ascs_register()`.
Enable `CONFIG_UTF8=y` with `CONFIG_BT_AUDIO`.
Persistent Mesh keys are incompatible across TinyCrypt-to-Mbed TLS PSA or
TinyCrypt-to-TF-M PSA upgrades: unprovision before updating and reprovision afterward.
For Mesh DFU, use `BT_MESH_DFU_EFFECT_UNPROV`.

### Driver and watchdog contracts

`device_init()` returns negative errno values for initialization failures.
Declare out-of-tree API tables for upstream driver classes with `DEVICE_API()`.
DMA API calls must move to supervisor-mode code because user-mode syscalls are gone.
Configure watchdog timeouts and start the watchdog explicitly in the application;
`CONFIG_WDT_DISABLE_AT_BOOT=n` no longer starts it automatically.
Check `uart_irq_tx_ready(dev) > 0`; a positive value is a lower bound on the bytes
`uart_fifo_fill()` can accept without truncation.

### USB, video, and stepper migration

The UDC-based USB device stack is the default; the legacy stack is deprecated
and scheduled for removal in 4.5. Replace `uvc_set_video_dev()` and `uvc_add_format()`
with `uvc_device_init()` and `uvc_device_add_format()`.
Size video buffers with `video_format.size`; the old line-count capability fields
are removed. `CONFIG_VIDEO_BUFFER_POOL_HEAP_SIZE` sizes the entire pool in bytes.
Use `stepper_ctrl_*` on controllers for motion calls, including `move_by`, `move_to`,
`run`, `stop`, and `set_microstep_interval`.

### Maintenance fixes with deployment impact

Upgrade HTTP static-filesystem deployments to 4.4.2 for the web-root path-traversal
fix. Upgrade devices mounting externally supplied ext2 images to 4.4.2 for mount
geometry validation, and WireGuard endpoints for receive-side replay and
packet-length fixes. The references retain the associated CVE identifiers.

## New APIs and development tools

### Storage and messaging

ZMS supports NOR flash and nonvolatile media such as MRAM and RRAM that can be
written without a separate erase operation. Secure Storage exposes PSA Secure
Storage and persistent PSA Crypto keys on all board targets.
Enable `CONFIG_ZBUS_ASYNC_LISTENER` for observers invoked in workqueue context.
Zbus proxy agents that forward channel data across domains are experimental.

### Networking and media

Enable MQTT 5.0 with `CONFIG_MQTT_VERSION_5_0=y`.
Zephyr exposes QUIC and supports HTTP/3 in its HTTP server; its RTP stack implements
RFC 3550 for media streams over UDP. SSH supports client and server endpoints,
including a shell backend. The MCP server exposes device tools to agents.
The experimental `mpipe` subsystem links source, transform, and sink elements
into a zero-copy media pipeline.

### Diagnostics and tests

Use dtdoctor for Devicetree build errors and `west build -t traceconfig` in a
configured build to inspect Kconfig origins and final values.
Use `LOG_INF_RATELIMIT()` and its level and hexdump variants for per-call-site
rate limiting; enable it with `CONFIG_LOG_RATELIMIT=y`.
Twister supports power and display harnesses, multiple devices under test, and
multiple toolchains. `west spdx` supports SPDX 3 SBOMs with build profiles,
linked prebuilt libraries, and package identifiers for vulnerability matching.

### Heap diagnostics

For heap memory error detection, use `CONFIG_SYS_HEAP_SANITIZER_ASAN=y` on
`native_sim` or `CONFIG_SYS_HEAP_KASAN=y` on a hardware target.
Use `ZASSERT()` when assertion levels need per-module or per-file control.

Files in this skill

  • SKILL.md11.2 KB
  • coverage.json1.3 KB
  • references/application-subsystems.md3.3 KB
  • references/bluetooth.md12.9 KB
  • references/build-boards-testing.md10.2 KB
  • references/devicetree-drivers.md28 KB
  • references/graphics-input-usb.md12.5 KB
  • references/kernel-architecture.md9.8 KB
  • references/networking-protocols.md17.5 KB
  • references/security-storage-update.md15.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.