BFD Register Capture
Self-Improvement Loop (Required)
- When this skill encounters a build, flash, debug, script-usage, or other workflow problem, do not stop at the local workaround after the issue is solved.
- Record the resolved issue and lesson in
BFD-Kit/.learnings/ERRORS.mdand/orBFD-Kit/.learnings/LEARNINGS.md; unresolved capability gaps go toBFD-Kit/.learnings/FEATURE_REQUESTS.md. - Promote reusable fixes into the affected BFD-Kit asset in the same task when feasible: update the relevant
SKILL.md, script, wrapper, or resource so the next run benefits by default. - When a learning is promoted into a skill or script, append a short entry to
BFD-Kit/.learnings/CHANGELOG.mdand mention the improvement in the task close-out.
Use this skill to capture register evidence with repeatable scripts.
Quick Start
- Run bootstrap profile first.
- Select peripheral and register set.
- Capture short first, then extend duration.
Core Commands
# 0) Bootstrap profile (required)
python3 ./.codex/skills/bfd-project-init/scripts/bootstrap.py --project-root . --mode check
# USART1, 1 second
./.codex/skills/bfd-register-capture/scripts/capture_registers.sh -p USART1 -d 1 -o logs/debug/usart1_1s.csv
# FDCAN1 key status registers
./.codex/skills/bfd-register-capture/scripts/capture_registers.sh -p FDCAN1 -r CCCR,PSR,ECR,IR,TXBRP,RXF0S -d 5 -o logs/debug/fdcan1_status.csv
# Fast status check
./.codex/skills/bfd-register-capture/scripts/capture_registers.sh -p FDCAN1 -s
# High-frequency batch capture
./.codex/skills/bfd-register-capture/scripts/jlink_batch_capture.sh USART1 10 logs/debug/usart1_batch.csv
Workflow
- Run bootstrap profile.
- Define peripheral and registers.
- Run short validation capture.
- Run production capture and export CSV.
Hard Rules
- Fail-fast if bootstrap profile is missing.
- Save final captures under
logs/debug/. - Do not sample unknown peripheral addresses.
- Treat zero-sample output as failed capture.
Scripts
.codex/skills/bfd-register-capture/scripts/capture_registers.sh.codex/skills/bfd-register-capture/scripts/capture_registers.ps1.codex/skills/bfd-register-capture/scripts/jlink_batch_capture.sh.codex/skills/bfd-register-capture/scripts/jlink_fast_capture.py
Related Skills
bfd-project-initbfd-debug-executorbfd-rtt-loggerbfd-data-acquisition