<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/docs/superpowers, branch codex/class-reference-docs</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/docs/superpowers?h=codex%2Fclass-reference-docs</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/docs/superpowers?h=codex%2Fclass-reference-docs'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-29T19:29:32Z</updated>
<entry>
<title>hil, ci: scope HIL builds and tests to the boards a PR affects (#3797)</title>
<updated>2026-07-29T19:29:32Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-29T19:29:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=eef5af86aa26fe3d72e41156a586a6ed3ffce9f8'/>
<id>urn:sha1:eef5af86aa26fe3d72e41156a586a6ed3ffce9f8</id>
<content type='text'>
hil, ci: scope HIL builds and tests to the boards a PR affects

Add test/hil/hil_select.py, a stdlib-only selector that maps a PR diff to the
rig boards, tests and BSP families a change can affect, and wire it into CI so
pull requests build and run only those. A port change picks its families' boards,
a class change picks the examples enabling that class, and device/host changes
prune the other role. Anything unclassified — infra, an unmapped port, a selector
error — falls back to the full matrix, and push/schedule runs are untouched.
Move the shared example lists to hil_examples.py; 54 hardware-free tests cover
the rules.</content>
</entry>
<entry>
<title>hil: split hil_test.py into hil_lock/hil_flash, add pool_check, update rig probes (#3794)</title>
<updated>2026-07-29T10:29:59Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-29T10:29:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e88fc441ddcaaa5abd4f4673ef2bf29499522dc0'/>
<id>urn:sha1:e88fc441ddcaaa5abd4f4673ef2bf29499522dc0</id>
<content type='text'>
test/hil: add board-pool health check, split hil_test into focused modules (#3794)

Add test/hil/hil_pool_check.py: per-board rig health scan — probe presence,
light-example flash (dfu_runtime; device_info + serial check for host-only
boards), uid re-enumeration, safe recovery (probe authorized-toggle, board
reset), verified board_test re-park, USB topology report, and a markdown
summary table. Missing firmware is built on the spot (tools/build.py, idf.py
for espressif, one get_deps retry); row statuses: ok, flash-failed, failed,
locked. Board locks are always respected, never bypassed.

Refactor hil_test.py into hil_lock.py (flock protocol, controller permits,
hold/release/status CLI; replaces board_lock.py) and hil_flash.py (flashers,
find_firmware, run_cmd). Update WCH probe uids and the board roster in
tinyusb.json; add the hil-pool-check skill.</content>
</entry>
<entry>
<title>docs: add the unified OpenOCD plan, note worktree dep symlinks</title>
<updated>2026-07-28T07:43:32Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-28T07:43:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3fdd294b95143f909a6c991943a2e55e638b177a'/>
<id>urn:sha1:3fdd294b95143f909a6c991943a2e55e638b177a</id>
<content type='text'>
The plan doc records why the fork exists and how each vendor source was
ported; the interim handoff it superseded is dropped.

CLAUDE.md: a new worktree should symlink the dependency dirs to the
primary checkout rather than re-fetching them, replacing a single
symlink only when the branch needs a different dep revision. Also allow
'linke' in codespell - WCH-LinkE is a product name.
</content>
</entry>
<entry>
<title>docs: plan for etm-trace tightening and target-debugger integration</title>
<updated>2026-07-24T08:56:14Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T08:51:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=c962a0bf62f53d7bee42db7ff3bcd8f07ec23daa'/>
<id>urn:sha1:c962a0bf62f53d7bee42db7ff3bcd8f07ec23daa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>docs: address Codex/Copilot review on #3786</title>
<updated>2026-07-24T08:14:02Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T08:14:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=154999dbac95484f3f9a02cbf7a7277d89e1e0e9'/>
<id>urn:sha1:154999dbac95484f3f9a02cbf7a7277d89e1e0e9</id>
<content type='text'>
- target-debug: fault frame lives on PSP when EXC_RETURN bit2 set (FreeRTOS
  tasks) — decode LR before choosing $msp/$psp (Codex; valid, our verify
  happened to fault on MSP)
- esp-target-debug: show the Xtensa gdb for S3 in the attach recipe; clarify
  adapter serial = USB-SJ iSerial (colon MAC, hardware-verified) vs the
  CP2102N flasher uids in tinyusb.json (Codex; second half of the finding
  had the identifiers inverted)
- esp plan: align serial form with the verified command; record the real
  console-gate outcome (UART0, USB-SJ console untested) (Copilot)
- target-debug plan: Task 4 now consistently $JB/ARMv7-M matching the
  executed JLinkExe path (Copilot)
- drop IDE-local .idea files swept in by the rename commit (Copilot)
</content>
</entry>
<entry>
<title>docs(superpowers): esp-target-debug design spec + executed implementation plan</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T07:55:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=df3cea3d0e12c155e2a2e7f81dec031da38ab328'/>
<id>urn:sha1:df3cea3d0e12c155e2a2e7f81dec031da38ab328</id>
<content type='text'>
Spec (brainstormed): own-skill backend decision, PHY-conflict map, six
verification gates, external-JTAG TODO. Plan executed same-day: all gates
run on the rig; apptrace resolved per its own gate rule as (untested).
</content>
</entry>
<entry>
<title>docs(target-debug): vector catch, SWO trace, verifybin, FreeRTOS threads; table integration</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T07:55:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=21bbcb5bbff18454979a1dc9aaa210e938a004b5'/>
<id>urn:sha1:21bbcb5bbff18454979a1dc9aaa210e938a004b5</id>
<content type='text'>
- Vector catch + Cortex-M fault autopsy, verified with a deliberate bad-load
  on stm32f407disco: CFSR=0x8200 (BFARVALID|PRECISERR), BFAR = exact bad
  address, stacked pc addr2lined to the faulting line; gotchas recorded
  (stale FPB comparators fire phantom SIGTRAPs — scrub first; arm DEMCR
  after reset; loads precise / stores imprecise; ARMv6-M has no CFSR/BFAR)
- SWO exception trace + hw PC sampling gate PASSED on F407: 680 KB of
  packets in 3 s (0x17 PC samples in flash range, 0x0E SysTick enter/exit);
  JLinkSWOViewerCL decodes stimulus only — raw SWORead is the recipe;
  SWOStart needs an explicit speed headless
- verifybin 'Verify successful.'; FreeRTOS -rtos plugin lists all 6
  cdc_msc_freertos tasks after a run-&gt;stop cycle (plain attach = 0xDEAD
  placeholder); semihosting anti-note; monitor-mode pointer (untested)
- Intrusiveness table gains the new rows; agent playbook bullet updated;
  retrieval gate 5/5 with a fresh reader; executed plan committed
</content>
</entry>
<entry>
<title>agent: add target-debugger — device-side root-cause loop on the HIL rig</title>
<updated>2026-07-17T09:48:03Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-16T07:11:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b9478a723b6335f3e670453b622d615cebbd7293'/>
<id>urn:sha1:b9478a723b6335f3e670453b622d615cebbd7293</id>
<content type='text'>
Opus-tier agent charter for backgrounding a long hardware debug session:
instrument -&gt; build -&gt; flash under one held board lock -&gt; dual-side
capture -&gt; correlate -&gt; refine, strictly one instance, skills as source
of truth (usb-target-debug, usbmon, usb-debug, usb-sniffer, usb-recover,
hil). The charter encodes what dogfooding established:

- diagnosis standard: evidence must show the mechanism, or a fix must
  flip the ORIGINAL failing case on hardware; stop after two
  evidence-free cycles and hand back a partial diagnosis
- lock cadence: hold for the whole session, release around hil_test.py
  runs (it self-locks per board)
- revert semantics: "fix stays, probe goes, re-verify clean" —
  instrumentation reverted, candidate fix left uncommitted and
  re-verified on a clean build, pristine firmware reflashed before
  lock release

Returns a machine-parseable diagnosis report including ruledOut[] —
disproven hypotheses are deliverables. Spec roster updated (opus/xhigh,
effort requested per agent() call).
</content>
</entry>
<entry>
<title>skill: add usb-target-debug — device-side capture &amp; debug on the HIL rig</title>
<updated>2026-07-17T09:48:00Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-16T07:09:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f5d155256b9e6d743d7c5bd6c7e34e36ae0970df'/>
<id>urn:sha1:f5d155256b9e6d743d7c5bd6c7e34e36ae0970df</id>
<content type='text'>
Completes the debugging toolset (usbmon = what the host exchanged,
usb-debug = why the host acted, usb-sniffer = what crossed the wire):
TU_LOG/RTT capture, per-probe GDB autopsy without reset, RAM ring-buffer
event trace, J-Link DWT_PCSR PC-sampling, dual-side capture posture, and
board-lock rig discipline. Includes the implementation plan it executes.

Hard-won warnings baked in from real bring-up sessions: volatile ring
buffers vs -Os dead-store elimination, RTT NO_BLOCK_SKIP post-mortem
limits (no overwrite mode exists), DHCSR validity anchors for register
snapshots, release-lock-before-hil_test, and that a marginal just-recabled
link can fake a deterministic firmware bug.

Also ignore .claude/worktrees/.
</content>
</entry>
<entry>
<title>Fix max-effort review findings in lock protocol, workflows, and docs</title>
<updated>2026-07-13T11:01:07Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-13T11:01:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ff69550b3d8d55b5c9d48a3dfe4e87f7690e9455'/>
<id>urn:sha1:ff69550b3d8d55b5c9d48a3dfe4e87f7690e9455</id>
<content type='text'>
Confirmed by a 10-finder / 28-verifier adversarial review pass:

board_lock.py — the flock is now the sole authority: drop cmd_hold's
pid-liveness pre-gate (a live hil_test.py pool worker's stale record no
longer blocks a genuinely free board); cmd_release probes the flock and
only signals a verified holder, refuses to kill hil_test.py holders
(CI mid-test), handles PermissionError; the holder daemon truncates its
lock records on SIGTERM and keeps the success pipe clear of fds 0-2
(closed-stdio hold used to leave an orphan holder while reporting
failure); --config default resolves beside the script.

hil_test.py — truncate the lock record on per-board release (pool
workers outlive their flocks); warn instead of silently failing open
when the lock dir is unusable; error out on -b names absent from the
config (was a silent zero-test exit 0, readable as a green HIL run);
drop an emptied board row in accumulate_report (variant boards left a
blank ghost row).

workflows — remove the stray positional arg that made the validate size
stage exit 2 on every run; wrap JSON.parse(args) in all six scripts;
factor pr-babysit's drifted reply recipe into postReplyRecipe and dedup
refutation replies across cycles; validate args.pr and maxCycles;
driver-review rejects an empty dimensions list; hil-validate drops a
dead guard clause and retries diagnostics with -v -r 1.

agents/docs — port-dev scopes git clang-format to its own files
(concurrent workers reformatted each other in shared checkouts);
hil-operator/hil skill wording matches actual fail-fast output; the
implementation plan is now a DO-NOT-EXECUTE historical record (banner +
checked boxes) so plan-executing agents cannot revert shipped files.

Verified: lock storm 1-winner-in-10, stale-record hold, closed-stdio
hold, dead-pid cleanup, CI-holder refusal, ghost-row 4-scenario merge,
unknown-board exit 1, py_compile + check.sh on all six workflows,
pre-commit clean.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01Upj4hta5TNoAbidqeC1zZ6
</content>
</entry>
</feed>
