cmbacktrace-integration
Skill36 starsChanged 5 months agoMITView on GitHub
Use when integrating, porting, configuring, or debugging CmBacktrace on Cortex-M faults, stack traces, firmware metadata, fault handlers, or crash logs
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- bootloader-debugSkill
- canbus-integrationSkill
- canopen-integrationSkill
- cellular-at-modem-integrationSkill
- cmsis-dsp-integrationSkill
- cortex-m-debugSkill
- cortex-r5-debugSkill
- crc-checksum-integrationSkill
- easylogger-integrationSkill
- embedded-app-example-libsSkill
- embedded-buffer-queue-libsSkill
- embedded-data-parsing-libsSkill
- embedded-debug-entrySkill
- embedded-fault-debugSkill
- embedded-framework-libsSkill
- embedded-input-libsSkill
- embedded-library-entrySkill
- embedded-linux-login-debugSkill
- embedded-peripheral-bringupSkill
- embedded-serial-log-debugSkill
- embedded-state-machine-libsSkill
- embedded-timing-libsSkill
- epd-integrationSkill
- esp-idf-integrationSkill
- fatfs-integrationSkill
- flashdb-integrationSkill
- freemodbus-integrationSkill
- freertos-kernel-debugSkill
- freertos-plus-tcp-integrationSkill
- gnss-gps-integrationSkill
- hardware-interface-debugSkill
- heatshrink-integrationSkill
- letter-shell-integrationSkill
- littlefs-integrationSkill
- low-power-debugSkill
- lvgl-integrationSkill
- lwip-integrationSkill
- mbedtls-integrationSkill
- mcuboot-integrationSkill
- mcu-flashing-debugSkill
- micro-ecc-integrationSkill
- miniz-integrationSkill
- mqtt-embedded-integrationSkill
- nanopb-integrationSkill
- nrf-connect-sdk-integrationSkill
- nr-micro-shell-integrationSkill
- openocd-jlink-stlink-debugSkill
- openthread-integrationSkill
- ota-update-integrationSkill
- plooc-integrationSkill
- power-management-integrationSkill
- qspi-xip-flash-debugSkill
- readme-writingSkill
- riscv-mcu-debugSkill
- rtos-debugSkill
- rt-thread-integrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to integrate CmBacktrace as a Cortex-M crash diagnosis tool.
- Distinctive: line 14
Use this skill when:
- Very specific: line 20
Do not use this skill for non-Cortex-M faults.
- Distinctive: line 36
Call CmBacktrace from the HardFault/fault handling path before reset and before clearing fault state.
- Distinctive: line 45
Ensure the saved crash output can be mapped to the exact ELF/MAP file used to build the flashed image.
- Distinctive: line 50
Verify with a controlled fault.
- Distinctive: line 64
No output because UART/logger is not safe inside HardFault.
- Distinctive: line 72
Before claiming CmBacktrace works:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CmBacktrace Integration
Overview
Use this skill to integrate CmBacktrace as a Cortex-M crash diagnosis tool. The key is to preserve fault context, provide correct firmware metadata, route output safely, and verify that backtraces map to the running ELF.
When To Use
Use this skill when:
- The target is Cortex-M and the user wants automatic fault diagnosis or stack backtraces.
- The issue involves HardFault, fault handlers, register dumps, firmware name/version/hardware version, or crash logs.
- The project uses or plans to use CmBacktrace.
Do not use this skill for non-Cortex-M faults. Use embedded-fault-debug or the architecture-specific debug skill instead.
First Questions
Ask for:
- MCU/core, compiler, optimization level, and build flags.
- Fault handler code and whether the system resets immediately.
- Output backend for crash text: UART, RTT, flash, EasyLogger, shell, or custom.
- Firmware metadata values and where they are defined.
- Whether the ELF/MAP file matching the running image is available.
- Current fault output or absence of output.
Integration Checklist
- Integrate in the fault path. Call CmBacktrace from the HardFault/fault handling path before reset and before clearing fault state.
- Provide metadata. Firmware name, hardware version, software version, and platform identifiers should be meaningful enough for field logs.
- Keep output safe. Crash output must not block forever, allocate heavily, or depend on services that may be corrupted.
- Match symbols. Ensure the saved crash output can be mapped to the exact ELF/MAP file used to build the flashed image.
- Account for compiler behavior. Optimization, frame pointer omission, link-time optimization, and stripped symbols can reduce backtrace quality.
- Verify with a controlled fault. Trigger a known null pointer or assert in a lab build, then confirm the report identifies the expected function.
Porting Checks
- Fault handler does not reset before CmBacktrace runs.
- Stack pointer and fault stack frame are still valid when called.
- Output route is initialized early or has a crash-safe fallback.
- RTOS task stack ranges are known if task-aware backtracing is expected.
- Watchdog timeout is long enough to emit crash data or is handled intentionally.
- Crash logs stored to flash do not erase unrelated data without approval.
Common Failures
- No output because UART/logger is not safe inside HardFault.
- Backtrace points to wrong functions because ELF does not match firmware.
- System resets before crash report completes.
- Optimized build produces shallow or confusing backtrace.
- Crash handler recursively faults while printing too much.
Verification
Before claiming CmBacktrace works:
- State MCU/core, compiler, output backend, and firmware metadata.
- Confirm a controlled crash produces a report.
- Confirm the report maps to the expected function in the matching ELF.
- Confirm reset/watchdog behavior after report.
- State whether persistent crash storage is used and how data loss is avoided.
Example
User:
想在 Cortex-M 项目里接 cmbacktrace,HardFault 后能看到调用栈。Agent:
- Asks for MCU, compiler flags, HardFault handler, output backend, and matching ELF.
- Ensures CmBacktrace runs before reset and output is crash-safe.
- Uses a controlled fault to verify report generation and symbol mapping.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

