Commit Graph

10893 Commits

Author SHA1 Message Date
461dff5911 Fix code-review findings (changelog rendering, release skill, sidebar)
- changelog: fix 3 silent RST mis-renders carried over from the old monolith
  — Markdown link in 0.7.0, mismatched/single backticks in 0.18.0 / 0.20.0
- make-release skill contributors one-liner: parallelize the gh fetch, anchor
  the bot filter (was a substring that dropped handles like "abbott"), and join
  with ", " (paste -sd cycles the delimiter -> "@a,@b @c"); finalize now stages
  only the reviewed set (git add -A -- ':!.idea'); drop the obsolete CRLF gotcha
- make_release.py: emit LF not CRLF in the repository.yml insertion (fixes the
  gotcha at the source)
- docs sidebar: drop the hardcoded furo component list; override brand.html to
  include furo's own template + the sponsor button (decoupled from furo
  internals, no upper-bound pin needed); move sponsor styles into custom.css
- .pre-commit-config.yaml: drop stale end-of-file-fixer excludes for the
  deleted contributors/CoC include shims

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 10:57:26 +07:00
0657ecf728 Address Codex review: release skill + furo requirement
- make-release skill: stage new files with git add -A in finalize, use
  unprefixed release tags (X.Y.Z), and run validate build steps in subshells
  so the cwd doesn't leak between commands
- docs/requirements.txt: require furo>=2025.12.19 so the sidebar component
  list in conf.py (incl. variant-selector.html) is always available

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 10:23:36 +07:00
ebb2bbe310 Keep merged CH583/2 + CH32V103 row (same ISO data loss issue)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 09:14:43 +07:00
ce23b8d72e Address Copilot review; move release process into the make-release skill
- README: restore the separate CH32V103 / CH583,CH582 rows in the Supported
  CPUs table — the merged row wrongly applied "ISO data loss [2]" to CH583/2
- Fix typos in historical changelog entries (santiy, Venndor, dynamnic, bagde,
  masstorage, techinical, walkaround, "Update Update") flagged by Copilot
- Replace the AGENTS.md Release section with a pointer to the make-release
  skill; add a Finalize step (maintainer commit/tag/push + GitHub release) to
  the skill so nothing is lost

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 09:10:50 +07:00
c887bd907c Bump version to 0.21.0; rework changelog, contributors, and docs
Release:
- Bump version to 0.21.0 and regenerate tusb_option.h, library.json,
  repository.yml, sonar-project.properties, boards.rst, dependencies.rst
- Add 0.21.0 release notes and split the changelog into per-release files
  under docs/info/changelog/ (date out of title, driver/class groups as
  sub-headings, DCD & HCD section after Device/Host stacks)

Contributors:
- Credit each release's PR authors in a Contributors section
- Drop the curated contributors page; add MAINTAINERS.rst

Docs:
- Update Code of Conduct to Contributor Covenant 3.0 (keep it in the repo,
  remove it from the built docs)
- Sidebar: add a home entry, rename the group to "Documentation", move
  Changelog into it, add a GitHub Sponsor button, merge external links,
  rename FAQ; hide the inline toctree on the landing page
- Add the make-release skill and update the AGENTS.md release process

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 23:38:01 +07:00
40f4c12c6b Merge pull request #3743 from hathach/claude/build-doc-skill
docs: add build-doc tooling and a README for every example
2026-06-29 12:56:16 +07:00
ba32b46ebd docs: address Copilot review on the example READMEs
- Order CFG_TUH_DEVICE_MAX before CFG_TUH_HID in the host config snippets
  (cdc_msc_hid, hid_controller) so the documented snippet has no forward
  macro reference when copied into tusb_config.h.
- Fix stale `examples.rst` references: the generator now writes per-group
  `docs/examples/<group>/index.rst` pages, so update the conf.py comment and
  the build-doc SKILL.md accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 10:42:41 +07:00
4b1c8d16f7 docs: add build-doc tooling and a README for every example
Documentation tooling:
- Add the `build-doc` skill and `tools/build_doc.py` wrapper for local
  Sphinx builds (clean / -W / open).
- Enable Markdown (MyST) in conf.py and auto-collect
  examples/{device,host,dual}/*/README.md into a 3-level Examples nav
  (Examples > Device/Host/Dual > example), noting each page's source
  location and normalizing headings to a single H1.
- Remove the stale `.claude/commands/build-doc.md`; point the AGENTS.md
  Documentation section at the skill.

Example docs:
- Add a README.md for every device/host/dual example: what it does, USB
  interface table, notable tusb_config.h settings, generic CMake + Make
  build steps, and how to try it.
- Fold each *_freertos variant into its base README, noting the FreeRTOS
  source path and any RTOS-specific behavior.

Generated docs/examples/ output is git-ignored. Builds clean with
`sphinx-build -W`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 10:16:25 +07:00
be22838b08 Merge pull request #3735 from hathach/claude/hil-ch32v103r-throughput
test/hil: enable cdc_msc_throughput on ch32v103r_r1_1v0
2026-06-29 09:14:04 +07:00
ca8a74fa93 Merge pull request #3731 from zjzhang-cn/fix/dwc2-hcd-ls-hfir
fix(dwc2_hcd): correct HFIR for Low-Speed devices via internal FS PHY
2026-06-27 14:38:35 +02:00
c1e529fc02 Merge pull request #3737 from grunzasr/Add_NUCLEO_H533RE
Add ST board NUCLEO_H533RE
2026-06-27 14:37:51 +02:00
dd5b2b5b5b bsp/stm32h5: fix linker
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-27 13:02:00 +02:00
8ee82a55c9 bsp/stm32h5: fix uart definition
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-27 12:53:53 +02:00
29745b62f9 refresh presets
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-27 11:54:51 +02:00
a0a1caf58c Added NUCLEO_H533RE so this board can be used out-of-the-box 2026-06-26 10:35:06 -04:00
2e2baaecfd Added files by copying and modifying files from stm32h503nucleo direcotry to stm32h533nucleo 2026-06-26 10:11:02 -04:00
9c31c8ab0e test/hil: enable cdc_msc_throughput on ch32v103r_r1_1v0
The board was added to the CI HIL pool with device/cdc_msc_throughput
skipped, so the test had never run on it. Remove the skip to include it
in the device test set.

Verified passing on the ci rig (USBFS, full-speed):
CDC read 639 / write 544 kBps, MSC read 845 / write 575 kBps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 15:15:05 +07:00
0ec10636b3 Merge branch 'hathach:master' into fix/dwc2-hcd-ls-hfir 2026-06-26 09:33:32 +08:00
854525d526 hcd/dwc2: update wording on hfir
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-25 21:46:58 +02:00
0a25cc27d7 Merge pull request #3616 from michaelajax/fix-stm32-usbc
typec/stm32: fix UCPD sink bugs affecting compatibility with newer PD sources
2026-06-25 10:24:39 +02:00
ff86dfe41f Merge pull request #3730 from dxbjavid/msc-scsi-cb-bufsize-cap
cap tud_msc_scsi_cb bufsize to endpoint buffer size
2026-06-25 09:30:41 +02:00
e95d6b3932 fix(dwc2_hcd): correct HFIR for Low-Speed devices via internal FS PHY
When a Low-Speed device is connected through the internal FS PHY,
the effective PHY clock is 6MHz (HCFG_FSLS_PHYCLK_SEL_6MHZ),
but phy_clock was incorrectly left at 48. This caused HFIR to be
calculated as 47999 (~8ms SOF interval) instead of the correct 5999
(1ms SOF interval), breaking periodic endpoint scheduling.

Fixes: LS mouse only receiving first HID report on OTG_HS + FS PHY
2026-06-25 10:00:57 +08:00
c374de17d9 skip cable-plug traffic
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-24 23:41:43 +02:00
430efad690 skip pdo request if no suitable voltage
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-24 21:59:41 +02:00
1c267bf61d apply review suggestions
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-24 21:36:03 +02:00
87a98641e4 fix ci
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-24 21:33:36 +02:00
f35af01db5 typec: add tuc_connect/tuc_disconnect api
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-24 21:15:33 +02:00
3a1ced7e13 typec: add stm32u5 support
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-24 21:13:27 +02:00
7677495721 cap tud_msc_scsi_cb bufsize to endpoint buffer size 2026-06-24 21:53:53 +05:30
94d5e74f63 Merge pull request #3729 from hathach/claude/usbmon-skill-and-hil-fail-count
Add usbmon skill and show pass/fail/skip counts in HIL report
2026-06-24 16:50:36 +07:00
f8314e3336 test/hil: show pass/fail/skip counts above the HIL report table
Prefix each rig's hil_report.md matrix with a one-line tally
(passed / failed / skipped) so the number of failed tests is visible at a
glance in the PR comment without scanning the table. A metric-string cell
(e.g. throughput) counts as a pass; blank/not-run cells are excluded.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 16:42:04 +07:00
bc9cf55927 docs: add usbmon skill for capturing/debugging USB bus traffic
Adds a Claude Code skill that wraps usbmon + tshark to capture host-side
URBs into a Wireshark pcapng and decode them, for debugging TinyUSB device
enumeration/transfer issues on real Linux hardware. Includes a usbcap.sh
capture helper (bus / VID:PID / auto) plus filter, errno, and
symptom->check reference tables.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:44:25 +07:00
467f638e98 Merge pull request #3648 from hathach/ch32_fsdev
dcd/stm32_fsdev: workaround CH32 EP0 premature OUT ACK
2026-06-24 13:27:18 +07:00
033dc6bb77 Merge remote-tracking branch 'tinyusb/master' into fix-stm32-usbc 2026-06-23 23:12:51 +02:00
e7cf9583f8 Merge pull request #3698 from dxbjavid/hid-report-desc-bounds
bound item size to remaining length in hid report descriptor parser
2026-06-23 19:18:13 +02:00
33a340dbbe Merge pull request #3721 from renjieah/pr-osal-spin-deinit
fix: release hardware spinlock in tud_deinit/tuh_deinit
2026-06-22 21:46:11 +02:00
0d7318de1b address review 2026-06-22 21:39:36 +02:00
693cdce08e Merge remote-tracking branch 'tinyusb/master' into pr-osal-spin-deinit
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-22 21:30:58 +02:00
41e9eaa65a usbd: add osal_spin_deinit() to tud_deinit()
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-22 21:27:05 +02:00
f94e1f575e usbh: remove Pico specific comment
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-22 21:25:44 +02:00
f9698aedae osal: add missing osal_spin_deinit()
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-22 21:23:49 +02:00
cd3561bf15 Merge pull request #3515 from alt-0191/ch58x
Add support for WCH ch582/583 series
2026-06-22 22:20:29 +07:00
706e4a5daa Merge remote-tracking branch 'origin/master' into add-ch58x-usbfs 2026-06-22 15:36:37 +07:00
299c0a5562 ci: post HIL report comment from workflow_run so it works on forked PRs (#3723)
* ci: post HIL report comment from workflow_run so it works on forked PRs
2026-06-22 15:33:03 +07:00
8abaf22bb6 tusb_option: dedupe OPT_MCU_CH583 / make OPT_MCU_CH582 a token alias
The CH58x->CH583 rename left OPT_MCU_CH583 defined twice at 2240 plus a second
literal 2240 for OPT_MCU_CH582 -- a duplicate public MCU option macro (redefinition).
Collapse to a single canonical OPT_MCU_CH583 and define OPT_MCU_CH582 as a token
alias of it (matching the OPT_MCU_SAML21/MIMXRT10XX alias style), so there is one
value and CH582 still selects the CH583 code path.

Found by Codex review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 15:28:00 +07:00
f567adb68a docs: add WCH CH32V103 and CH583/CH582 to the supported MCU table
Both run on the shared ch32_usbfs device driver (full-speed). CH32V103 is the older
combined-control USBFS IP; CH583/CH582 (ch583 family) is device-only in this port.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 15:23:21 +07:00
eda704ca1a hw/bsp+wch: rename the CH58x family to ch583 and OPT_MCU_CH58X to OPT_MCU_CH583
The BSP family and MCU option were named "ch58x"/"CH58X", but the supported part is
the CH583/CH582 (and the SDK repo is openwch/ch583); CH585 is a separate MCU family,
so the CH58x umbrella was misleading. Rename to the specific family:

- hw/bsp/ch58x -> hw/bsp/ch583 (dir), and the BSP-local files ch58x_it.* ->
  ch583_it.*, system_ch58x.* -> system_ch583.* (include guards/refs updated). The
  vendor SDK files (CH58x_common.h, CH58x_*.c in hw/mcu/wch/ch583) keep their names.
- OPT_MCU_CH58X -> OPT_MCU_CH583 in tusb_option.h, tusb_mcu.h, and the shared WCH
  USBFS driver (ch32_usbfs_reg.h, dcd_ch32_usbfs.c). OPT_MCU_CH582 is kept as an
  alias (same value), so either name selects the same code.
- FAMILY_MCUS CH58X -> CH583, CFG_TUSB_MCU=OPT_MCU_CH583, mcu:CH58X -> mcu:CH583 in
  the example skip lists, the CI build matrix (ci_set_matrix.py), the get_deps family
  tag, and docs/reference/boards.rst.

Board names (ch582m_evt, yd-ch582m) are unchanged. Verified: make + cmake build for
ch582m_evt, and ci.lan HIL (all device examples pass).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 15:23:08 +07:00
2e34ef2835 Merge pull request #3712 from hathach/claude/ch32-fsdev-review-fixes
dcd/stm32_fsdev: review fixes for the CH32 EP0 OUT workaround
2026-06-21 21:18:30 +02:00
f7617168e2 fix(host): release spinlock in tuh_deinit to fix multi-rebuild panic
tuh_rhport_init() calls osal_spin_init(&_usbh_spin), which under OPT_OS_PICO
claims a hardware spinlock via critical_section_init(). There was no
osal_spin_deinit(), so tuh_deinit() never released it: every host init/deinit
cycle leaked one spinlock. RP2350 has a small spinlock pool, so a few usb_host
rebuilds exhaust it and hw_claim_unused_from_range() panics (the long-standing
"crashes on the 4th rebuild" bug).

Add osal_spin_deinit() to all OSAL backends (critical_section_deinit for pico;
no-op for none/freertos) and call it in tuh_deinit(). Verified 20/20
deinit+rebuild cycles on RP2350-Zero and Waveshare RP2350-USB-A (previously
panicked on the 4th).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 17:46:26 +08:00
ef63456eea examples: skip isochronous audio/UAC examples on CH58X
CH58x has no isochronous support (dcd_edpt_iso_alloc() returns false), but the
audio class ignores that result and the endpoints fall back to capped 64-byte
non-iso transfers, producing non-functional audio firmware. video_capture and the
FreeRTOS audio examples already carry mcu:CH58X; add it to the remaining iso
examples (audio_test, audio_4_channel_mic, audio_test_multi_rate, cdc_uac2,
uac2_headset, uac2_speaker_fb) so they are not built for CH58x.

Found by Codex review. Verified via build_utils.skip_example() that all six now
skip on ch582m_evt while control examples (e.g. cdc_msc) still build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 23:37:23 +07:00