Commit Graph

409 Commits

Author SHA1 Message Date
dae3f9a366 docs: convert changelog release notes from RST to Markdown (#3746)
* docs: convert changelog release notes from RST to Markdown
2026-06-30 22:27:27 +07:00
20200b3520 docs: move changelog to docs/changelog, drop the docs/info folder
Relocate docs/info/changelog/ -> docs/changelog/ (docs/info held only the
changelog) and update all references: the toctree, README + MAINTAINERS links,
make_release.py, and the make-release skill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 14:39:57 +07:00
4ae991fd88 build.py: keep only raspberry_pi_pico in rp2040 ci_preferred_boards
The one-board selector uses preferred_list[0] anyway, so pico is the board built.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 13:37:29 +07:00
36667740cb build.py: prefer pico/pico2 for rp2040 CI; skill: drop one-time 0.20.0 backfill note
- ci_preferred_boards: rp2040 -> raspberry_pi_pico, raspberry_pi_pico2 so the
  one-board CI/metrics build uses a Pico (the first-alphabetical board failed).
- make-release skill: the metrics backfill was a one-time 0.20.0 task, not a
  recurring release step; keep only the CI auto-compare note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 13:35:35 +07:00
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
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
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
8ee82a55c9 bsp/stm32h5: fix uart definition
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-06-27 12:53:53 +02:00
706e4a5daa Merge remote-tracking branch 'origin/master' into add-ch58x-usbfs 2026-06-22 15:36:37 +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
2b205526d3 hw/mcu/wch: rename ch58x SDK dir to ch583 to match the openwch repo
The dependency is fetched from https://github.com/openwch/ch583.git but lived at
hw/mcu/wch/ch58x. Rename the local path to hw/mcu/wch/ch583 so it matches the
upstream repo name. Updates the get_deps.py path key and the ch58x BSP SDK_DIR
(family.mk + family.cmake); the BSP family stays "ch58x" (covers CH582 and CH583).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 00:03:18 +07:00
202746d34d ci(metrics): collapse Average Code Size Metrics table when no base
When no base metrics are available to compare against, the PR comment
falls back to the combined "TinyUSB Average Code Size Metrics" report
(build.yml copies metrics.md to metrics_compare.md). That posted the
full per-example size table inline, cluttering the comment.

Wrap the table in a <details><summary>Size table</summary> block so the
heading stays visible but the detail is collapsed by default, matching
the Size Difference Report's collapsible sections.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-18 17:19:03 +07:00
953abfb393 Merge remote-tracking branch 'origin/master' into add-ch58x-usbfs 2026-06-18 15:31:03 +07:00
594cd55084 ci(metrics): collapse <1% size changes in Size Difference Report
Wrap the "Changes <1% in size" section in a <details> block like the
"No changes" section, so the report comment only expands changes >1%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 00:12:44 +07:00
5145b67f79 Merge remote-tracking branch 'origin/master' into stm32c5
# Conflicts:
#	README.rst
2026-06-11 17:20:15 +07:00
dffc571358 Fix stm32f723disco host/cdc_msc_hid HIL: UART RX starvation + DWC2 DMA split-IN NAK storm (#3677)
Fix stm32f723disco host HIL: UART RX starvation + DWC2 split bulk NAK/XactErr handling (#3677)
stm32f7 BSP — UART RX starvation
- The host console USART shared interrupt priority with the USB OTG ISR, so a long
  OTG interrupt could starve RXNE and drop received bytes. Raise the USART RX IRQ
  above OTG_FS/OTG_HS in both the bare-metal and FreeRTOS init paths, guarded by
  #ifdef UART_ID so boards without a UART console keep the default OTG priority.

dwc2 host — split NAK/XactErr handling
- Slave mode: a persistently-NAKing split bulk/control IN poll re-armed the
  start-split immediately, storming the ISR and starving task context. Throttle by
  disabling the channel and re-arming on the resulting halt (no frame deferral).
- Buffer-DMA mode: a pure split bulk-OUT NAK was unhandled, leaving the channel
  halted and stalling the transfer — the dominant cause of CDC echo truncation.
  Handle it by rewinding the buffer pointers and retrying the start-split
  (Programming Guide v4.20a 5.1.4.2).
- Buffer-DMA mode: a split bulk-OUT XactErr was retried immediately, exhausting
  HCD_XFER_ERROR_MAX before the transient cleared. Throttle via channel_disable +
  re-arm to give the hub TT a recovery gap, mirroring slave mode.
- All three are scoped to split transfers (hcsplt.split_en); non-split NAK/XactErr
  keep the core-handled / immediate-retry behavior. The OUT XactErr throttle also
  excludes periodic split, where channel_disable() is a no-op and would wedge the
  channel. The nak_disabled flag is generalized to retry_disabled and honors
  xfer->closing so an endpoint close during a throttled retry tears down cleanly.

Verified on stm32f723disco HIL (slave + CFG_TUH_DWC2_DMA_ENABLE): host/cdc_msc_hid,
msc_file_explorer, and device_info all pass on both variants; DMA CDC echo went
from ~15-25% raw failure to 10/10 clean.
2026-06-11 10:17:28 +07:00
6f35e76667 HIL: replace build.flags_on with named build variants (#3687)
* test/hil: replace build.flags_on with named variant schema

Boards declare build variants as `variant: [{name, flags}]` instead of
`build.flags_on`. The variant `name` is the build dir (cmake-build-<name>) and
the HIL report row; `flags` is the raw CFLAGS string (-D...=1) injected via
CFLAGS_CLI. No `variant` => a single build named after the board.

- build.py: --build-name <name> (dir) + --cflag=<token> (raw CFLAGS, repeatable,
  =form survives the matrix's shell word-splitting); drop -f1/CFLAGS wrapping.
- hil_ci_set_matrix.py: emit one build arg per variant.
- hil_test.py: iterate variants; report row + build dir = variant name.
- hil_ci.sh: copy all cmake-build-<board>* dirs for -b runs.
- get_deps.py: accept (ignore) --build-name/--cflag from matrix args.
- tinyusb.json: migrate all 6 flags_on boards to variant.

* board_test: park CI build with busy spin instead of wfe
2026-06-11 08:16:43 +07:00
fe273aa114 ci: demote Average Code Size Metrics title to h2
metrics.md (write_combine_markdown) is also used as the PR size comment when
there is no base-metrics baseline; use h2 for its title too so the sticky
comment heading is consistent (and not oversized) in that fallback case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:30:19 +07:00
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
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
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
5ea1979e29 add stm32c5 support
Signed-off-by: HiFiPHile <admin@hifiphile.com>
2026-05-10 14:17:00 +02:00
17572a960a metrics_compare_base: use git worktree add --detach
`git worktree add <path> <branch>` fails if <branch> is already checked out
elsewhere (main repo, another worktree). --detach checks out the ref at a
detached HEAD instead of claiming the branch, making the script work
regardless of what is currently checked out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 12:59:40 +07:00
6ba8aeff16 metrics_compare_base: catch TimeoutExpired; fix code-size skill docs
- run() now catches subprocess.TimeoutExpired (only triggered by `cmake --build`'s
  timeout=600) and returns CompletedProcess(rc=124) so the caller falls through to
  error reporting and worktree cleanup instead of crashing with a traceback.
- code-size SKILL.md: document the actual default filter (per-side absolute
  <checkout>/src/ path, not the old `tinyusb/src` substring) and adjust the
  reporting guidance to match what the report rows actually contain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 12:45:55 +07:00
f5d6c6ba91 Improve remote execution in hil_ci.sh 2026-04-29 12:32:25 +07:00
fd715afcc5 Add code-size skill and integrate metrics_compare_base.py tool
- Introduced a `code-size` skill under `.claude/skills` for evaluating TinyUSB code size changes between the base branch and current branch.
- Added `metrics_compare_base.py`, automating code size comparison with granular options for examples, boards, and CI-wide runs.
- Updated `AGENTS.md` to include quick references and usage guidance for the new feature.
2026-04-29 11:46:34 +07:00
44b0ee0539 get freertos working with rp2040 2026-04-14 10:51:20 +07:00
b77632ebff update FatFS to R0.16 via abbrev/fatfs dependency
- Add lib/fatfs to deps_mandatory in get_deps.py, pinned to R0.16
  (commit 30ca13c6) from github.com/abbrev/fatfs mirror
- Move TinyUSB custom ffconf.h to examples/host/msc_file_explorer/src/
  with project-specific settings: FF_CODE_PAGE=437, FF_USE_LFN=1,
  FF_FS_RPATH=2, FF_VOLUMES=4, FF_FS_NORTC=1
- get_deps.py removes stock ffconf.h after clone to avoid conflict
- Remove vendored fatfs source files from git tracking

FatFS R0.16 includes important fixes since R0.15:
- Fixed FAT32 FsInfo regression (forced full FAT scan on f_getfree)
- Fixed f_readdir infinite loop (from R0.15b)
- f_getcwd/.. now works on exFAT
- Added FF_FS_CRTIME support
2026-04-02 17:32:45 +07:00
78d34d5b64 reduce code size, use state to replace active + pending 2026-04-01 17:47:01 +07:00
20fdaeef6c ch58x: fix MCU macro naming and add get_deps/boards entries 2026-03-18 15:23:28 +08:00
c5e3098c37 update rx65n_target: correct pin configuration and remove unused USB interrupt definitions 2026-03-14 12:58:41 +07:00
7ce1e78204 actual build make/cmake for ft9xx 2026-03-13 18:11:59 +07:00
5794e50c37 rename and migrate kinetis_k32l to new mcux-devices 2026-03-13 11:46:53 +07:00
e2d8d79940 migrate imxrt to use new mcux-devices-rt 2026-03-11 13:12:45 +07:00
7249c65b2a Merge pull request #3530 from hathach/hcd_ip3516
Add IP3516 HCD support
2026-03-10 21:44:40 +07:00
e658e23435 fix CI
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-03-06 17:19:05 +01:00
860f0e01f2 Merge remote-tracking branch 'tinyusb/master' into hcd_ip3516
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2026-03-06 15:23:32 +01:00
558abb93af Merge branch 'refs/heads/master' into fork/remiberthoz/device-class-printer 2026-03-06 12:05:54 +07:00
70c93adc2f improve threadx support, add multi ROTS support for board_test and msc_dual_lun 2026-03-05 17:51:57 +07:00
8a6012b009 refactor build scripts to support multiple build targets and improve argument handling 2026-02-12 13:32:00 +07:00
2e8e33f284 add build target argument to improve flexibility of build scripts and workflows
membrowse-upload upload with --identical if elf file does not exist
2026-02-11 16:46:27 +07:00
ff96b90def update get_deps.py to adjust MCU families for samd2x_l2x 2026-02-11 00:27:24 +07:00
39b157d22f add membrowse-upload target and use it in ci after build 2026-02-10 23:51:55 +07:00
e416a81a50 Merge pull request #3437 from hathach/copilot/improve-build-steps-rp2040-esp32
doc update
2026-02-10 12:54:52 +07:00
7b934efa0d Merge branch 'refs/heads/master' into copilot/improve-build-steps-rp2040-esp32 2026-02-10 11:43:32 +07:00
e7c71fefa7 update getting_started.rst and get_deps.py for clarity and improved dependency handling 2026-02-10 11:25:46 +07:00
25de49f8f6 minor update 2026-02-07 18:01:23 +07:00
bd760e5e37 Merge 'upstream/master' into device-class-printer 2026-01-14 19:51:01 +01:00
4ae33547e3 update deps
Signed-off-by: Zixun LI <admin@hifiphile.com>
2026-01-14 09:59:49 +01:00