Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

freertos-kernel-debug

/freertos-kernel-debug

Pomaga debugować jądro FreeRTOS: planowanie zadań, priorytety, stosy, schematy sterty, przerwania tick, API dla ISR, kolejki, semafory, timery i deadlocki.

Repozytorium
aix-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
17.07.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 17.07.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga debugować jądro FreeRTOS: planowanie zadań, priorytety, stosy, schematy sterty, przerwania tick, API dla ISR, kolejki, semafory, timery i deadlocki.

Oryginalny opis (EN)

Use when debugging FreeRTOS kernel behavior, task scheduling, priorities, stacks, heap schemes, tick interrupts, ISR APIs, queues, semaphores, timers, or deadlocks

Jak działa

  1. Overview
  2. When To Use
  3. First Questions
  4. Debug Workflow
  5. Common Failures
  6. Verification
  7. Example
Sekcje z nagłówków SKILL.md, w oryginale · 90 linii, 441 słów
Podgląd SKILL.md
---
name: freertos-kernel-debug
description: Use when debugging FreeRTOS kernel behavior, task scheduling, priorities, stacks, heap schemes, tick interrupts, ISR APIs, queues, semaphores, timers, or deadlocks
---

# FreeRTOS Kernel Debug

## Overview

Use this skill to debug FreeRTOS by proving tick, scheduler state, task stacks,
heap, ISR boundaries, and synchronization ownership. Many FreeRTOS failures are
contract violations around interrupt priority or blocking context.

## When To Use

Use this skill when:

- The user is debugging FreeRTOS tasks, queues, semaphores, mutexes, timers,
  event groups, streams, or task notifications.
- The issue involves hard faults, hangs, missed ticks, watchdog resets, stack
  overflow, heap exhaustion, priority inversion, or ISR API misuse.
- The target uses vendor HAL callbacks, Cortex-M interrupt priorities, trace
  tools, or multiple heap implementations.

Do not use this skill for RTOS-agnostic firmware architecture questions. Use
`rtos-debug` for broader RTOS triage.

## First Questions

Ask for:

- FreeRTOS version, port, MCU, tick rate, heap implementation, and config file.
- Task list with priorities, stack sizes, states, and high-water marks.
- Interrupt priorities, `configMAX_SYSCALL_INTERRUPT_PRIORITY`, and ISR APIs.
- Current symptom, fault dump, watchdog reason, trace, or scheduler snapshot.
- Whether assertions, stack overflow hook, malloc failed hook, and trace are on.

## Debug Workflow

1. Enable kernel evidence.
   Turn on `configASSERT`, stack overflow checks, malloc failed hook, and
   trace-friendly task names where possible.

1. Prove the tick and scheduler.
   Confirm SysTick/timer setup, interrupt priority, scheduler start, and idle
   task execution.

1. Audit task resources.
   Check priority, stack high-water mark, blocking calls, and CPU hogging loops.

1. Audit ISR boundaries.
   Match every ISR call to the `FromISR` API and verify interrupt priority is
   allowed to call the kernel.

1. Inspect synchronization.
   Identify queue ownership, mutex holders, priority inheritance, timeouts, and
   event group semantics.

1. Validate heap and timers.
   Confirm selected heap scheme, fragmentation risk, timer task priority, and
   timer command queue length.

## Common Failures

- An ISR above `configMAX_SYSCALL_INTERRUPT_PRIORITY` calls a FreeRTOS API.
- A normal API is called from an ISR instead of the `FromISR` variant.
- A task stack is sized for the happy path but not logging or TLS.
- A high-priority task spins and starves lower-priority work.
- Timer callbacks block or perform long operations.
- Heap implementation does not match allocation/free patterns.

## Verification

Before claiming FreeRTOS behavior is fixed:

- State kernel version, port, tick source, heap scheme, and key config symbols.
- Confirm assertions/hooks are enabled or explain why they cannot be.
- Show task state, stack margin, heap margin, and interrupt priority evidence.
- Confirm the original hang/fault/deadlock scenario no longer reproduces.

## Example

User:

```text
FreeRTOS 跑一会儿随机卡死。
```

Agent:

1. Enables `configASSERT`, stack overflow, and malloc failed hooks.
1. Captures task states, stacks, heap, and interrupt priorities.
1. Checks ISR API usage and blocking calls before changing task priorities.

Wersje

W bazie nie ma innych skilli o nazwie freertos-kernel-debug.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 28.10.2026 · wersja paczki 6739495fd705 (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100rtos-debug
    Pomaga debugować wbudowane systemy RTOS: szeregowanie, zadania, stosy, priorytety, mutexy, kolejki, przerwania i timery w FreeRTOS, RT-Thread, Zephyr, ThreadX i CMSIS-RTOS.
  • 100freertos
    Wspiera rozwój wbudowany na FreeRTOS: tworzenie zadań, priorytety, kolejki i mutexy, wykrywanie przepełnienia stosu, konfigurację FreeRTOSConfig.h oraz debugowanie z OpenOCD i GDB.
  • 100freertos-patterns
    Podaje wzorce FreeRTOS dla ESP32 i wielordzeniowego RP2040: tworzenie zadań, kolejki, synchronizacja, kontrola pamięci, powiadomienia zadań i koordynacja między rdzeniami.
  • 100freertos
    Pomaga tworzyć zadania, kolejki, semafory i mutexy FreeRTOS, wychwytywać przepełnienie stosu, pisać FreeRTOSConfig.h i debugować zadania przez OpenOCD i GDB.
  • 100embedded-rtos-design
    Wymusza architekturę systemu czasu rzeczywistego dla firmware'u wbudowanego z FreeRTOS, Zephyr i innymi RTOS: dekompozycję zadań, priorytety i współpracę z ISR.
  • 100freertos-plus-tcp-integration
    Pomaga zintegrować, przenieść, skonfigurować i debugować sieć FreeRTOS+TCP: sterowniki interfejsów, zarządzanie buforami, DHCP, gniazda i problemy TCP/IP w systemach wbudowanych.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.