Commit Graph

10718 Commits

Author SHA1 Message Date
71f7ba0415 ci: demote sticky-comment report headings to h2; rename HIL report
The Size Difference Report and HIL comments rendered their titles at h1, which
is oversized inside a PR comment. Use h2 for both titles (with subsections
demoted to h3 to keep the hierarchy), and rename the HIL comment from
"HIL test results" to "Hardware-in-the-loop (HIL) Test Report" for consistency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:28:53 +07:00
a70c5a626b ci: include hil-hfp-iar (IAR) results in the HIL PR comment
hil-hfp-iar runs hil_test.py on hfp.json built with IAR on its own rig. Upload
its report as the hil-report-hfp-iar artifact and add the job to the hil-report
combine job's needs, so the sticky comment shows a third table for the IAR rig
alongside tinyusb.json and hfp.json (gcc). The combine gate now runs if either
HIL job produced results.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:21:34 +07:00
7b60e3951e test/hil: clear HIL report up front on a fresh run
The report sidecar lives in a persistent dir (it survives the CI workspace
clean so accumulation works across run attempts). A full run is "fresh" and
must not merge prior state, but previously fresh only avoided *loading* the
json at merge time — if a fresh run crashed before writing the report, the
stale json/md from an earlier run lingered and a retry (fresh=False) could
merge it, or the always() upload could post it. Delete hil_report.json/.md at
the start of a fresh run so prior results can never leak.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:18:04 +07:00
fba8d25784 test/hil: accumulate HIL report across re-runs; post as sticky PR comment
hil_test.py persists results in a hil_report.json sidecar and regenerates
hil_report.md from it. A full run starts fresh; a re-run (--skip-board / -bt,
i.e. the .skip file) merges into the existing report so already-passed
boards/tests are preserved while only re-run cells update. The report dir is
configurable via HIL_REPORT_DIR.

build.yml: each HIL rig writes the report to a workspace-sibling dir that
survives the per-attempt workspace clean, and uploads it as an artifact. A new
hil-report job merges the rigs' reports into one sticky PR comment (marocchino)
with one table per rig.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:11:13 +07:00
46aded44af presets,hil: keep Ninja Multi-Config; make HIL find its output
Per review (HiFiPhile): Ninja Multi-Config is needed for IAR, otherwise the
optimization level can't be lowered to none for debug. Revert gen_presets.py
back to Ninja Multi-Config (keeping only the cmake-build-<board> binaryDir
change), and instead teach hil_test.py to locate <ex>.elf whether it sits
directly in the example dir (single-config) or under a per-config subdir like
RelWithDebInfo/ (multi-config).

Verified: stm32u083nucleo passes 13/13 remote HIL with a multi-config preset
build (rsync preserves the RelWithDebInfo/ subdir; the resolver finds it).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:42:00 +07:00
d38ba79ad4 test/hil: report board x test results as a markdown matrix
hil_test.py now writes hil_report.md and prints it to stdout: rows are
boards, columns are tests (bare example names), cells are pass/fail/skip.
test_example returns a per-test status, test_board collects a board x test
grid (one row per flags-on variant), and main() renders an aligned table.
A missing binary counts as skipped. hil_ci.sh copies the report back from
the remote after a run; hil_report.md is gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:17:20 +07:00
6586d94af0 gitattributes: keep shell scripts LF under core.autocrlf
With core.autocrlf=true, *.sh files were checked out / restored with CRLF
line endings, which breaks bash ($'\r': command not found; set: pipefail:
invalid option). Pin *.sh to eol=lf so shell scripts stay LF in the working
tree regardless of autocrlf.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:10:35 +07:00
d2e7bbb085 test/hil: add stm32u083nucleo to pool and expose ~/bin on remote PATH
Add stm32u083nucleo to the active boards in tinyusb.json, flashed via the
stlink flasher (onboard ST-Link + STM32CubeProgrammer); ci's openocd build
has no STM32U0 flash driver. STM32_Programmer_CLI lives in ~/bin on ci,
which the remote `bash -s` shell in hil_ci.sh did not have on PATH, so add
$HOME/bin to its PATH export (matching the GHA runner .path). Verified
remote: 13/13 device tests pass on ci.lan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:35:07 +07:00
bfaa3b6c4f tools/gen_presets: build into cmake-build-<board> with single-config Ninja
Change the default configure preset binaryDir from build/<board> to
cmake-build-<board> (the dir name HIL expects) and switch the generator
from Ninja Multi-Config to single-config Ninja. Multi-Config nests
binaries under a RelWithDebInfo/ subdir, which hil_test.py does not look
in; single-config emits device/<ex>/<ex>.elf so preset-built firmware is
directly consumable by `hil_test.py -B examples`.

Regenerated BoardPresets.json (also picks up the tracked ch32v103c_bluepill
board that was missing from presets).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:34:57 +07:00
97480bad2c stm32u0: implement board_get_unique_id from UID_BASE
Previously stm32u0 had no board_get_unique_id(), so it fell back to the
weak default in hw/bsp/board.c and every board reported the placeholder
USB serial 0123456789ABCDEF. HIL identifies boards by USB serial, so a
non-unique serial collides on a multi-board rig. Read the 96-bit unique
ID from UID_BASE, mirroring stm32u5. Verified on stm32u083nucleo: now
enumerates as 300044000D5036394E373620.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:34:47 +07:00
7c68545ab6 ci: post auto-review findings to the PR (#3684)
Add --comment so the auto-review is actually posted on the PR.
2026-06-08 09:42:08 +07:00
1009b14b02 add tm4c123x evk to hill pool (#3676)
* add ek_tm4c123gxl to the hil pool, flashing with lm4flash
2026-06-05 21:23:40 +07:00
9dea2c8f39 ci: carry metrics baseline forward on no-code-change pushes (#3678)
* ci: carry metrics baseline forward on no-code-change pushes

The code-metrics job is gated on code_changed and only uploads the
metrics-tinyusb artifact on push, so a workflow/docs-only push to master (e.g.
removing an unrelated workflow) leaves the latest master Build run without a
baseline. PRs download the baseline from the latest master run, so the size
comparison then finds nothing and silently falls back to absolute sizes.

Add a small metrics-carry-forward job that, on a non-code-change push, downloads
the previous metrics-tinyusb artifact and re-publishes it, so the latest run
always carries a usable baseline. Carry-forward runs re-upload too, so the
baseline chains across consecutive no-code pushes (bounded by artifact retention).
2026-06-05 14:34:27 +07:00
ddc065dc9f Remove Sponsor Triage workflow (migrated to hathach/hathach) (#3675)
This personal automation now lives in the hathach/hathach repo alongside the
other personal project-sync workflows; it has no place in the tinyusb library.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 21:59:59 +07:00
38debe00ba Merge pull request #3666 from hathach/dwc2_postfix
dwc2 postfixes
2026-06-04 21:55:12 +07:00
a105f9d099 Merge pull request #3653 from hathach/ch32_warning
add device specific issues
2026-06-04 21:19:17 +07:00
a900ea93db dwc2: cleanup setup_packet pointer cast (review feedback)
Cast DOEPDMA0 through uintptr_t and use sizeof(tusb_control_request_t)
instead of the magic constant 8, matching project convention. Add a
reference to Programming Guide v4.20a 9.1.2.1 for the DOEPDMAn-8 rule.

Addresses Copilot review comment; no functional change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 20:46:49 +07:00
b5e080732e Update setup buffer size definition based on DMA configuration 2026-06-04 17:55:44 +07:00
0393a5eaa1 Merge branch 'master' into dwc2_postfix 2026-06-04 15:31:45 +07:00
ac32feafeb ci(labeler): auto-apply Port labels from changed driver files (#3673)
* ci(labeler): auto-apply Port labels from changed driver files

Add path-based labeling so a PR touching a dcd/hcd driver under
src/portable/ gets the matching "Port <ip>" label automatically.
2026-06-04 15:18:40 +07:00
3d0516f439 ci(labeler): match emoji-renamed labels (#3672)
Labels were renamed to add emojis (Adafruit 🌸, Sponsor 💖, Prio 🚩,
Prio Top 🚨); update the hardcoded label names in the labeler script
to match so they attach to the existing labels instead of recreating
plain ones.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:27:54 +07:00
709b33d848 ci: bump actions/github-script v7 -> v8 (Node.js 24) (#3671)
Node.js 20 actions are deprecated; v8 runs on Node.js 24.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:55:17 +07:00
ec95d9a577 Merge pull request #3670 from hathach/update-labeler
ci: sponsor/Adafruit labeling + Sponsor Triage board sync
2026-06-04 13:44:30 +07:00
10e5701207 ci(sponsor-triage): select PullRequest id in search results
The search drops is:issue to include PRs, but the GraphQL selection only
had '... on Issue { id }', so PR nodes returned no id and were skipped.
Add '... on PullRequest { id }'. (Codex/Copilot review finding.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:06:13 +07:00
c86fea62e7 ci(sponsor-triage): include open PRs, not just issues
Drop the is:issue qualifier so sponsor pull requests are synced to the
board too (search type ISSUE already returns both). A sponsor's open PR
is exactly the kind of work to prioritize reviewing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:55:32 +07:00
5e3a56a387 ci: add Sponsor Triage board sync workflow
Cron (6h) + manual workflow that adds open issues opened by GitHub
sponsors (public and private) and Adafruit org members across the
adafruit org and the maintainer's repos to the private Sponsor Triage
project board, setting Tier and Visibility. Logs counts only to avoid
leaking private sponsor logins. Needs the SPONSOR_TOKEN PAT secret.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:16:14 +07:00
824a2d6d85 ci(labeler): add sponsor/Adafruit tiers, owner skip, and discussion support
- rename priority labels usage to Prio / Prio Top
- label Adafruit members (Adafruit + Sponsor + Prio Top) and public
  GitHub sponsors by tier; contributors get Prio
- skip sponsor/Adafruit perks for the maintainer's own issues/PRs
- support discussions via the GraphQL addLabelsToLabelable mutation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:16:13 +07:00
35d67a2840 Merge pull request #3669 from hathach/dwc2-l476-setup
dwc2: submit SETUP on SETUP_DONE, handle v3.10a spurious RX_COMPLETE (STM32L476)
2026-06-04 09:16:31 +07:00
1f6236ae07 dwc2: address Copilot review (comment grammar/typo, tinyusb.json f407 dedup)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 23:41:19 +07:00
6b89aea9de dwc2: remove investigation debug logging
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 23:18:28 +07:00
e45d5ad528 Add STM32F407 and STM32L476 disco board configurations to tinyusb.json 2026-06-03 23:13:17 +07:00
a6098c38ac refactor(cmake): comment out unused target folder properties 2026-06-03 21:46:11 +07:00
73af6494cd dwc2: submit setup packet on SETUP_DONE and drop spurious EP0 RX_COMPLETE on core v3.10a (STM32L476)
DWC2 core rev 3.10a pushes an extra EP0 RX_COMPLETE (RXFLVL PKTSTS 0x3)
  that is not a real OUT data completion, in two cases flagged on DOEPINT:
    - STPKTRX  (Setup Packet Received): between SETUP_RX and SETUP_DONE
    - STSPHSRX (Status Phase Received, control write): after the OUT data
      stage when the host starts the IN status phase
2026-06-03 21:44:19 +07:00
e2100b44d3 Merge branch 'master' into ch32_warning 2026-06-03 18:47:28 +07:00
232315d690 Merge remote-tracking branch 'origin/master' into dwc2_postfix 2026-06-03 15:28:29 +07:00
f13d86cf29 Merge pull request #3668 from hathach/claude/review-sticky-comment
ci(claude): post sticky summary comment on code review
2026-06-03 15:27:10 +07:00
9a3e32bf54 ci(claude): post sticky summary comment on code review
The review workflow posted nothing when a review found no issues:
with use_sticky_comment unset, the only output path was inline
comments, so a clean review surfaced no comment at all on the PR.

Enable use_sticky_comment so a single summary comment is posted/
updated every run, making "no issues found" results visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 15:15:07 +07:00
109ca7ec36 Merge remote-tracking branch 'origin/master' into dwc2_postfix 2026-06-03 09:25:15 +07:00
31c73a3bbb Merge pull request #3667 from hathach/ci-claude-review-allowed-bots
ci: allow claude[bot] pushes in code review workflow
2026-06-03 09:23:56 +07:00
d585977d92 ci: allow claude[bot] pushes in code review workflow
Add allowed_bots: 'claude' so that when claude[bot] pushes commits the
workflow skips gracefully instead of erroring.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 09:21:44 +07:00
cc979da516 dcd/dwc2: fix back-to-back SETUP reception in DMA mode
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-02 22:59:45 +02:00
f19c01216f docs: revert USBFS non-ISO transfer qualification in device_issues
Restore original "Other types of transfers are not affected" statement,
removing the conditional USBHS_INT_BUSY_EN / USBFS-unconfirmed wording.

Co-authored-by: Zixun LI <HiFiPhile@users.noreply.github.com>
2026-06-02 16:59:14 +00:00
ff3fef931d docs: fix review issues in device_issues and README
- Remove duplicate toctree entry for reference/device_issues from docs/index.rst
  (already included via docs/reference/index.rst)
- Fix WCH section title: CH32V10X/CH32V20X/CH32V30X → CH32F20x/CH32V20x/CH32V30x
  to match the three actual README table entries (CH32F20x, CH32V20x, CH32V305/307)
- Update README anchor links to match the renamed section
- Qualify USBFS non-ISO transfer safety claim: USBHS is protected by
  USBHS_INT_BUSY_EN but USBFS behavior is not yet confirmed
- Fix LPC54600 note: "read errata" → "see device issues"
- Remove "totally" from LPC54600 description

Co-authored-by: Ha Thach <hathach@users.noreply.github.com>
2026-06-02 16:01:23 +00:00
22c2ece872 try to get render right
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-02 11:30:33 +02:00
64af21f930 Merge remote-tracking branch 'tinyusb/master' into ch32_warning
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-02 11:03:50 +02:00
e35b070dae rename to device issues
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-02 10:43:55 +02:00
5004a24b2c Merge pull request #3664 from hathach/add-sponsor-section
docs: add Sponsors section with GitHub Sponsors tiers
2026-06-02 15:39:56 +07:00
72006885c7 add sponsor section 2026-06-02 15:24:31 +07:00
f78715d8f3 Merge pull request #3663 from hathach/claude-workflow-fix-bugs
ci(claude): enable @claude to fix bugs and commit from comments
2026-06-02 12:08:56 +07:00
2fc46b6909 ci(claude): drop Bash allowlist entirely (Codex P1, round 2)
Codex correctly noted that allowing python3/python (and really cmake/make
too) is arbitrary code + network execution: a command allowlist cannot
contain a prompt-injected or malicious fork PR when this job holds the
OAuth secret + write token, and the review workflow directs fork PRs to
@claude.

The Bash allowlist was beyond the original scope (auto-commit/PR) anyway.
Remove it: Claude edits files and the action commits/opens the PR, and the
resulting commit is verified by the existing CircleCI matrix. Keep
use_commit_signing and --max-turns 30.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 11:18:14 +07:00