Commit Graph

394 Commits

Author SHA1 Message Date
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
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
9465ce985b apply copilot suggestion 2026-01-09 11:01:58 +07:00
cab1b2f6f7 Implement Printer Device Class 2026-01-04 16:55:43 +01:00
239e20ba73 support for the AT32F45X series 2025-12-30 10:44:03 +08:00
abf27bfa37 Merge remote-tracking branch 'tinyusb/master' into support-nxp-rw612
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-12-16 20:47:37 +01:00
22534a6019 Merge remote-tracking branch 'tinyusb/master' into support-nxp-rw612
Signed-off-by: Zixun LI <admin@hifiphile.com>
2025-12-16 11:51:42 +01:00
15e3324579 cleanup, add preset
Signed-off-by: Zixun LI <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-12-16 13:23:19 +08:00
ba3319d90d support hpmicro chips
Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
2025-12-16 13:08:30 +08:00
9a22543bd2 Merge pull request #3364 from hathach/hcd_fsdev
hcd: add stm32_fsdev driver
2025-12-15 16:01:15 +07:00
b43b99a571 bsp: nxp: add support for RW612 (FRDM-RW612)
- Added `rw61x` family support.
- Added `frdm_rw612` board support.
- Update `get_deps.py` to include mcux-sdk for RW61x.
- Add ci_hs_rw61x include to ChipIdea HS driver and enable host examples.
2025-12-14 01:30:12 +01:00
143987702e bsp/mcx to new sdk repo
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-12-13 21:08:42 +01:00
6e01c06149 bsp: migrate lpc51, lpc55 to new sdk repo
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-12-13 21:08:42 +01:00
20b03bbc08 upload metrics.json and metrics compare to release page (#3409)
* upload metrics.json and metrics compare to release page
* Adjust workflow comment handling for forks
2025-12-13 15:13:02 +07:00
80886fb32a Merge branch 'refs/heads/master' into hcd_fsdev 2025-12-13 14:56:15 +07:00
919ee4b152 update metrics to support bloaty csv 2025-12-10 11:33:31 +07:00
16c92b50b0 update metrics to support bloaty 2025-12-09 19:00:14 +07:00