<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/tools, branch claude/add-systemview-debug</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/tools?h=claude%2Fadd-systemview-debug</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/tools?h=claude%2Fadd-systemview-debug'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-09-03T22:11:02Z</updated>
<entry>
<title>sysview: fix cycle-2 review findings</title>
<updated>2026-09-03T22:11:02Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T22:11:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f9c0c1239250399bc41347b9160bd95721f86dca'/>
<id>urn:sha1:f9c0c1239250399bc41347b9160bd95721f86dca</id>
<content type='text'>
- sysview_ci.py: wait() after kill() on the OpenOCD/nc grace-period
  timeout, so a still-exiting process can't hold the probe when the
  recovery flash starts
- SKILL.md: point the OpenOCD and post-mortem recipes at
  examples/device/cdc_msc_freertos, where build-sv actually lands
- stm32f401blackpill: override SYSVIEW_BUFFER_SIZE_DEFAULT to 4096;
  the 64 KiB part overflows RAM by 12952 bytes at the family's 65536
  default under SYSVIEW=4
- get_deps.py: align the SystemView entry's continuation lines
</content>
</entry>
<entry>
<title>hil: sysview CI - rig capture subcommands and report generator</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T10:14:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9e681141bc24ff71081dfce683ae4371e7520124'/>
<id>urn:sha1:9e681141bc24ff71081dfce683ae4371e7520124</id>
<content type='text'>
sysview_ci.py builds, flashes and captures the sysview-flagged boards
(stm32f407disco and raspberry_pi_pico in tinyusb.json) on the rig, taking
each board's flock via hil_lock and restoring park firmware afterwards.

Hard-won correctness baked in from the dogfood runs: firmware paths carry
the flasher's extension via FLASHER_SUFFIX (JLinkExe and OpenOCD infer the
image format from it, and the RTT control block still comes from the ELF,
which is not always the flashed image); WCH boards are detected by their
wch-riscv target config (is_wch_board(), the plain "openocd" flasher name
since #3804 folded openocd_wch/openocd_adi away); build and flash failures
are excerpted from BOTH ends (cmake prints the diagnosis first and the call
stack last, ninja the reverse) and flash failures include the flasher's own
output so rc=124 can distinguish a wedged probe from a dead target; a bad
ELF no longer aborts the whole multi-board run; the enumeration wait sits
after the capture session's own reset; each capture picks a free RTT server
port. session_resets()/sysview.attach_only skips the in-session reset for
boards that never come back from it (metro_m4_express: both campaign
captures died with 'No control block found' while attach-without-reset
streamed immediately) - the flasher's post-flash reset already supplied the
fresh boot.

The suites join the pre-commit hil-test hook and master's test/hil/test/
carve-out pin.
</content>
</entry>
<entry>
<title>sysview: add the skill - headless SystemView capture and reporting</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T10:14:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=463ff1f3d2d97b53659364d7c4cde99693688100'/>
<id>urn:sha1:463ff1f3d2d97b53659364d7c4cde99693688100</id>
<content type='text'>
SKILL.md leads with the capture routes ranked by evidence: OpenOCD RTT
streaming through the rtt skill's tools/rtt.py (--channel 1
--reset-before-attach, since the Init record that carries the timestamp
frequency and sync preamble is emitted once at boot; 238 KB captured without
it decodes to zero events), the live GUI recorder under Xvfb for depth, and
--from-raw post-mortem decode last. boards.md holds the per-board reference:
probe routes, RAM bases, measured buffer sizes, the full-pool campaign table
and the honest capture status of every board tried, including the gaps:
nrf5340dk HardFaults in vTaskStartScheduler before any task runs; PIO-USB
host ISRs are invisible to level-1 coverage (fruit_jam); metro_m4_express is
attach-only (the SAMD5x DSU CPU Reset Extension holds the core after an
in-session reset run); WCH is dump-only - the QingKe SDI has no autonomous
memory access, so a persistent debug session corrupts the running core ~1.9 s
into USB traffic, ruled out against lock, post-mortem mode and firmware; a
stray TU_ASSERT still halts for inspection rather than being silenced.

sysview_record.py drives the capture end to end and refuses to back up its
own ini stub as the user's SystemView config (a SIGKILLed run had consumed
the real backup that way). sysview_report.py turns the exported CSV into
the JSON report: ISR load, function pairing and durations, workload-window
CPU load from the scheduling events. Returns are classified on the bare
'Returns' detail - SystemView annotates a duration on only ~0.5% of them
(measured on stm32f407disco and raspberry_pi_pico), and when the annotation
is absent the duration comes from the recorded timestamps, verified the
same quantity at 167.998 vs a declared 168.000 ticks/us over 264 annotated
returns. Both loss markers count as overflow: explicit '*** Overflow ***'
rows and 'Returns to *** OVERFLOW ***' exit contexts - only counting the
first understated real loss by two orders of magnitude.
</content>
</entry>
<entry>
<title>sysview: take the timestamp from a BSP hardware timer where the core has no DWT</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T10:14:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=5a0d707dd96ae7821d97793b441b86aabb684855'/>
<id>urn:sha1:5a0d707dd96ae7821d97793b441b86aabb684855</id>
<content type='text'>
Cortex-M0/M0+, the WCH RISC-V parts and MAX3266x have no usable DWT cycle
counter, so their family.c provides SEGGER_SYSVIEW_X_GetTimestamp() from a
free-running hardware timer: a 32-bit general-purpose timer on ST parts
(sysview_stm32_tim2.h), SysTick-extended sources on the M0 families, the
core's SysTick-equivalent on WCH with the documented ordered read of the
split count registers (sysview_wch_timestamp.h), and a TMR on MAX3266x
(sysview_max32_tmr.h).

max32666fthr's DWT implements only watchpoint comparators (DWT_CTRL.NOCYCCNT=1
read live; UG6971 documents no DWT/trace at all), so SystemView's ARMv7-M
default read 0xE0001004 as a frozen 0 and every duration decoded as zero. The
TMR runs at 48 MHz (f_PCLK = f_SYS_CLK/2; Continuous mode, CMP=0xFFFFFFFF,
prescaler 1 - UG6971 15.2 guarantees TMRn_CNT readable while counting); TMR0
by default - present on every MAX32 part, unused by the examples, FreeRTOS
ticks on SysTick - overridable with -DSYSVIEW_MAX32_TMR=n. The family builds
SystemView with SEGGER_SYSVIEW_CORE_OTHER and sets CFG_TUSB_SYSVIEW_TIMESTAMP_BSP,
a tusb_sysview.c opt-in for ARMv7-M parts without CYCCNT where the BSP also
reports the rate via SEGGER_SYSVIEW_X_GetTimestampFreq(); the fixed-1MHz
microsecond contract is unreachable on a powers-of-two-only prescaler.
SEGGER_SYSVIEW_X_GetInterruptId() gains the ICSR.VECTACTIVE read for
CORE_OTHER builds. MAX32650/32690 use different GCR clock-gate names and stay
unported. Measured on the rig: seven host-timed 1.000 s gaps at
1.00044-1.00091 (median +0.05%).

stm32f0 refuses to configure SYSVIEW for stm32f070xb at CMake time: that
variant has no TIM2 at all, and the alternative was an undefined-reference
link error with no hint.

The shared hw/bsp/sysview_*.h join ci_select rule 16's hw/bsp file list
(cross-family build files, compiled only under -DSYSVIEW which no CI leg
enables), mirrored in the spec's rule table, so master's classification
guard resolves them on both axes.
</content>
</entry>
<entry>
<title>deps: add SEGGER SystemView target sources as lib/SystemView (V4.12.0)</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-11T10:07:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=c98002c968249aadcfaa34b7675ef1717e324d49'/>
<id>urn:sha1:c98002c968249aadcfaa34b7675ef1717e324d49</id>
<content type='text'>
Fetched by get_deps.py like every other optional dependency, not vendored.
The target sources (SEGGER_SYSVIEW.c, RTT) are what the CFG_TU*_SYSVIEW
instrumentation links against; the desktop application is not part of this.
</content>
</entry>
<entry>
<title>pico2_etm_trace: RP2350 board on the MIPI-20 ETM trace carrier</title>
<updated>2026-08-28T18:08:31Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:39:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=6e8e2caf7fc2dc5575f5e0c71e69c1b19b3f5699'/>
<id>urn:sha1:6e8e2caf7fc2dc5575f5e0c71e69c1b19b3f5699</id>
<content type='text'>
Board files for the trace carrier (console GP12/13, LED GP10, I2C GP8/9,
PIO-USB host on GP20, all retargeted in board.cmake so the SDK defaults
cannot mux a trace pin), compile-time trace pin-conflict checks, the
measured DBGPAUSE rationale, Ozone project, and skill/docs updates.
Trace validated at the stock 150 MHz (75 MHz TRACECLK, +1 ns sampling):
zero overflow through a 15 s throughput soak; V2 probe ceiling 120 MHz.
</content>
</entry>
<entry>
<title>Add RTT console/capture tooling (tools/rtt.py), rtt skill, and HIL harness support (#3853)</title>
<updated>2026-08-28T07:16:02Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T07:16:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=eca6caf673452c8ec940e2acf5e46d0631fb72bf'/>
<id>urn:sha1:eca6caf673452c8ec940e2acf5e46d0631fb72bf</id>
<content type='text'>
Promote SEGGER RTT from an inline debugging technique to a standalone skill
backed by one stdlib-only implementation in tools/rtt.py: a CLI and importable
module for console/capture over J-Link (RTTTelnetPort) and OpenOCD (rtt server)
probes, with probe selection by serial or VID:PID, control-block address via
--elf or --addr, bidirectional console, post-mortem ring dump, and
--reset-before-attach for boot-time capture. The HIL harness reads a board's
console over RTT when its probe has no VCOM ("logger": "rtt" plus a LOGGER=rtt
variant define), covering device_info, pool-check aliveness, and CI wiring.
Validated on 22 boards across both backends; 26 unit tests run in pre-commit.</content>
</entry>
<entry>
<title>ci_select: fix the membrowse test's env dependence, and stop HIL unit tests taking the rig (#3846)</title>
<updated>2026-08-25T03:35:45Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-25T03:35:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b610ff039bafa1040c19d6a11cb04adcb22936e5'/>
<id>urn:sha1:b610ff039bafa1040c19d6a11cb04adcb22936e5</id>
<content type='text'>
test_the_upload_board_can_diverge_from_the_built_board called
get_family_boards without ci=True, so it pinned the developer's set, not the
runner's: the CI skip lists move the one-first pick on three families. It
held locally and went red on its first CI run. Pass ci=True, as
_prune_buildable already does, and pin the runner's twelve.

Rule 2 is a bare test/hil/ prefix, so the harness's own unit tests booked the
full 27-board rig for diffs that cannot reach it. Carve test/hil/test/** out
to rule 1b, beside test/{fuzz,unit-test}/**; the harness itself is untouched.
A test pins that directory's file list, so anything added there that the rig
does read fails rather than silently skipping hardware. Rule table updated in
the spec and its carbon in the docstring.</content>
</entry>
<entry>
<title>ci: an empty selection must build nothing, plus selector follow-ups (#3845)</title>
<updated>2026-08-25T02:46:42Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-25T02:46:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=da255b1d2db10b8f31332a779b2a526f579acee1'/>
<id>urn:sha1:da255b1d2db10b8f31332a779b2a526f579acee1</id>
<content type='text'>
ci: an empty selection must build nothing, plus selector follow-ups

A PR whose build axis legitimately selected nothing rebuilt everything.
build.yml reads .build.families twice - as a |-joined regex, and implicitly
as "is anything selected" - but tested only -z "$FAMILY_REGEX", which an
empty list and a charset-rejected one both satisfy while meaning opposite
things. ci_set_matrix had already returned the correct all-empty matrix;
the fall-open branch discarded it. #3842 and #3840 each spent 74 cmake legs
on it. Branch on the two cases instead, rename FAM_* to FAMILY_*, and cover
the block with a test that extracts it from build.yml and executes it - it
had no test at all, which is how this shipped through two merges.

Follow-ups to the same machinery: glob.escape the repo root at five sites,
so a checkout path containing [ or * stops failing closed; drop the ci-full
label, read after the matrix was already computed and so never functional;
delete 13 mcu:MKL25ZXX / mcu:SAME5X skip tokens matching no board; carry the
rule table in the module docstring, guarded against drift; and pin six
selection behaviours a mutation pass proved untested.

Cut the selector's cost 1.8x (26.0s -&gt; 14.6s) with 0 divergences over 260
paths, and stop scoping the membrowse upload by the PR example filter.</content>
</entry>
<entry>
<title>ci_select: address Copilot review - anchor _META_RE, cover rule 12b</title>
<updated>2026-08-22T16:10:14Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-22T16:10:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=050595d64f9f130783853a2342eb1114d32199e8'/>
<id>urn:sha1:050595d64f9f130783853a2342eb1114d32199e8</id>
<content type='text'>
Anchor the .github file alternatives. FUNDING.yml, labeler.yml and
membrowse_pr_message.j2 sat inside a group whose only `$` belonged to the
workflows/ branch, so they matched as prefixes: .github/labeler.yml.bak and
.github/FUNDING.yml.old were classified as metadata and would have selected
nothing. No such file exists today - the workflows/ alternative was already
anchored and ISSUE_TEMPLATE/ is a directory prefix on purpose.

Rule 12b had no test of its own: TestNoTrackedFileIsUnclassified only proved
src/typec no longer reaches rule 17, not that the answer is right. TestTypecRule
pins it - non-full, every selected example under typec/, all four src/typec files
answering alike, no rig board, and the set derived from CFG_TUC_ENABLED rather
than hardcoded, so it follows a new typec example on its own. Verified all four
fail with rule 12b removed.
</content>
</entry>
</feed>
