<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/.claude/skills/target-debug, 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/.claude/skills/target-debug?h=codex%2Fclass-reference-docs</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/.claude/skills/target-debug?h=codex%2Fclass-reference-docs'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-29T10:29:59Z</updated>
<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>target-debug: list etm-trace as the instruction-level channel</title>
<updated>2026-07-24T08:56:14Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T08:49:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=08c4c558a7542c0eb8995fe22602e129be526802'/>
<id>urn:sha1:08c4c558a7542c0eb8995fe22602e129be526802</id>
<content type='text'>
Fifth capture view alongside usbmon/kernel/target/wire: exact execution
history via J-Trace, existing only where the trace header is wired -
confirm with the user before reaching for it.
</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(skills): tighten esp-target-debug/target-debug; agent routes backends by board family</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-24T07:48:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=22a155f091283596ee34550c42c075967841159b'/>
<id>urn:sha1:22a155f091283596ee34550c42c075967841159b</id>
<content type='text'>
- esp-target-debug: de-narrated (~1000 -&gt; 847 words) — session-diary phrasing
  ('this unit', dates, 'we measured') replaced with durable reference facts;
  restructured per-board (P4 vs S3 notes); new Scripted-session gotchas
  section consolidates telnet-halt pattern, ESP_ONLYCPU, and ROM-frame
  guidance; UART-reset recipe stated once
- target-debug: fix run-on seam from the -singlerun insertion
- target-debugger agent: charter now resolves the board family FIRST and
  routes Espressif boards to esp-target-debug as primary playbook; skills
  table re-aligned
- retrieval regression: 4/4 (agent routing, S3 keep-alive quirk, OpenOCD RTT
  on ST-Link, ROM-frame guidance)
</content>
</entry>
<entry>
<title>docs(skills): esp-target-debug — Espressif built-in USB-JTAG backend, rig-verified</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=5066ac7b31445f64aa6007fbe28f03e049aec0b6'/>
<id>urn:sha1:5066ac7b31445f64aa6007fbe28f03e049aec0b6</id>
<content type='text'>
P4 (hand-wired USB-SJ breakout, GPIO24/25 from header J1):
- COEXISTENCE verified: 303a:1001 + cafe:4008 enumerated simultaneously;
  gdb attach/halt/bt during live CDC traffic; symbolized app backtrace
  (tud_task_ext &lt;- usb_device_task &lt;- vPortTaskWrapper)
- set ESP_RTOS FreeRTOS before board cfg -&gt; full dual-core task list;
  without it, bare 'Remote target'
- attach-may-reset nuance flagged (post-mortem autopsy caution)
- console = UART0 (CP2102 flasher tty) on stock builds; D+/D- swap symptom
  documented (low-speed + error -71 vs full-speed)

S3 (same-port PHY swap):
- boundary captured live in dmesg: same hub port flips 303a:1001 -&gt;
  cafe:4008 as the app boots; openocd 'esp_usb_jtag: could not find or open
  device!' verbatim
- attach/halt/symbol resolution verified via board_test (usb_new_phy absent
  from ELF when CFG_TUD/TUH=0); app-context keep-alive quirk (~4 s
  unattended drop, -71 half-dead, UART esptool reset recovers); cpu1
  OCD_ID=0 -&gt; ESP_ONLYCPU=1; telnet-halt + gdb-read scripted pattern;
  RTC_CNTL PHY-mux reference (0x60008120) + esptool read_mem/write_mem
- target-debug pointer + target-debugger agent table row
</content>
</entry>
<entry>
<title>docs(target-debug): DWT data trace (verified both probe families); reorder to table; SWO enable chain</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-23T07:18:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b97f5dae5ba63015125595624e90e924b0b6d31b'/>
<id>urn:sha1:b97f5dae5ba63015125595624e90e924b0b6d31b</id>
<content type='text'>
- DWT data trace: FUNCTION 0b0011 (ARMv7-M ARM Table C1-21) streams value +
  accessor-PC packets per access, no halt, no code. Verified on
  stm32f407disco (J-Link SWORead: 451 KB, value = uptime ms, PC =
  tusb_time_millis_api) and stm32h743nucleo (OpenOCD/ST-Link tpiu capture:
  607 KB, same decode). Caveat recorded: R/W-only trace floods on polled
  variables.
- SWO enable chain documented: tools own TRCENA/ITM/TPIU; vendor part bites
  — H7 needs DBGMCU trace clocks, PB3 manually muxed to AF0, native
  stlink-dap (hla tpiu silently no-ops), the cfg's stm32h7x.swo object (the
  .tpiu object is the parallel port), traceclk = c_ck 400 MHz (wrong guesses:
  ratio-garbage or silence).
- Sections reordered to match the intrusiveness table (least-&gt;most
  intrusive); cross-references fixed; table gains the data-trace row.
</content>
</entry>
<entry>
<title>docs(skills): formatting feedback — agent skill table, probe bullets, aligned columns</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-23T06:38:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9c6c0390a0b163c8ea64145f759118795c45b47f'/>
<id>urn:sha1:9c6c0390a0b163c8ea64145f759118795c45b47f</id>
<content type='text'>
- target-debugger: skill list is now a table referencing skills by name only
  (path pattern stated once).
- target-debug: probe-mapping run-on paragraph split into bullets; drop the
  GDB Ninth-Edition caveat (calibre now holds the Tenth-Edition PDF, id 2264).
- Align markdown table columns across target-debug, usb-sniffer, usbmon, hil,
  usbtest and the agent (7 tables); tables with paragraph-length cells left
  unpadded (usbmon symptom map, usbtest case map).
</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>docs(target-debug): manuals, breakpoint/watchpoint arsenal, RTT via OpenOCD</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=b1becd8f5fcaf4a8a07aaa76fa68d3e9f7bb18a3'/>
<id>urn:sha1:b1becd8f5fcaf4a8a07aaa76fa68d3e9f7bb18a3</id>
<content type='text'>
- Link J-Link UM08001, OpenOCD and GDB (Tenth Ed.) manuals
- bp/wp depth with halt-per-hit cost model. Verified on stm32f407disco
  (J-Link) + raspberry_pi_pico (OpenOCD): FPB/DWT budget reads (M4 6 bp/4 wp,
  M0+ 4/2 exact), 'Hardware watchpoint' confirmation rule (software fallback
  single-steps = USB death), OpenOCD data-VALUE watchpoints, dprintf +
  breakpoint command lists exercised on hardware; JLinkGDBServer -singlerun
  lifecycle gotcha
- RTT is not J-Link-only: OpenOCD rtt setup/start/server verified on pico
  (control block found at the nm address, LOG=2 boot banner captured over nc)
</content>
</entry>
<entry>
<title>docs(skills): rename debug skills, drop the PC-host/TinyUSB-device assumption</title>
<updated>2026-07-24T07:55:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-23T03:18:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=8918c4fec4a99b174d480c043000fd4405678282'/>
<id>urn:sha1:8918c4fec4a99b174d480c043000fd4405678282</id>
<content type='text'>
Rename usb-target-debug -&gt; target-debug, usb-debug -&gt; usb-kernel-debug,
usb-recover -&gt; usb-kernel-recover (script filenames unchanged), and make all
debug skills/agents decide tool applicability by which end of the link runs
Linux: TinyUSB may run the device or host stack, and its peer may be a Linux
PC, another TinyUSB board, or a Linux gadget (e.g. Raspberry Pi UDC).

- usbmon: exists only when a Linux PC is the link's host
- usb-kernel-debug: either Linux end; allowlist gains dwc3/libcomposite/udc_core
  for the gadget side of a Linux peer
- usb-sniffer: the only full-visibility capture when TinyUSB is the host
- target-debug: covers dcd_* and hcd_*/tuh_ debugging; channel choice by topology
- update target-debugger/hil-operator agents, pre-pr, hil-validate.js, and the
  USB_RECOVER path constant in test/hil/usbtest.py
- CLAUDE.md: fold the dcd/hcd datasheet cross-check rule into the read-doc line
</content>
</entry>
</feed>
