audit 0.21.0: HIL harness, bsp, tooling and docs follow-ups
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Domain
- ci-cd, documentation, embedded-iot, testing-qa
Research direction
This is an audit bundle, not a single task: split it by section before editing. Start with one path, e.g. read helper/hil_util.py:204 for the UID/ifnum lookup or hw/bsp/apm32f0xx/family.c:68 for SysTick ordering, and confirm the hardware claim against the cited manual. For docs, inspect docs/reference/class/vendor.rst:31 and src/class/vendor/vendor_device.c:833-855, then add an undersized-buffer test. Done means each split issue has a reproducible failure and a scoped fix, not a blanket audit response.
Written by the indexing model from the issue text.
Description
Deferred defects found in the repository audit of 0.21.0..ad7c83db8. Each was validated against the source at ad7c83db8 and judged real but too large, or too hardware-dependent, for the audit PR's contained fixes.
hil-harness
1. UID-only lookup ignores ifnum and chooses the first glob result. However, the cited nrf5340dk runs neither host nor dual tests in this roster, so that board-specific failure is not established.
- Where:
helper/hil_util.py:204 - Verdict: valid; introduced: Older, moved from
hil_test.py; severity: medium - Hardware/spec dependence: Software ambiguity proven; actual UART mapping pending H1
- Overlap: None
- Remaining work and verification: Establish each affected probe’s console interface, then select explicitly or refuse ambiguity. Do not globally force
if00without checking existing probes. Test reversed glob order and multi-VCOM hardware.
bsp-examples
1. Enables SysTick before scheduler/task-list initialization in FreeRTOS builds.
- Where:
hw/bsp/apm32f0xx/family.c:68 - Verdict: valid source-level exposure; occurrence unverified; introduced: Yes; severity: medium
- Hardware/spec dependence: Yes; pending Q1
- Overlap: None
- Remaining work and verification: Gate BSP SysTick initialization to no-OS. An early kernel tick can dereference uninitialized
pxDelayedTaskList, not merelypxCurrentTCB. Verify delayed scheduler startup and normal FreeRTOS operation onapm32f072_dev_board; no matching committed rig board found.
tooling-ci
1. Non-fork PRs compile overlapping IAR firmware on hosted and rig runners; hosted artifacts are discarded. Pushes do not have the hosted predecessor.
- Where:
.github/workflows/build.yml:445,758 - Verdict: valid; introduced: Yes, duplication from hosted job addition; severity: low
- Hardware/spec dependence: No hardware semantics; real CI validation needed
- Overlap: #3895 covers IAR retries, not artifact reuse
- Remaining work and verification: Prove compiler/configuration parity, publish hosted artifacts and preserve push/failure fallbacks. Verify actual hfp variant artifact consumption and a rig run.
docs
1. Undersized bulk RX buffer is not rejected: with RX_NEED_ZLP=0, open derives receive length from descriptor MPS and direct mode submits that length against the configured array. The stream helper also stores length without capacity validation.
- Where:
docs/reference/class/vendor.rst:31;src/class/vendor/vendor_device.c:833-855 - Verdict: valid, narrowed to demonstrated RX path; introduced: Older; same path in
0.21.0; severity: medium - Hardware/spec dependence: Capacity mismatch is source-proven; DCD overwrite behavior not hardware-tested
- Overlap: None
- Remaining work and verification: Separate code fix: reject oversized receive lengths before endpoint activation, including alternate settings. Add undersized-buffer tests and validate a representative bulk device on
stm32f407disco.
2. LPC55S2x USB.3 workaround and USB.5 1023-byte protection are absent. Errata text supports the concern; shared-driver applicability and a safe implementation remain unverified.
- Where:
docs/reference/device_issues.rst:59-66;src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c:435,649 - Verdict: valid absence; hardware fix pending; introduced: Older driver behavior; documentation new; severity: medium
- Hardware/spec dependence: Yes; partial read-doc evidence below, no complete verified claim record
- Overlap: None
- Remaining work and verification: Separate LPC55S2x/LPC552x work with base-manual/errata review and an affected-part board.
lpcxpresso55s69alone cannot establish S2x silicon behavior.
Adjudication notes: hil-harness
Claims still needing read-doc before any dependent behavioral change:
- H1 — C3: For each affected probe/board, which VCOM interface connects to the firmware console, and what are its actual by-id naming conventions? The nrf5340dk example is not exercised through this host-console caller by the current roster.
- H2 — C5, only if revived: What exactly does USBTMC 1.0 Table 19 report after REQUEST_DEV_DEP_MSG_IN, CLEAR and recovery? No current failing sequence was established.
- H3 — S2/S19: What readiness condition guarantees enumeration/configuration is stable before the first operation, including dual-port same-serial transitions? A shorter polling interval or two matching observations is not established evidence.
- H4 — S3: Which DFU descriptor/state and transition guarantees would permit replacing repeated
dfu-utilprobes with the proposed observation gate? - H5 — S6/S7/S8: For every affected flasher/board, which reset or reflash operation releases the held transaction, and what completion/settling conditions must remain? Preserve existing software contracts unless this work is undertaken.
- H6 — S8/S20: Under USB 2.0 TT reset rules, which translator/port is affected, and when is cached topology safe after disappearance or duplicate-serial enumeration?
- H7 — S9: What STM32F407 reset behavior does OpenOCD’s reset-init hook provide, and why may capture retain it while recovery clears it?
- H8 — S26: Which printer-example buffering/backpressure guarantees permit less pacing or persistent sessions across sizes?
- H9 — S27: What application readiness event permits the next host-console command? Silence alone needs validation.
No supplied claim records cover these questions; lookups remain pending, not “undocumented.” Several questions additionally require tool-source review or hardware experiments rather than a datasheet alone.
Verification limits:
- In-memory reproductions exercised extracted pinned-tree functions/predicates with mocked collaborators. They confirmed the stated software paths, not real kernel wedges or board behavior.
- No hardware, firmware builds or full test suite ran. Proposed verification above remains outstanding.
- Checked relevant shared-provider behavior at agentrc
3304c248e, rather than relying on the simplify review’s newer installed-provider signatures. - No additional independent defect was established beyond the merged findings; C1 and C7 include newly identified cases of the same defects.
- No files were changed; checkout remains clean.
Adjudication notes: bsp-examples
V1 — verified read-doc claim: STM32F103’s applicable USB peripheral has 512 bytes of shared USB/CAN packet SRAM. Book 3632, RM0008, Rev 21, §23.2, p.622, lookup 249b13db6d06. Applicable medium-density errata: book 3618, ES096, Rev 15, §2.12, p.23, lookup fc155a3e13ad; neither listed USB erratum changes that capacity. Source allocation is 64 BTABLE + 128 EP0 + 128 bulk + 128 interrupt + 256 ISO = 704. This verifies X1’s capacity mismatch for Bluepill, not successful hardware operation of a proposed fix.
Claims still needing read-doc:
- Q1 — C6: APM32F072 Cortex-M0+ SysTick delivery before scheduler startup: confirm enabled/pending behavior and reset interrupt masking. Book 6529 was searched (
13291e82e2cd); core-register semantics and applicable errata review remain pending. - Q2 — C7/S5: For CH32V407/V467 and CH32X035, and V20x/V30x if sharing handlers: exactly which registers CSR
0x804stacking preserves, how nesting restores them, and whether the actual compiler prologue conflicts. CH32V407 RM book 6684 located §9.2.3.17, p.75 (512ed8518797); complete register/core documentation review remains pending. - Q3 — S2/S3/S6: Across CH32V20x, V30x, CH582/583, X035 and V4x7 as applicable: SysTick wrap/flag ordering, clock source, CSR
0x800masking and required barriers. Shared code or cycle-based timestamps must preserve these differences. - Q4 — S4: Each affected STM32F0/G0/U0 variant’s TIM2 availability, counter width, timer input clock and initialization write ordering.
- Q5 — S13: LPC11/15/17/40 IAP ReadUID command/result layout, alignment, execution restrictions and whether the returned first word alone provides the intended uniqueness.
- Q6 — S16/S24: Pico2 trace carrier, Metro M7, MIMXRT1170-EVKB and SAME70-Xplained trace routing, peripheral ownership and PHY-reset polarity before moving/changing pin setup.
- Q7 — S17: PY32F071 RCC enable semantics and whether clock setup between
HAL_MspInit()andboard_init()can undo either enable. - Q8 — S20/S21/S22: Per-controller endpoint types/numbers, FIFO capacities, ISO support and buffering requirements before centralizing those policies. S20/S21/S22’s blanket “not hardware-dependent” labels are incorrect.
- Q9 — S25: RA6M5/RA8M1 TRCKCR divider encoding, protected-write sequence and debugger predicates before changing trace behavior.
- Q10 — S28: Does CH32X035 AFIO
UDP_PUEremain electrically effective when the USB controller clears its device pull-up enable? Book 6495 located AFIO definitions at pp.75–77 (6a627f3c4b52); controller interaction and later Chinese-revision differences remain pending. No errata entry appeared in the metadata search. - Q11 — S40: Across supported SWO cores, what permits readiness to recover after a stopped trace consumer, and what explicit event could safely clear proposed sticky suppression?
Not verified: firmware builds, unit-test execution, stack measurements, physical flash commands or HIL behavior. The OpenOCD finding was reproduced by Make dry-run only. Hardware hypotheses without completed claim records remain unverified; none should become a confirmed-defect issue solely from these reviews. Inspection was directed at the findings and their callers, not an exhaustive new review of all 376 batch files.
Adjudication notes: tooling-ci
Claims still needing read-doc:
- None. These adjudications depend on source behavior, CI wiring or host-side parsing, not USB specifications, MCU registers or errata. No claim records were supplied or required.
- E2 still needs compiler/configuration parity and real artifact-to-rig validation; that is execution evidence, not a hardware-spec lookup.
Could not verify:
- CI timing/cost estimates, cache-hit improvements, live HIL behavior and external users of apparently unused CLIs. No builds, full test suites or hardware runs were performed.
- Agentrc reuse comparisons used installed source; historical equivalence to every pinned dependency revision was not established.
- No additional defect beyond the supplied findings was established during this adjudication. This is not an exhaustive clean bill for all 134 batch paths.
Checkout remains clean; no files changed.
Adjudication notes: docs
Claims still needing read-doc:
- C6: For CH32X033/X035, CH582/583 and CH32V103 individually, can subsequent ISO completions overwrite unread status/length, and which mitigation applies? Searches found relevant books, but register-page verification remains pending: X035 books 6495/6692, CH583 6485/6627, V103 6610/6643. Lookup IDs:
5c237099c82e,24996de1afac,8ffe0a671510. These searches do not cover every named variant. - S17a: Which affected revisions require USB.3/USB.5, and how must reset, attach, first SETUP and detach handling preserve the register semantics? Errata book 2618, LPC55S2x/LPC552x Errata, Rev 2.6, §3.5 p6 and §3.8 pp7–8 was read (
ef3e0da4b7c4). Base manual 1690 lookup is incomplete (244d5273a5a2); this is not a complete verified implementation claim record. - S16b: What EP0 staging-size constraints follow from control-transfer short-packet termination, including zero, sub-MPS and nonmultiple sizes? No specification lookup completed.
- S17b/S17c: Any proposed automatic RT10xx enforcement or RP2040 recovery requires variant-specific errata/manual verification; the latter also needs SOF-read side effects, suspend/reset discrimination and restart timing checked. No covering lookup completed.
- S9, if revived as a behavioral change: Establish MUSB completion, interrupt masking and event-order requirements for every affected port before proposing deferred callbacks.
Not verified: full Sphinx/link build, hardware behavior, fresh-machine installation, or performance benefits of the proposed cleanups. No firmware builds or HIL runs were performed. The attempted PDF-image display failed; N1 rests on the erratum’s extracted prose, not a verified register table. GitHub overlap checks covered the requested open lists, not all unlabelled issues. No repository files were changed; HEAD remains ad7c83db8.
- Dominant language
- C
- Stars
- 7.3k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 67
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
area9innovation/flow9#1805 ·
Maintainers usually reply within 3 days
-
AI:Robustness triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open5gs/open5gs#5246 · 1 comment ·
Maintainers usually reply within 1 day