Skip to content
Skills Library
Programming · Testing

rtos-debug

/rtos-debug

Use when debugging embedded RTOS scheduling, tasks, threads, stacks, priorities, mutexes, queues, interrupts, timers, or FreeRTOS, RT-Thread, Zephyr, ThreadX, or CMSIS-RTOS issues

Repository
aix-skills ↗
Licence
MIT
Last repository change
17.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 17.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when debugging embedded RTOS scheduling, tasks, threads, stacks, priorities, mutexes, queues, interrupts, timers, or FreeRTOS, RT-Thread, Zephyr, ThreadX, or CMSIS-RTOS issues

Original author description

Use when debugging embedded RTOS scheduling, tasks, threads, stacks, priorities, mutexes, queues, interrupts, timers, or FreeRTOS, RT-Thread, Zephyr, ThreadX, or CMSIS-RTOS issues

How it works

  1. Overview
  2. When To Use
  3. First Questions
  4. Workflow
  5. Checks
  6. Verification
  7. Common Failures
  8. Example
Original SKILL.md headings · 91 lines, 495 words
SKILL.md preview
---
name: rtos-debug
description: Use when debugging embedded RTOS scheduling, tasks, threads, stacks, priorities, mutexes, queues, interrupts, timers, or FreeRTOS, RT-Thread, Zephyr, ThreadX, or CMSIS-RTOS issues
---

# RTOS Debug

## Overview

Use this skill to debug RTOS problems by separating scheduler state, task stack health, synchronization, interrupt priority, timing, and resource ownership. Start from observable RTOS state before changing priorities or adding delays.

## When To Use

Use this skill when:

- Firmware uses FreeRTOS, RT-Thread, Zephyr, ThreadX, CMSIS-RTOS, or another embedded scheduler.
- The user reports deadlock, starvation, missed events, queue timeout, stack overflow, watchdog reset, priority inversion, or task not running.
- The issue involves ISR-to-task signaling, timers, semaphores, mutexes, message queues, or task notifications.

Do not use this skill before the target is known to boot and run at least some firmware. For RTOS-specific deep dives, prefer `freertos-kernel-debug`, `zephyr-integration`, or `rt-thread-integration` when the RTOS is identified.

## First Questions

Ask for:

- RTOS name/version and MCU/SoC.
- Symptom and when it occurs.
- Task list with priorities, stack sizes, and key responsibilities.
- Whether stack overflow checking, runtime stats, trace, or thread awareness is enabled.
- ISR sources involved and interrupt priorities.
- Logs, asserts, watchdog reason, or debugger task view.

## Workflow

1. Confirm the scheduler starts.
   Verify the system reaches scheduler start and at least one known task runs.

1. Capture task state.
   Collect task names, states, priorities, stack high water marks, CPU/runtime stats, and blocked objects.

1. Check stack and heap first.
   Stack overflow and heap exhaustion often masquerade as random RTOS failures.

1. Inspect synchronization.
   Identify which task owns each mutex, which queue is full/empty, and whether ISR-safe APIs are used from interrupts.

1. Check interrupt priority rules.
   Ensure ISR priorities are legal for RTOS API calls and do not starve the scheduler tick.

1. Replace guesses with probes.
   Use trace hooks, assertions, watermarks, counters, or event logs instead of adding arbitrary delays.

## Checks

- Stack high water mark for each task.
- Heap free/minimum ever free.
- Tick interrupt running at expected rate.
- Watchdog servicing task not starved.
- Mutex ownership and recursive/non-recursive mismatch.
- Queue length, item size, send/receive timeout.
- ISR uses correct `FromISR` APIs where required.
- Critical sections are short and bounded.
- Priority inversion protection exists where shared resources are used.

## Verification

Before claiming RTOS progress:

- State RTOS, scheduler status, task states, and stack/heap evidence.
- Identify the blocked or starving task and the object it waits on.
- State whether interrupt priorities are legal for RTOS API usage.
- Report any assertion, watchdog, or stack overflow hook evidence.

## Common Failures

- Raising task priority without knowing why it is blocked.
- Adding delays to hide races.
- Calling non-ISR-safe APIs from interrupts.
- Ignoring stack high water marks.
- Debugging a queue payload before confirming queue item size and ownership.

## Example

User:

```text
FreeRTOS 有个任务偶尔不跑,最后看门狗复位。
```

Agent:

1. Asks for task list, priorities, stack sizes, watchdog owner, and task states.
1. Checks high water marks, heap, tick, and blocked objects.
1. Verifies ISR priority and queue/mutex ownership before suggesting priority changes.

Versions

The database has no other skills named rtos-debug.

Database snapshot: 13.11.2026 · package version fdb88ed36615 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100embedded-rtos-design
    Use when designing, generating, or reviewing RTOS-based embedded firmware (FreeRTOS, CMSIS-RTOS2, RT-Thread, Zephyr, ThreadX) for STM32, GD32, ESP32, drone flight controllers, and robotics projects. Enforces real-time system architecture — task decomposition, scheduling,…
  • 90rtos-task-design
    Decompose firmware into RTOS tasks with deadline-derived priorities, queue-based communication, and priority-inversion defenses. Use when structuring FreeRTOS/Zephyr-class applications or debugging missed deadlines.
  • 100rtos
    Use this skill when the user says 'FreeRTOS', 'RTOS task', 'xTaskCreate', 'task priority', 'mutex vs semaphore', 'priority inversion', 'task notification', 'stack overflow in task', 'Zephyr thread', 'RTOS queue', 'ISR to task'. Designs and reviews code on a real-time kernel…
  • 100freertos-kernel-debug
    Use when debugging FreeRTOS kernel behavior, task scheduling, priorities, stacks, heap schemes, tick interrupts, ISR APIs, queues, semaphores, timers, or deadlocks
  • 100freertos
    FreeRTOS skill for embedded RTOS development. Use when creating tasks, managing priorities, using queues and mutexes, detecting stack overflows, configuring FreeRTOS via FreeRTOSConfig.h, or debugging FreeRTOS applications with OpenOCD and GDB. Activates on queries about…
  • 90embedded-rtos
    Embedded, firmware, and real-time systems architecture: bare-metal vs RTOS (FreeRTOS/Zephyr), real-time scheduling (RMS/EDF), WCET and schedulability, priority inversion, interrupt latency, memory/energy budgets, MMU-less design. USE WHEN: designing firmware/embedded/IoT/MCU…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.