Rtos Debug logo

Rtos Debug

Community
LeoKemp223
rtos-debug

当需要进行 FreeRTOS/RT-Thread/Zephyr 的线程感知调试,查看任务列表、栈水位或死锁检测时使用。

Overview

PublisherLeoKemp223
Repositoryembed-ai-tool
Skill namertos-debug
Stars
995
Forks
168
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by LeoKemp223 on GitHub. Read the source before you install it.

Installation

Install the Rtos Debug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/LeoKemp223/embed-ai-tool/tree/master/skills/rtos-debug
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LeoKemp223/embed-ai-tool.git /tmp/embed-ai-tool
mkdir -p .claude/skills
cp -r /tmp/embed-ai-tool/skills/rtos-debug .claude/skills/rtos-debug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Rtos Debug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Rtos Debug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Rtos Debug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

RTOS 调试

适用场景

  • 固件运行了 RTOS(FreeRTOS、RT-Thread 或 Zephyr),需要查看任务状态。
  • 怀疑任务栈溢出导致 HardFault 或异常行为。
  • 需要检测死锁(所有任务都处于等待状态)。
  • 需要查看队列、信号量等内核对象状态。
  • 需要自动识别固件使用的 RTOS 类型。

必要输入

  • 带符号的 ELF 文件路径。
  • 已运行的 GDB Server(OpenOCD 或 JLinkGDBServer),通过 --port 指定 GDB 端口。
  • 可选显式指定 RTOS 类型(--rtos freertos|rt-thread|zephyr)。

自动探测

  • 通过 ELF 符号表自动判断 RTOS 类型:vTaskStartScheduler → FreeRTOS,rt_thread_init → RT-Thread,k_thread_create → Zephyr。
  • 不依赖 OpenOCD 的 RTOS awareness 功能,改用 GDB 直接读取 RTOS 内核数据结构。
  • FreeRTOS 提供完整支持(任务列表、栈水位、队列),RT-Thread/Zephyr 提供基本任务列表支持。

执行步骤

  1. 先阅读 references/usage.md 和 references/rtos-patterns.md,了解常见 RTOS 问题模式。
  2. 确保 GDB Server(OpenOCD 或 JLinkGDBServer)已在运行。
  3. 若不确定 RTOS 类型,先运行 scripts/rtos_debugger.py 的 --detect 模式。
  4. 使用 --tasks 查看任务列表和状态。
  5. 使用 --stack-check 检查各任务栈水位。
  6. 使用 --deadlock 检查死锁特征。
  7. 使用 --queues 查看队列和信号量状态。

失败分流

  • 当缺少 GDB 时,返回 environment-missing。
  • 当没有可用的 ELF 时,返回 artifact-missing。
  • 当 GDB 无法连接到 GDB Server 时,返回 connection-failure。
  • 当 ELF 中未检测到 RTOS 符号时,返回 project-config-error。
  • 当 GDB 可以连接但无法读取 RTOS 数据结构时,返回 target-response-abnormal。
  • 当无法确定 RTOS 类型时,返回 ambiguous-context。

平台说明

  • 自带脚本使用 Python 标准库和 subprocess 调用 GDB,跨平台兼容。
  • GDB Server 需要由用户或上游 skill(debug-gdb-openocd 或 debug-jlink)预先启动。
  • RTOS 数据结构读取依赖 ELF 符号信息,Release 优化可能导致部分符号被优化掉。

输出约定

  • 输出检测到的 RTOS 类型和版本(如果可获取)。
  • 输出任务列表,包含任务名、状态、优先级和栈使用信息。
  • 栈水位低于安全阈值时输出告警。
  • 死锁检测结果以明确的是/否形式输出。
  • 在 Project Profile 中更新 rtos 字段。

交接关系

  • 当确认栈溢出时,建议使用 memory-analysis 分析固件内存布局。
  • 当需要更深入的单步调试时,交给 debug-gdb-openocd 或 debug-jlink。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Rtos Debug AI skill do?

当需要进行 FreeRTOS/RT-Thread/Zephyr 的线程感知调试,查看任务列表、栈水位或死锁检测时使用。

Why use Rtos Debug on TypingMind?

Because you install it once and use it with any model. Rtos Debug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Rtos Debug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LeoKemp223/embed-ai-tool/tree/master/skills/rtos-debug. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Rtos Debug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Rtos Debug?

As many as you like. As long as a model supports skills, you can use Rtos Debug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Rtos Debug AI skill free?

It is published on GitHub by LeoKemp223. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇