Files
tinyusb/test/hil/tinyusb.json
hathach 9b3259e60f hil: controller-aware scheduling of flash and usbtest concurrency
Full-fleet profiling (HIL_PROFILE=1 instrumentation, included) showed each
uPD720201 controller's serialized usbtest battery chain dominates wall time,
and a board whose marginal device port bounces during concurrent batteries
can wedge or kill the controller ("xHCI host not responding to stop endpoint
command"). Every such death traced to mimxrt1015's port (its old "kills the
uPD720201" reputation) - it is removed from the config until recabled;
mimxrt1064's enum-retry stalls were a loose device cable (re-seated).
nrf54lm20dk moves to boards-skip until its failing J-Link probe is replugged.
With the hardware fixed both cards run width-4 batteries plus full flash
churn clean, so scheduling stays simple: two symmetric knobs, flashes and
batteries budgeted per controller.

- schedule_boards(): dispatch boards round-robin across host controllers from
  a persisted hint cache (~/.cache/tinyusb-hil/ctrl_cache.json), learned and
  merge-on-write refreshed each run (concurrent HIL jobs keep each other's
  entries). Only the cached PCI address is consumed - dispatch order and
  first-flash budgeting, never battery serialization (batteries resolve live
  or fail closed to an all-slot permit).
- HIL_FLASH_PARALLEL (8) and HIL_USBTEST_PARALLEL (4) are budgeted per
  controller via lock slots assigned on first sight.
- re-runs: a failed run writes <report dir>/<config>.failed with the exact
  re-run spec (--accumulate -b <failed board> -bt <board>:<its failed
  tests>) instead of the inverted --skip-board list of everything that
  passed; --skip-board is gone, --flasher/--exclude-flasher scope a config
  across CI jobs by flasher type (no board names hardcoded in workflows),
  and -a/--accumulate merges a re-run into the existing report. The spec is
  stamped with GITHUB_RUN_ID and cleared on fresh runs, so a retry can never
  consume a spec left behind by a different run's dead or skipped attempt.
- CI: esp-idf firmware builds move out of hil-build into hil-build-esp, and
  the esptool-flashed boards run in their own hil-tinyusb-esp job, so the
  main hil-tinyusb run starts as soon as the fast toolchains finish instead
  of waiting on the slow esp-idf build (an esp toolchain flake previously
  skipped the whole rig run). Artifacts are namespaced per toolchain so the
  esp job downloads only esp-idf binaries.
- HIL_PROFILE=1: timestamped log lines, per-flash durations, permit-wait
  logging, uid->controller map dump for analysis.
- hil_report: per-variant test duration as a dedicated trailing column,
  recorded only by full runs.

Validated on the ci rig (fixed seeds 20260716/777, full fleet at 8/4):
738s/780s walls with only known-flake failures and no controller deaths,
vs 1134-1211s serialized-battery baseline.
2026-07-17 11:54:14 +07:00

606 lines
20 KiB
JSON

{
"boards": [
{
"name": "ek_tm4c123gxl",
"uid": "010105186C60A110",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "lm4flash",
"uid": "0E205D19",
"args": "-v"
}
},
{
"name": "espressif_p4_function_ev",
"uid": "6055F9F98715",
"variant": [
{ "name": "espressif_p4_function_ev", "flags": "" },
{ "name": "espressif_p4_function_ev-DMA", "flags": "-DCFG_TUD_DWC2_DMA_ENABLE=1 -DCFG_TUH_DWC2_DMA_ENABLE=1" }
],
"tests": {
"only": [
"device/cdc_msc_freertos",
"device/hid_composite_freertos",
"device/audio_test_freertos",
"device/usbtest",
"host/device_info",
"host/msc_file_explorer_freertos"
],
"dev_attached": [
{
"vid_pid": "1a86_55d4",
"serial": "52D2002427",
"is_cdc": true
},
{
"vid_pid": "21c4_0cc7",
"serial": "900058944CB80A53",
"is_msc": true,
"block_size": 512,
"block_count": 60620800,
"msc_inquiry": "Lexar USB Flash Drive PMAP"
}
]
},
"flasher": {
"name": "esptool",
"uid": "4ea4f48f6bc3ee11bbb9d00f9e1b1c54",
"args": "-b 1500000",
"comment": "use --force for ESP32-P4 v0.1"
},
"comment": "Use TS3USB30 mux to test both device and host"
},
{
"name": "espressif_s3_devkitm",
"uid": "84F703C084E4",
"variant": [
{ "name": "espressif_s3_devkitm", "flags": "" },
{ "name": "espressif_s3_devkitm-DMA", "flags": "-DCFG_TUD_DWC2_DMA_ENABLE=1 -DCFG_TUH_DWC2_DMA_ENABLE=1" }
],
"tests": {
"only": [
"device/cdc_msc_freertos",
"device/hid_composite_freertos",
"device/audio_test_freertos",
"device/usbtest",
"host/device_info",
"host/msc_file_explorer_freertos"
],
"dev_attached": [
{
"vid_pid": "1a86_55d4",
"serial": "52D2005402",
"is_cdc": true
},
{
"vid_pid": "048d_04d2",
"serial": "\u0409",
"is_msc": true,
"block_size": 512,
"block_count": 30720000,
"msc_inquiry": "General UDisk 5.00",
"comment": "General UDisk reports iSerialNumber=U+0409"
}
]
},
"flasher": {
"name": "esptool",
"uid": "3ea619acd1cdeb11a0a0b806e93fd3f1",
"args": "-b 1500000"
},
"comment": "Use TS3USB30 mux to test both device and host"
},
{
"name": "feather_nrf52840_express",
"uid": "1F0479CD0F764471",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "681295394",
"args": "-device nrf52840_xxaa"
}
},
{
"name": "max32666fthr",
"uid": "0C81464124010B20FF0A08CC2C",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd_adi",
"uid": "E6614C311B597D32",
"args": "-f interface/cmsis-dap.cfg -f target/max32665.cfg"
}
},
{
"name": "metro_m4_express",
"uid": "9995AD485337433231202020FF100A34",
"build": {
"args": [
"MAX3421_HOST=1"
]
},
"tests": {
"device": true,
"host": false,
"dual": true,
"skip": ["device/audio_test_freertos"],
"dev_attached": [
{
"vid_pid": "067b_2303",
"serial": "0",
"is_cdc": true
}
],
"comment": "pl23x; audio_test_freertos skipped: samd51 iso-IN capture fails (arecord EIO)"
},
"flasher": {
"name": "jlink",
"uid": "123456",
"args": "-device ATSAMD51J19"
}
},
{
"name": "lpcxpresso11u37",
"uid": "17121919",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "000724441579",
"args": "-device LPC11U37/401"
}
},
{
"name": "ra4m1_ek",
"uid": "152E163038303131393346E46F26574B",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "000831174392",
"args": "-device R7FA4M1AB"
}
},
{
"name": "raspberry_pi_pico",
"uid": "E6614C311B764A37",
"variant": [
{ "name": "raspberry_pi_pico", "flags": "-DCFG_TUH_RPI_PIO_USB=1" }
],
"tests": {
"device": true,
"host": true,
"dual": true,
"dev_attached": [
{
"vid_pid": "1a86_7523",
"serial": "0",
"is_cdc": true,
"comment": "ch34x"
},
{
"vid_pid": "048d_04d2",
"serial": "\u0409",
"is_msc": true,
"block_size": 512,
"block_count": 30720000,
"msc_inquiry": "General UDisk 5.00",
"comment": "General UDisk reports iSerialNumber=U+0409"
}
]
},
"flasher": {
"name": "openocd",
"uid": "E6614103E72C1D2F",
"args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\""
}
},
{
"name": "raspberry_pi_pico_w",
"uid": "E6614864D35DAE36",
"tests": {
"device": false,
"host": true,
"dual": false,
"dev_attached": [
{
"vid_pid": "1a86_55d4",
"serial": "52D2002694",
"is_cdc": true
},
{
"vid_pid": "2008_2018",
"serial": "O20070925A002746",
"is_msc": true,
"block_size": 512,
"block_count": 4124152,
"msc_inquiry": "USB2.0 Flash Disk 2.10"
}
]
},
"flasher": {
"name": "openocd",
"uid": "E6633861A3819D38",
"args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\""
},
"comment": "Test native host"
},
{
"name": "raspberry_pi_pico2",
"uid": "560AE75E1C7152C9",
"tests": {
"device": false,
"host": true,
"dual": false,
"dev_attached": [
{
"vid_pid": "0951_1603",
"serial": "820000000000000045B46338",
"is_msc": true,
"block_size": 512,
"block_count": 3987456,
"msc_inquiry": "Kingston DataTraveler 2.0 1.00"
}
]
},
"flasher": {
"name": "openocd",
"uid": "E6633861A3978538",
"args": "-f interface/cmsis-dap.cfg -f target/rp2350.cfg -c \"adapter speed 5000\""
}
},
{
"name": "adafruit_fruit_jam",
"uid": "2B0DC7A45781189E",
"tests": {
"device": true,
"host": true,
"dual": true,
"dev_attached": [
{
"vid_pid": "0403_6001",
"serial": "0",
"is_cdc": true
},
{
"vid_pid": "058f_6387",
"serial": "A8BEE062633D",
"is_msc": true,
"block_size": 512,
"block_count": 7639040,
"msc_inquiry": "Generic Flash Disk 8.07"
}
]
},
"flasher": {
"name": "openocd",
"uid": "E663AC91D3359B38",
"args": "-f interface/cmsis-dap.cfg -f target/rp2350.cfg -c \"adapter speed 5000\""
}
},
{
"name": "stm32f072disco",
"uid": "3A001A001357364230353532",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "779541626",
"args": "-device stm32f072rb"
},
"comment": "2x16 access scheme with 1KB USB SRAM"
},
{
"name": "stm32f407disco",
"uid": "30001A000647313332353735",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "000773661813",
"args": "-device stm32f407vg"
}
},
{
"name": "stm32f723disco",
"uid": "460029001951373031313335",
"variant": [
{ "name": "stm32f723disco", "flags": "" },
{ "name": "stm32f723disco-DMA", "flags": "-DCFG_TUH_DWC2_DMA_ENABLE=1" }
],
"tests": {
"device": true,
"host": true,
"dual": false,
"dev_attached": [
{
"vid_pid": "10c4_ea60",
"serial": "0001",
"is_cdc": true,
"comment": "cp2102"
},
{
"vid_pid": "21c4_0cc7",
"serial": "900058874D871F66",
"is_msc": true,
"block_size": 512,
"block_count": 60620800,
"msc_inquiry": "Lexar USB Flash Drive PMAP"
}
]
},
"flasher": {
"name": "jlink",
"uid": "000776606156",
"args": "-device stm32f723ie"
},
"comment": "Device port0 FS (slave only), Host port1 HS with DMA"
},
{
"name": "stm32h743nucleo",
"uid": "110018000951383432343236",
"variant": [
{ "name": "stm32h743nucleo", "flags": "" },
{ "name": "stm32h743nucleo-DMA", "flags": "-DCFG_TUD_DWC2_DMA_ENABLE=1 -DCFG_TUH_DWC2_DMA_ENABLE=1" }
],
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd",
"uid": "004C00343137510F39383538",
"args": "-f interface/stlink.cfg -f target/stm32h7x.cfg"
}
},
{
"name": "stm32g0b1nucleo",
"uid": "4D0038000450434E37343120",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd",
"uid": "066FFF495087534867063844",
"args": "-f interface/stlink.cfg -f target/stm32g0x.cfg"
},
"comment": "32-bit scheme, 2KB USB SRAM"
},
{
"name": "stm32l476disco",
"uid": "3C0050001150334258343920",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "777632258",
"args": "-device STM32L476VG"
}
},
{
"name": "stm32u083nucleo",
"uid": "300044000D5036394E373620",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "stlink",
"uid": "0668FF575457657187061314"
}
},
{
"name": "nanoch32v203",
"uid": "CDAB277B0FBC03E339E339E3",
"toolchain": "riscv-gcc",
"variant": [
{"name": "nanoch32v203-fsdev", "defines": ["RHPORT_DEVICE=0"]},
{"name": "nanoch32v203-usbfs", "defines": ["RHPORT_DEVICE=1"]}
],
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd_wch",
"uid": "EBCA8F0670AF",
"args": ""
}
},
{
"name": "ch32v103r_r1_1v0",
"uid": "CDAB3E8749BC54EF0F410025",
"toolchain": "riscv-gcc",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd_wch",
"uid": "BC4954081051",
"args": ""
}
},
{
"name": "ch32v307v_r1_1v0",
"uid": "DE6B3E263B3857CAFFFFFFFF",
"toolchain": "riscv-gcc",
"variant": [
{"name": "ch32v307v_r1_1v0-usbhs", "defines": ["SPEED=high"]},
{"name": "ch32v307v_r1_1v0-usbfs", "defines": ["SPEED=full"]}
],
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd_wch",
"uid": "BC5DA47360D0",
"args": ""
}
},
{
"name": "ch582m_evt",
"uid": "D443627B5450",
"toolchain": "riscv-gcc",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "openocd_wch",
"uid": "7FD88F0604B5",
"args": ""
}
},
{
"name": "nrf5340dk",
"uid": "78E60E166B5F88BE",
"tests": {
"device": true,
"host": false,
"dual": false,
"skip": ["device/cdc_msc_freertos", "device/audio_test_freertos"],
"comment": "board new to HIL: FreeRTOS examples hardfault (UFSR=INVPC) at first task launch on the CM33_NTZ port - pre-existing upstream issue, non-FreeRTOS examples and usbtest pass; fix separately"
},
"flasher": {
"name": "jlink",
"uid": "001050076405",
"args": "-device NRF5340_XXAA_APP"
}
}
],
"boards-skip": [
{
"name": "mimxrt1064_evk",
"uid": "BAE96FB95AFA6DBB8F00005002001200",
"comment-skip": "device-port cable degraded from enum drops to killing the uPD720201 mid-battery (2026-07-17); replace the cable, verify enum, then move back",
"tests": {
"device": true,
"host": true,
"dual": true,
"dev_attached": [
{
"vid_pid": "1a86_55d4",
"serial": "52D2003414",
"is_cdc": true
},
{
"vid_pid": "21c4_0cc7",
"serial": "90005893730A1A63",
"is_msc": true,
"block_size": 512,
"block_count": 60620800,
"msc_inquiry": "Lexar USB Flash Drive PMAP"
}
]
},
"flasher": {
"name": "jlink",
"uid": "000725299165",
"args": "-device MIMXRT1064xxx6A"
}
},
{
"name": "nrf54lm20dk",
"uid": "899C3DE5B0F4D5CA",
"comment-skip": "J-Link probe fails most flashes (2026-07-16); replug/repair the probe, then move back",
"tests": {
"device": true,
"host": false,
"dual": false,
"skip": ["device/audio_test_freertos"],
"comment": "board new to HIL: audio_test_freertos never reaches dcd_init (FreeRTOS itself runs; cdc_msc_freertos and usbtest pass) - example-level issue on nRF54L, fix separately"
},
"flasher": {
"name": "jlink",
"uid": "1051856258",
"args": "-device NRF54LM20A_M33"
}
},
{
"name": "ra6m5_ek",
"uid": "8419032D32363657364EF4622D294B4E",
"tests": {
"device": true,
"host": false,
"dual": false,
"skip": ["device/cdc_msc_throughput", "device/msc_dual_lun"],
"comment": "MSC writes wedge the uPD720201 host (URBs queued, zero wire activity, bus-15 ctrl xfers time out until the device's URBs are killed); reproduced identically with master firmware - device side armed+BUF and exonerated. MSC reads and usbtest bulk (15.8 MB/s) are fine"
},
"flasher": {
"name": "jlink",
"uid": "000831915224",
"args": "-device R7FA6M5BH"
}
},
{
"name": "ra8m1_ek",
"uid": "797D142D36345030364E1737922E4B4E",
"comment": "USBHS bring-up pending (HS chirp completes digitally but terminations never switch; FS-forced build passed usbtest 30/30). Parked until fixed",
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "001083115236",
"args": "-device R7FA8M1AH"
}
},
{
"name": "stm32f769disco",
"uid": "21002F000F51363531383437",
"variant": [
{ "name": "stm32f769disco", "flags": "" },
{ "name": "stm32f769disco-DMA", "flags": "-DCFG_TUD_DWC2_DMA_ENABLE=1 -DCFG_TUH_DWC2_DMA_ENABLE=1" }
],
"tests": {
"device": true,
"host": false,
"dual": false
},
"flasher": {
"name": "jlink",
"uid": "000778170924",
"args": "-device stm32f769ni"
}
}
]
}