Repository navigation
hil: each board's flasher from a board registry keyed by probe serial - #400
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
[Medium impact] The PR appears safe to merge; no new actionable issues were found.
|
|
@coderabbitai review |
Action performed
|
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
@coderabbitai review |
Action performed
|
A board's USB serial depends on the firmware it runs (max32666fthr reports 26 characters under TinyUSB, 32 under TinyUF2), so a registry keyed by it needed an alias per firmware. The probe a board is wired to is fixed: rosters name it as `probe` and keep their own `uid`.
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
@coderabbitai review |
Action not completed
|
Each project named its lock after its own board name, kept equal to tinyusb's by hand (tinyuf2.lock). The registry name is now the lock on every host; every current lock already equals it, so no lock file is renamed.
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
@coderabbitai review |
Action not completed
|
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
@coderabbitai review |
Action not completed
|
|
@coderabbitai review |
Action performed
|
Every HIL project's roster repeated each board's
flasher/flasher_recoverand its arguments. On the farm each boardis wired to exactly one debugger, so the flasher belongs to the board:
skills/hil/boards.jsonnow holds it, keyed bythe serial of that debugger, and
skills/hil/scripts/hil_boards.pyresolves a roster entry through it. A roster names aregistered board by
probeand keeps its ownuid, the serial its firmware reports, which differs per firmware(max32666fthr: 26 characters under TinyUSB, 32 under TinyUF2).
probenames no flasher; one that does is refused. A bench board the registry does not holdkeeps its own flasher, unless its probe is registered.
tinyusb.jsonandhfp.json,boards-skipincluded. Each resolvedentry equals tinyusb origin/master's inline flasher exactly.
rtt.py,probe_state.py(and through itpc_sample,swo_capture,sysview_record),hil_reserve.py(one board under two lock names, by its probe or its uid, is a conflict),bin/lsusbt(a board'sdevice label comes from the roster given, so a board running another project's firmware needs that project's roster:
lsusbt: label serials from the board registry, rosters on top #402).
hil_boards.py roster FILEprints a resolved roster.vid_pidgrammar moves tousb_observe.py, shared byhil_flashand the registry.nameon every host, whatever a roster calls the board(
hil_boards.lock_name,hil_boards.py lock FILE BOARD); names are checked unique and file-name safe. Every currentlock name already equals its registry name, so no lock file is renamed and repos at different pins still exclude each
other.
hil_reserve.pytakes registered boards' locks from it.Also folded in:
flash_openocdhalts both cores (-c init -c "catch halt") beforeprogramwhen the flasher's argsname
target/rp2350.cfg(raspberry_pi_pico2,adafruit_fruit_jam). On the Fruit Jam at ci.lan,rcp_initfailed9 of 655 times without the halt and 0 of 655 with it; 20 of 20 flashes verified at the commit's origin. The
reset runpaths (#395 step 3) stay out of scope.
Fixes #395
Project side: hathach/tinyusb#4402 and adafruit/tinyuf2#633 replace their inline flashers with
probeand pin thisbranch.
Rollout on a shared host (ci.lan):
hil_reserve.py checkacross both rosters needs both migrated rosters and theirmatching pins staged together. Update the installed standalone tools (
lsusbt, the rtt/target-debug scripts) onlyafter both project PRs land.
Test:
python -X utf8 -m unittest discover -s testswithTMPDIRon disk: 4263 tests OK (127 skipped).