Commit Graph

10685 Commits

Author SHA1 Message Date
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
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
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
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
6936cc630d ci(claude): scope Bash allowlist instead of wide-open (Codex P1)
Codex flagged that @claude can be summoned on a fork PR (the review
workflow even directs fork PRs here), so the checked-out PR content is
potentially attacker-controlled. Unrestricted Bash in this write-token +
OAuth-secret job let prompt injection steer Claude into arbitrary
shell/network commands.

Scope Bash to the repo's actual verification commands (cmake, ninja,
make, ctest, python/python3, pre-commit, clang-format, codespell, git).
This blocks the injection-to-arbitrary-command path while still letting
Claude build/test before committing. Building fork code itself is already
done by the existing CircleCI, so that surface is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:42:39 +07:00
b009ddb012 ci(claude): enable @claude to fix bugs and commit from comments
Configure the @claude summon workflow so it can actually produce a
verified fix when asked in an issue/PR comment:

- use_commit_signing: bot commits show as Verified
- --allowedTools Bash: lets Claude build/test to verify the fix before
  committing (default allowlist blocks Bash). Safe because the job `if`
  gate restricts this to OWNER/MEMBER/COLLABORATOR.
- --max-turns 30: enough turns to investigate -> fix -> verify

Auto-commit/PR is already built into claude-code-action and the
required write permissions were already present, so no permission
changes are needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:38:09 +07:00
8e0f2bd1c7 Merge pull request #3662 from hathach/update-claude
Update claude
2026-06-02 10:18:06 +07:00
044cd06f87 ci: address second codex/copilot review round
- claude.yml: drop the issues "assigned" trigger; its author_association
  gate keys on the issue author, not the assigner, so a maintainer
  assigning an outside contributor's issue would be wrongly skipped.
- claude-code-review.yml: issues: read -> write so use_sticky_comment can
  create/update its PR comment via the issues API.
- hil SKILL.md: make local/remote command blocks copy-pasteable (drop
  [-b BOARD_NAME] notation for concrete examples) and fix timeout
  (600000 ms is 10 min; use 1200000 ms for the stated 20 min).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 00:24:05 +07:00
1ea04f7fe6 ci: address codex/copilot review on claude workflows
- claude.yml: gate @claude on author_association (OWNER/MEMBER/COLLABORATOR)
  so the write-scoped token and OAuth secret are never issued for an
  untrusted commenter on this public repo (defense-in-depth).
- claude-code-review.yml: skip fork PRs in the job condition
  (head.repo.full_name == github.repository) since forks get no secrets
  and would only fail noisily; fix the misleading token comment; pass
  additional_permissions: actions: read so actions: read is effective.
- hil SKILL.md: reword hostname guidance, use full test/hil/* paths, and
  show an explicit CONFIG= assignment so the local command is runnable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 00:16:54 +07:00
87f9cc01cf ci: re-enable Claude PR review and harden auth/permissions
- claude-code-review.yml: re-enable (drop `if: false`); switch from
    pull_request_target to pull_request so fork PRs never receive the
    OAuth token (avoids prompt-injection token leak). Auto-review on
    open/synchronize/reopen/ready_for_review, skip drafts, sticky comment.
  - claude.yml: grant contents/pull-requests/issues write so @claude can
    reply and push fixes; @claude is the on-demand path for fork PRs.
2026-06-01 23:51:41 +07:00
95d11a8a7a docs(hil): support running HIL locally on ci.lan
Update the hil skill so config selection is per-host: run `hostname`
  first, then htpc uses local.json and ci uses tinyusb.json. ci can now
  run HIL on its own large board pool locally instead of only via SSH
  from htpc. Remote (SSH) mode is htpc-only since ci cannot reach htpc.
  Also compact the skill for brevity.
2026-06-01 23:51:24 +07:00
bbdb41995d Merge pull request #3657 from hathach/usbh-add-control-queue
Add control transfer fifo for host stack
2026-06-01 12:42:03 +07:00
17185428df CFG_TUH_CONTROL_PENDING_QUEUE_SZ defefault to 4 if hub is eanbled, 2 if not 2026-06-01 10:58:36 +07:00
7e0fcaa41e ultrareview nits: keep xfer_result table in sync, hoist blinky loop
- src/tusb.c: extend tu_str_xfer_result[] with "ABORTED" and "INVALID"
  to match the new enum size. Not reachable today (no HCD posts those
  values through hcd_event_xfer_complete), but keeps the enum/table
  invariant intact so future HCDs that surface ABORTED don't index OOB.

- examples/dual/dynamic_switch/src/main.c: apply the same while(1)
  hoist already done for cdc_task / print_devinfo_task to
  led_blinking_task. On OS_NONE the loop returned mid-iteration, which
  on first call could fire multiple back-to-back toggles while
  start_ms (initially 0) caught up to uptime.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 10:05:17 +07:00
2c27ec9c89 Merge pull request #3620 from UMRnInside/fix-ch32v103-hardfault
Fix ch32v103 hardfault & Add CH32V103C8T6 Bluepill board
2026-05-30 17:05:01 +02:00
26724bfb13 Merge pull request #3658 from wjklimek1/mtp-out-transfer-fix
Fix premature MTP phase change after short MTP OUT transfer
2026-05-30 13:04:35 +02:00
d3ae3a02a9 Merge pull request #3634 from HKM-Messtechnik/fix/Dwc2Stm32U5
dwc2: preserve EP0 status completion before SETUP
2026-05-30 13:03:32 +02:00
08381d4421 esp32 build fixes
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-05-30 11:46:18 +02:00
a64eb336c4 dynamic_switch: hoist while(1) out for OS_NONE
Sonar flagged the loop body as executing only once on OS_NONE because
the OS_NONE branch returns inside the first iteration (main() drives
the task again). Make the while(1) conditional on RTOS so the OS_NONE
build is a straight-line function with no misleading loop.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 00:52:22 +07:00
fc933e341d midi2_host: silence IAR Pe550 for midi2_idx
The variable is set in mount/umount callbacks but not read elsewhere
in the example (rx_cb already receives idx as a parameter). IAR
treats Pe550 as an error under --warnings_are_errors. Tag it
TU_ATTR_UNUSED so the example still shows the pattern of tracking
the device index without erroring on unused-set.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 00:46:16 +07:00
0761df7420 midi2_host: drop unreachable return 0 for IAR Pe111
Same fix as midi2_device — IAR rejects the unreachable statement
after the while(1) superloop. Let int main fall off the end.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 00:42:14 +07:00
28beb0fe4d ci: fix IAR Pe111 and stm32h7s3 flash overflow
- examples/device/midi2_device/src/main.c: drop the unreachable
  `return 0;` after the `while(1)` superloop. IAR with
  --warnings_are_errors rejects Pe111 (statement is unreachable);
  C99 lets `int main` fall off the end, matching midi_test.

- examples/host/msc_file_explorer_freertos/skip.txt: skip
  stm32h7s3nucleo. The board has only 64 KB on-chip FLASH and the
  FreeRTOS + FatFS host MSC explorer now overflows by ~248 bytes
  after the async control queue refactor.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 00:11:19 +07:00
24700ea8ef midi2_device: gate -Wno-type-limits to GCC/Clang for IAR build
iccarm rejects -Wno-type-limits, breaking the hil-hfp-iar CI matrix
(stm32l412nucleo, stm32f746disco, lpcxpresso43s67). Apply the same
CMAKE_C_COMPILER_ID guard used in hw/bsp/family_support.cmake so IAR
builds skip the flag without losing the GCC warning suppression.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 23:59:15 +07:00
3be8226b18 Merge branch 'master' into usbh-add-control-queue 2026-05-29 23:55:25 +07:00
b4e7c25c1b dwc2: process IN EP before OUT
To avoid STATUS IN completion of previous control transfer treated as next DATA IN  when IRQ latency is high.

Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-05-29 11:42:47 +02:00
84e3347bad Handle OUT transfer completion in MTP
Handle OUT transfer differently from IN to not prematurely change MTP phase when host sends short packet that is not end of MTP data phase. Only reaching container length or ZLP should change phase.
2026-05-29 11:39:07 +02:00
d754c0697c Implement asynchronous control transfer queuing for USB host stack
- Added a pending FIFO queue for asynchronous control transfers when the active slot is busy.
- Introduced `control_xfer_dispatch_pending` to handle queued transfers on slot availability.
- Improved synchronization for blocking and non-blocking transfer modes, preventing deadlocks in RTOS.
- Refactored and renamed related functions for clarity and consistency.
- Enhanced error handling and callback invocation for failed or stale transfers.
2026-05-29 16:16:21 +07:00
33f151a43b bsp/stm32f4: enable flash cache
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-05-29 10:03:09 +02:00
d85ddd2f8a bsp/stm32f7: fix f746disco jlink device
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-05-29 00:39:19 +02:00
6e63910d2a Merge remote-tracking branch 'tinyusb/master' into fix/Dwc2Stm32U5 2026-05-29 00:23:46 +02:00
dafdc5c54f dwc2: move OUT transfer management into RXFLVL IRQ
- GRXSTSP register has internal FIFO, receiving events won't mix up (STATUS OUT & next SETUP)
- Improve efficiency, remove 2nd IRQ overhead

Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-05-29 00:05:44 +02:00
c5676382c7 abstract OS logic with CFG_TUSB_OS_HAS_SCHEDULER to simplify conditional checks 2026-05-28 18:23:46 +07:00
c954c8c4c7 remove sync() in tinyusb callback since it cause issue with RTOS when usbh task is blocking 2026-05-28 18:20:22 +07:00
616acfa732 osal add osal_task_get_current_handle() 2026-05-27 19:20:58 +07:00
4a131e1562 hil: replace pyfatfs with mtools, update host setup instructions
- Removed `pyfatfs` dependency in favor of `mtools` for reading FAT volumes, simplifying the block device read logic.
- Updated `requirements.txt` and added detailed host setup instructions for system packages.
- Switched to `cython-hidapi` for HID tests, replacing deprecated APIs with updated usage.
- Removed unnecessary warnings suppression and `fs` module.
2026-05-27 17:43:22 +07:00