Skip to content
Back to skills

Rtic Knowledge Patch

ASecurity

RTIC

  • 25 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
developmentrustgoexpressapibackend

Works with

  • cli
  • api

Security analysis

A100/100

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

Scanned December 1, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Rtic Knowledge Patch?

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

Security grade badge for Rtic Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-rtic-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-rtic-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: rtic-knowledge-patch
description: RTIC
version: "2.4.0"
license: MIT
metadata:
  author: Nevaberry
---


# RTIC compatibility guidance

Load this skill when changing RTIC tasks, executor code, resource locking,
backend features, synchronization primitives, or monotonic timers.
Use the topic references for the complete guidance and API-specific details.

| Reference | Topics |
| --- | --- |
| [Tasks and macros](references/tasks-and-macros.md) | Local tasks, resource requirements, context lifetimes, backend features, attributes, external definitions |
| [Runtime and locking](references/runtime-and-locking.md) | Executor storage and removed APIs, wakers, source-mask and BASEPRI locks, timer interrupt priority |
| [Synchronization](references/synchronization.md) | Watch, Signal, channels, I2C/SPI arbiters, macro resolution, defmt, atomics |
| [Time and monotonics](references/time-and-monotonics.md) | Timer API, hardware support, clock and tick selection, PACs, delay traits, v1 compatibility |

## Breaking changes and deprecations

### Executor storage and removed APIs

RTIC 2.4.0 puts each async software-task executor in static storage.
Account for its RAM under `.bss`.
The release removes `init::Context::executors_size` and the
executor-allocation stack-overflow check in `init`.

It also removes `AsyncTaskExecutorPtr` and the
`AsyncTaskExecutor::new_N_args` and `AsyncTaskExecutor::from_ptr_N_args`
method families used for pointer-based executor access.

Starting in RTIC 2.1.3, the executor used for spawning must be `'static`.
Custom code that constructs an executor must give it static storage.

### Backend feature migration

When upgrading to RTIC 2.3.1, remove `cortex-m`, `esp32c3`, `esp32c6`,
`riscv`, and `riscv-slic` from the `rtic` feature list and select the target
backend. Also remove the deleted `test-critical-section` feature.

The macro crate drops its shared `riscv-slic` feature used by `riscv-clint`
and `riscv-mecall`; its build script checks that exactly one implementation
is selected.

### Local resource and mutex restrictions

RTIC 2.3.0 requires `Send` for `Local` resources initialized by `init`,
including resources used by local tasks. The macro also takes task-local
external resources into account when deciding which resources require `Send`.

In `rtic-macros` 2.3.0, generated shared-resource mutex handles are `!Send`.
Keep the handles in the task that uses them.

### External task context lifetimes

RTIC 2.1.3 supports software tasks that return `!` and gives them a
`'static` context. In 2.3.1, a non-diverging task declared in an
`extern "Rust"` block must use a non-static context lifetime such as
`task_name::Context<'_>`.

### Synchronization feature and splitting changes

The formerly unstable APIs become stable in `rtic-sync` 1.3.0.
Remove `unstable` from the dependency's Cargo feature list when upgrading.

Starting in `rtic-sync` 1.5.0, a `Signal` can be split only once.
In 1.4.0, `Channel::split()` stops panicking immediately on repeat calls,
and dropping a `Receiver` drops any items still queued in its channel.

### Timer API migration

In `rtic-time` 2.0.0, application code uses the `Monotonic` trait.
For a hardware backend, implement `TimerQueueBackend` in ticks and use
`TimerQueueBasedMonotonic` to translate those ticks into the `Instant` and
`Duration` types exposed through `Monotonic`.

`rtic-monotonics` 2.0.0 ports its timers to this API and lets you choose
the tick rate for most timers.

### nRF91 feature migration

In `rtic-monotonics` 2.2.0, choose the `-s` feature for a secure build or
`-ns` for a non-secure build. The pairs are `nrf9160-s` / `nrf9160-ns`,
`nrf9151-s` / `nrf9151-ns`, and `nrf9161-s` / `nrf9161-ns`.
Replace the deprecated `nrf9160` alias with `nrf9160-ns` to keep the
non-secure configuration.

### Custom v1 timer compatibility

`rtic-time` 1.2.0 changes the signature of
`half_period_counter::calculate_now` to fix a race; update custom callers
when upgrading. It also deprecates `Monotonic::should_dequeue_check`,
which was introduced in 1.1.0.

With `rtic-time` 1.1.0, custom `Monotonic` implementations must provide
`const TICK_PERIOD` so duration-based delays wait at least the requested
duration. The corresponding supplied-timer fix is in `rtic-monotonics` 1.4.0.

## Tasks and runtime behavior

### Local tasks

RTIC 2.3.0 adds `#[task(local_task = true)]` for tasks taking arguments
that are `!Send` or `!Sync`. Only the same executor can spawn a local task.
Starting with `rtic-macros` 2.3.1, arguments can use patterns and
`local_task = true` can appear anywhere in the task attribute.

```rust
#[task(local_task = true, priority = 1)]
async fn read(_cx: read::Context<'_>, (_port, _pin): (u8, u8)) {}
```

### Software-task wakeups and priorities

RTIC 2.2.0 exposes a public executor `waker` constructor, and
`rtic-macros` 2.2.0 generates a `waker` getter for software tasks.
Use the getter when another async component needs to wake a software task.

Since RTIC 2.0.1, the async task priority range starts at zero.
Use `priority = 0` for the lowest async priority.

When the device has a spare priority level, RTIC 2.4.0 sets
`RTIC_ASYNC_MAX_LOGICAL_PRIO` above the highest software-task priority.
This allows a monotonic timer interrupt to preempt a blocking software task.

### Resource locking

In RTIC 2.4.0, exiting a source-mask lock leaves the enable state of
interrupts outside the lock's mask alone. Shared accesses protected by a
`BASEPRI` resource lock stay inside the critical section.

### Conditional tasks and module attributes

RTIC and `rtic-macros` 2.3.0 correctly apply `#[cfg]` to hardware and
software tasks, allowing a feature or target condition to exclude a task
from the generated app. They also forward outer attributes on the RTIC
app module to generated code, so module-level attributes affect generated items.

## Synchronization quick reference

### Retain the latest value

`rtic-sync` 1.5.0 adds `Watch` for sharing the latest value.
Once initialized, it returns the latest value on each read and retains it
for later reads.

### Share I2C and SPI buses

`rtic-sync` 1.1.0 adds `rtic_sync::arbiter::i2c::ArbiterDevice` and
`rtic_sync::arbiter::spi::ArbiterDevice` for sharing buses through
`embedded-hal-async` traits. Starting in 1.2.0, match the bus and driver
to `embedded-hal` 1.0.

`rtic-sync` 1.4.0 adds `BlockingArbiterDevice` in both
`rtic_sync::arbiter::i2c` and `rtic_sync::arbiter::spi`.
Use the blocking `embedded-hal` traits in RTIC `init`, then convert to an
async `ArbiterDevice` when initialization is complete.

```rust
let async_device = blocking_device.into_non_blocking();
```

### Channel types and capacity

Since `rtic-sync` 1.2.0, `make_channel!` accepts any Rust type expression,
including a tuple.

```rust
let (sender, receiver) = rtic_sync::make_channel!((u8, u16), 4);
```

`rtic-sync` 1.5.0 correctly evaluates the compile-time check that a
`channel::Channel` has a capacity below 256.

## Timer configuration quick reference

### Clock source and prescaler

Starting in `rtic-monotonics` 2.2.0, the Cortex-M SysTick monotonic can use
its external clock source.

In `rtic-monotonics` 2.2.0, an STM32 prescaler value outside the hardware
range causes a panic. Choose a tick rate that keeps the resulting prescaler
within range for the timer's input clock.

### Delay traits and generated types

`rtic-time` 1.3.0 and `rtic-monotonics` 1.5.0 adopt stable `embedded-hal`
1.0. Use the corresponding 1.0 delay traits when passing these monotonics
to drivers.

Starting in `rtic-monotonics` 2.0.1, timer macros generate public types.
Code outside the defining module can name the generated type through that module.

Files in this skill

  • SKILL.md7.5 KB
  • coverage.json678 B
  • references/runtime-and-locking.md1.5 KB
  • references/synchronization.md2.3 KB
  • references/tasks-and-macros.md3.4 KB
  • references/time-and-monotonics.md4 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.