diff options
| author | hathach <[email protected]> | 2026-09-04 05:11:02 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-09-04 05:11:02 +0700 |
| commit | f9c0c1239250399bc41347b9160bd95721f86dca (patch) | |
| tree | 169b7fc70ccf1fc375f7771e5eb83891be404f7d | |
| parent | 78ec7f6abae94f59612f30cda4d24031f5e7b760 (diff) | |
sysview: fix cycle-2 review findingsclaude/add-systemview-debug
- 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
| -rw-r--r-- | .claude/skills/sysview/SKILL.md | 6 | ||||
| -rw-r--r-- | .claude/skills/sysview/boards.md | 5 | ||||
| -rw-r--r-- | hw/bsp/stm32f4/boards/stm32f401blackpill/board.cmake | 3 | ||||
| -rw-r--r-- | test/hil/sysview_ci.py | 4 | ||||
| -rwxr-xr-x | tools/get_deps.py | 4 |
5 files changed, 15 insertions, 7 deletions
diff --git a/.claude/skills/sysview/SKILL.md b/.claude/skills/sysview/SKILL.md index 9ea0d852b..5add70844 100644 --- a/.claude/skills/sysview/SKILL.md +++ b/.claude/skills/sysview/SKILL.md @@ -118,11 +118,11 @@ ELF, `rtt polling_interval 1`, teardown) so none of it is hand-assembled here: ```bash # flash first; the capture session then reboots the target itself openocd <board's -f/-c args> -c 'adapter serial <uid>' \ - -c "init; halt; program build-sv/cdc_msc_freertos.elf verify; reset; exit" + -c "init; halt; program examples/device/cdc_msc_freertos/build-sv/cdc_msc_freertos.elf verify; reset; exit" python3 tools/rtt.py --backend openocd --probe <uid> \ --cfg "<board's -f interface/... -f target/... args>" \ - --elf build-sv/cdc_msc_freertos.elf --channel 1 --seconds 25 \ + --elf examples/device/cdc_msc_freertos/build-sv/cdc_msc_freertos.elf --channel 1 --seconds 25 \ --reset-before-attach > capture.SVDat & # ...drive the workload while it records, then decode: python3 .claude/skills/sysview/scripts/sysview_record.py \ @@ -159,7 +159,7 @@ different image cannot be autopsied this way. ```bash cmake -B build-pm -DBOARD=<board> -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DSYSVIEW=4 -DSYSVIEW_POST_MORTEM=1 . + -DSYSVIEW=4 -DSYSVIEW_POST_MORTEM=1 examples/device/cdc_msc_freertos cmake --build build-pm && ninja -C build-pm cdc_msc_freertos-jlink # ... reproduce the hang, then dump WITHOUT resetting (reset destroys evidence) ... python3 .claude/skills/sysview/scripts/sysview_dump.py \ diff --git a/.claude/skills/sysview/boards.md b/.claude/skills/sysview/boards.md index 1cfdee325..d17ae05aa 100644 --- a/.claude/skills/sysview/boards.md +++ b/.claude/skills/sysview/boards.md @@ -86,6 +86,11 @@ window is the attach_only mid-stream join (2.4–5.6 s across runs). - **ra4m1_ek no longer links at `SYSVIEW=4`** — the 2026-08-11 build sweep hit `region RAM overflowed by 960 bytes` even at `-DSYSVIEW_BUFFER_SIZE=2048`; its rate row predates that. Re-validating needs a lower level or freed RAM. +- **stm32f401blackpill overrides its family default down to 4096** — the part has + 64 KiB RAM total, so stm32f4's family-wide 65536 overflows `RAM` by 12952 bytes at + `SYSVIEW=4`. `boards/stm32f401blackpill/board.cmake` sets + `SYSVIEW_BUFFER_SIZE_DEFAULT 4096`; the rest of the family (>=128 KiB) keeps 65536. + Unmeasured — expect the small-buffer event loss the other 4096 rows show. - **nrf5340dk cannot be captured at present**: it HardFaults inside `vTaskStartScheduler()` before any task runs — reproduced on a plain non-instrumented build and after a full `nrfjprog --recover`, so it is a board/boot issue, not a SystemView one. The RTT control block diff --git a/hw/bsp/stm32f4/boards/stm32f401blackpill/board.cmake b/hw/bsp/stm32f4/boards/stm32f401blackpill/board.cmake index fab6a42d2..34bf54e99 100644 --- a/hw/bsp/stm32f4/boards/stm32f401blackpill/board.cmake +++ b/hw/bsp/stm32f4/boards/stm32f401blackpill/board.cmake @@ -1,3 +1,6 @@ +# 64 KiB total RAM: the family's 65536 SystemView default cannot link here. +set(SYSVIEW_BUFFER_SIZE_DEFAULT 4096) + set(MCU_VARIANT stm32f401xc) set(JLINK_DEVICE stm32f401cc) diff --git a/test/hil/sysview_ci.py b/test/hil/sysview_ci.py index 5a7ac6582..fb534a2e9 100644 --- a/test/hil/sysview_ci.py +++ b/test/hil/sysview_ci.py @@ -503,11 +503,11 @@ def flash_and_capture_one(board, fw, out_dir, repo_root): finally: nc.send_signal(signal.SIGINT) try: nc.wait(5) - except subprocess.TimeoutExpired: nc.kill() + except subprocess.TimeoutExpired: nc.kill(); nc.wait() finally: p.send_signal(signal.SIGINT) try: p.wait(8) - except subprocess.TimeoutExpired: p.kill() + except subprocess.TimeoutExpired: p.kill(); p.wait() # A serial death in the first half of the window means the whole capture is # mostly idle bus -- fail it outright. A late death still leaves a mostly-live # capture; keep it, but flag workload_ok=false so report() gates the metrics. diff --git a/tools/get_deps.py b/tools/get_deps.py index 0c360b23d..3275f6e56 100755 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -21,8 +21,8 @@ deps_mandatory = { # any family building with -DSYSVIEW, so it doesn't fit the per-family # gating deps_optional uses 'lib/SystemView': ['https://github.com/SEGGERMicro/SystemView.git', - '92ca7a810c5765ba64911919acd511c61b6b083f', - 'all'], + '92ca7a810c5765ba64911919acd511c61b6b083f', + 'all'], 'lib/threadx': ['https://github.com/eclipse-threadx/threadx.git', '4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae', 'all'], |
