summaryrefslogtreecommitdiff
path: root/tools/get_deps.py
AgeCommit message (Collapse)Author
12 daysci: scope the build matrix and the HIL run to what a PR affectshathach
Every PR built all 74 legs (2494 example builds on GHA cmake alone) and flashed all 30 rig boards, whatever it touched. One classifier now walks the PR diff twice and answers three questions: which families to build, which examples per family, and which boards run which tests. Fail-open throughout - anything no rule classifies, any exception, any unusable output falls back to the full matrix, and a master push always builds everything. test/hil/helper/hil_select.py moves to tools/ci_select.py: it is no longer HIL-only, and tools/ is where the build side can import it. test_hil_select.py follows it as test_ci_select.py. Rules (docs/superpowers/specs/2026-08-19-ci-build-family-filter-design.md holds the full table): a port selects the families whose family.cmake references it, and its role - a dcd change skips host examples and vice versa; a class selects only the examples whose tusb_config.h enables its CFG_TU[DH]_ macro, following cross-class includes; an example selects itself; hw/bsp selects its family or board; hw/mcu and lib select whoever references them. CMake is the reference for all of it - make follows whatever cmake decides, family.mk is never scanned. Empty means empty (maintainer ruling): a rule that classifies a path to nothing selects nothing. Ports no family references, classes no config enables, libs no example builds and hw/mcu paths that resolve nowhere are all real - nothing compiles them, so nothing can validate them, and the master-push build is the net. Structural tests pin each such case with an explicit allowlist, so the day one stops being empty it fails pre-commit instead of silently narrowing CI. Per-example builds: build.py grows a repeatable -e, resolved against the targets CMake actually registered and batched into one `cmake --build --target a b c`. build_utils mirrors CMake's family_filter (the whole FAMILY_MCUS list, ${...} and string(TOUPPER ...) resolved) for the cmake side, while the make side keeps master's algorithm verbatim - the two build systems answer differently and a shared answer breaks lpc54's make link. hil-build gains this even on a full selection: 1702 example builds become 515. Transport: the selection travels as a file, never an argv or env var - a mass-sweep diff selects 261 KB against a 128 KiB exec limit, and E2BIG would fail the step before its own fallback could run. CircleCI carries the example map inside the generated config (pipeline parameters cap at 512 chars), swapped into the parameter defaults by sentinel match, and drops the scoping wholesale if that rewrite fails. Every PR-derived value written to $GITHUB_ENV/$GITHUB_OUTPUT is character-screened. Code metrics follow the scoping: metrics.py emits per-example totals, and metrics_pair_compare compares the (board, example) pairs present on both sides instead of a scoped run against a full-matrix average. The selector's own suite gates it in both providers: a selector that exits 0 with valid-but-wrong JSON is the one failure fail-open cannot catch, so a red suite means the full matrix.
12 daysget_deps: correct two family tokens that matched nothinghathach
get_deps matches a family token against a requested family name verbatim (`f in deps_optional[d][2].split()`), so a token naming no hw/bsp directory makes its entry unreachable: hw/mcu/allwinner said 'fc100s'; the family is hw/bsp/f1c100s, and f1c100s/family.cmake sets SDK_DIR to ${TOP}/hw/mcu/allwinner/f1c100s hw/mcu/sony/cxd56/spresense-exported-sdk said 'spresense' (the SDK's name); the family is hw/bsp/cxd56, whose family.cmake points SDK_DIR at it `python3 tools/get_deps.py f1c100s` and `... cxd56` now fetch the SDK each of those families builds against; before, both printed "no additional dependencies found". docs/reference/dependencies.rst is generated from deps_all by tools/gen_doc.py, so it is updated to match - column widths are unchanged (the widest cell is lib/CMSIS_5's, untouched) and every row was cross-checked against deps_all.
2026-07-25Enable APM32F0 dependency fetching and CIJie Feng
2026-07-19add py32f0 supportJie Feng
2026-06-27bsp/stm32h5: fix uart definitionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-06-22hw/bsp+wch: rename the CH58x family to ch583 and OPT_MCU_CH58X to OPT_MCU_CH583hathach
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) <[email protected]>
2026-06-20hw/mcu/wch: rename ch58x SDK dir to ch583 to match the openwch repohathach
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) <[email protected]>
2026-06-18Merge remote-tracking branch 'origin/master' into add-ch58x-usbfshathach
2026-06-11Merge remote-tracking branch 'origin/master' into stm32c5hathach
# Conflicts: # README.rst
2026-06-11HIL: replace build.flags_on with named build variants (#3687)Ha Thach
* 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-05-10add stm32c5 supportHiFiPHile
Signed-off-by: HiFiPHile <[email protected]>
2026-04-14get freertos working with rp2040hathach
2026-04-02update FatFS to R0.16 via abbrev/fatfs dependencyhathach
- 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-03-18ch58x: fix MCU macro naming and add get_deps/boards entriesalt-0191
2026-03-14update rx65n_target: correct pin configuration and remove unused USB ↵hathach
interrupt definitions
2026-03-13actual build make/cmake for ft9xxhathach
2026-03-13rename and migrate kinetis_k32l to new mcux-deviceshathach
2026-03-11migrate imxrt to use new mcux-devices-rthathach
2026-03-06fix CIHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-03-06Merge remote-tracking branch 'tinyusb/master' into hcd_ip3516HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-03-05improve threadx support, add multi ROTS support for board_test and msc_dual_lunhathach
2026-02-11update get_deps.py to adjust MCU families for samd2x_l2xhathach
2026-02-10Merge branch 'refs/heads/master' into copilot/improve-build-steps-rp2040-esp32hathach
2026-02-10update getting_started.rst and get_deps.py for clarity and improved ↵hathach
dependency handling
2026-01-14update depsZixun LI
Signed-off-by: Zixun LI <[email protected]>
2025-12-30support for the AT32F45X serieszhiqiang-ch
2025-12-16Merge remote-tracking branch 'tinyusb/master' into support-nxp-rw612HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-12-16Merge remote-tracking branch 'tinyusb/master' into support-nxp-rw612Zixun LI
Signed-off-by: Zixun LI <[email protected]>
2025-12-16cleanup, add presetZixun LI
Signed-off-by: Zixun LI <[email protected]> Signed-off-by: HiFiPhile <[email protected]>
2025-12-16support hpmicro chipsZhihong Chen
Signed-off-by: Zhihong Chen <[email protected]>
2025-12-14bsp: nxp: add support for RW612 (FRDM-RW612)gab-k
- 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-13bsp/mcx to new sdk repoHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-12-13bsp: migrate lpc51, lpc55 to new sdk repoHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-12-13Merge branch 'refs/heads/master' into hcd_fsdevhathach
2025-12-10update metrics to support bloaty csvhathach
2025-12-09update metrics to support bloatyhathach
2025-12-06fix metrics.py compare with verbose json. add print compare summaryhathach
2025-12-03upload metrics.json and aggregate code metrics, post metrics commenthathach
fine tune ci matrix run
2025-12-03upload metrics.json and aggregate code metrics, fine tune ci matrix runhathach
2025-12-03upload metrics.json, test cihathach
2025-12-02adding metrics for computing average compiled sizehathach
2025-12-02Merge remote-tracking branch 'tinyusb/master' into hcd_fsdevZixun LI
2025-12-02adding metrics for computing average compiled sizehathach
2025-12-01run linkermap as post build for size analyzehathach
2025-12-01add linkermap to deps and linkermap tagethathach
2025-11-29change armgcc setup to manual download due to issue with action (#3377)Ha Thach
* change armgcc setup to manual download due to issue with action * build windows, macos with cmake as well
2025-11-27fix buildHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-10-15fix more warningshathach
2025-10-14fix lots of warnings for missing-prototypes for irqhandlerhathach
2025-10-13get cmake build with 54h20 not tested on actual hw, probably not runninghathach