<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/hw, branch hil-add-ea4088qs</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/hw?h=hil-add-ea4088qs</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/hw?h=hil-add-ea4088qs'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-09-03T21:03:39Z</updated>
<entry>
<title>examples: write the host cdc console over RTT when that is the console</title>
<updated>2026-09-03T21:03:39Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e08148b3e664c5dd5714334b7528e692e38a3f98'/>
<id>urn:sha1:e08148b3e664c5dd5714334b7528e692e38a3f98</id>
<content type='text'>
console_write() forwards what the attached CDC device sent back to the
board's console, and reached for board_uart_write() directly to stay
non-blocking. On a board whose console is the debug probe there is no UART:
board_uart_write() is a stub returning -1, so everything the device echoed was
dropped, and the do/while loop retried a write that could never make progress
and spun until more data arrived.

Send it through SEGGER_RTT_Write() on LOGGER_RTT builds -- already
non-blocking in the default NO_BLOCK_SKIP mode, which is what the UART path
wanted board_uart_write() for.

The retry is also bounded now. board_uart_write() is only documented to
return the number of bytes sent, and the stubs disagree on how they say "no
console here" -- lpc40 returns -1, apm32f0xx returns 0 -- so the loop cannot
decide from the return value alone when to stop. It gives up after 10 ms
without progress instead, which no draining console ever hits, and keeps the
negative return as a fast path so a stub UART does not cost that wait on
every read.

The RTT header include lives in board_api.h so any example can reach it; the
include path only exists when LOGGER=rtt defines LOGGER_RTT.

host/cdc_msc_hid now passes on ea4088_quickstart, whose probe (LPC-Link2) has
no VCOM: the CDC echo round-trips through a CH340 with TX-RX shorted.
</content>
</entry>
<entry>
<title>dual: run host_info_to_device_cdc on ea4088_quickstart</title>
<updated>2026-09-03T21:03:39Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e98fdfc82a2ffd1370c42efffb1b6fcc1819c99b'/>
<id>urn:sha1:e98fdfc82a2ffd1370c42efffb1b6fcc1819c99b</id>
<content type='text'>
The board has both USB ports wired: U1 to the Type-A host connector and U2
to the micro-B device connector, and board_init() already puts the port
select in that mode, so it can run the dual example.

- Allow the example on LPC40XX.
- Point the host stack at rhport 0: ohci maps the TinyUSB rhport onto its
  root-hub port index, and the host controller here is index 0, while the
  dual examples default to rhport 1.
- Move the string-descriptor buffers out of the stack. They are written by
  the host controller, so on parts whose USB master cannot reach the CPU
  stack (this family) the strings came back as garbage. host/device_info
  already keeps its transfer buffer in CFG_TUH_MEM_SECTION; do the same
  here.

Verified on ea4088_quickstart with a WCH-Link on the Type-A port and the
micro-B plugged into a PC:

  mounted device 1
  Device 1: ID 1a86:8010 SN 7FD88F0604B5
    iManufacturer       1     wch.cn
    iProduct            2     WCH-Link
</content>
</entry>
<entry>
<title>lpc40: make USB host work on ea4088_quickstart</title>
<updated>2026-09-03T21:03:39Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4e541a388971bca40fe4a7b1b5a06d0847a2a520'/>
<id>urn:sha1:4e541a388971bca40fe4a7b1b5a06d0847a2a520</id>
<content type='text'>
Two things kept the OHCI host from ever seeing a device on the USB1 Type-A
connector:

- The family passed only CFG_TUSB_MEM_SECTION, but every example's
  tusb_config.h pre-defines CFG_TUD_MEM_SECTION/CFG_TUH_MEM_SECTION as
  empty, so tusb_option.h's fallback never applied and ohci_data landed in
  main SRAM at 0x1000_0000. The USB AHB master cannot reach it: the
  controller latched HcInterruptStatus.UE and never wrote the HCCA. Pass all
  three defines so the DMA structures land in peripheral SRAM.

- VBUS for the host port is switched by an STMPS2171 whose enable is active
  high, but USB_PPWR1 asserts low, so muxing P1.19 to FUNC2 held the switch
  off and the connector never had power. NXP's own lpcusblib HAL muxes the
  same pin the same way, which is why the vendor host example fails here
  too. Keep P1.19 a GPIO and drive it: high when the host stack is enabled,
  low otherwise, so a device-only build does not leave the switch enable
  floating.

host/device_info now enumerates:

  Device 1: ID 1a86:8010 SN 7FD88F0604B5   wch.cn / WCH-Link

device/cdc_msc still passes on HIL. Note the module has no VBUS source of
its own: its +5V rail must be fed (HDK USB, EXT_VIN or TRACE_5V pin 11) or
the switch has no input to pass.
</content>
</entry>
<entry>
<title>Merge pull request #3877 from kilograham/rp2040-pio-usb-fix</title>
<updated>2026-09-03T02:55:54Z</updated>
<author>
<name>Zixun LI</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-03T02:55:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=fe3074ede45c53acd66356b4568115410a0bfc0b'/>
<id>urn:sha1:fe3074ede45c53acd66356b4568115410a0bfc0b</id>
<content type='text'>
rp2040: do not require PICO_DEFAULT_PIO_USB_DP_PIN to be set for pio_usb</content>
</entry>
<entry>
<title>rp2040: do not require PICO_DEFAULT_PIO_USB_DP_PIN to be set for pio_usb</title>
<updated>2026-09-02T18:35:51Z</updated>
<author>
<name>graham sanderson</name>
<email>graham.sanderson@raspberrypi.com</email>
</author>
<published>2026-09-02T18:35:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=5d71979f4ee629f5d811bd2e3f4d975f2a87f61a'/>
<id>urn:sha1:5d71979f4ee629f5d811bd2e3f4d975f2a87f61a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rp2350: PIO-USB runs the pico-sdk stock 150 MHz</title>
<updated>2026-08-28T18:08:40Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:40:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=839c324458f6900a58182d9aa23d846e8ec55c94'/>
<id>urn:sha1:839c324458f6900a58182d9aa23d846e8ec55c94</id>
<content type='text'>
Closes the sys-clock question. rp2350: the dynamic 156 MHz switch is
removed - 150 MHz soak-tested clean (and a runtime switch truncates ETM
capture on the trace carrier). rp2040 keeps its existing 120 MHz: soak
sweeps show 120 = 8/8, stock 125 = 0/3 (bulk-OUT collapses, device NAKs
~600:1 with zero CRC errors on the wire), and 132 = 2/10 flaky despite an
exact 12n/375k divider - no divider criterion predicts rp2040 PIO-USB
health (the RX state machine samples at raw sysclk), so only
soak-validated clocks ship.
</content>
</entry>
<entry>
<title>pico2_etm_trace: RP2350 board on the MIPI-20 ETM trace carrier</title>
<updated>2026-08-28T18:08:31Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:39:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=6e8e2caf7fc2dc5575f5e0c71e69c1b19b3f5699'/>
<id>urn:sha1:6e8e2caf7fc2dc5575f5e0c71e69c1b19b3f5699</id>
<content type='text'>
Board files for the trace carrier (console GP12/13, LED GP10, I2C GP8/9,
PIO-USB host on GP20, all retargeted in board.cmake so the SDK defaults
cannot mux a trace pin), compile-time trace pin-conflict checks, the
measured DBGPAUSE rationale, Ozone project, and skill/docs updates.
Trace validated at the stock 150 MHz (75 MHz TRACECLK, +1 ns sampling):
zero overflow through a 15 s throughput soak; V2 probe ceiling 120 MHz.
</content>
</entry>
<entry>
<title>ci: scope the build matrix and the HIL run to what a PR affects</title>
<updated>2026-08-21T04:07:27Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-21T04:07:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=04d0f71984117b8c72349f4584bd9e26a37b129c'/>
<id>urn:sha1:04d0f71984117b8c72349f4584bd9e26a37b129c</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>samd2x_l2x: build hcd_samd.c for samd21 only, as family.mk already does</title>
<updated>2026-08-21T04:06:26Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-21T04:06:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=565263ef1c8744232561ce297dabbdff3e3d284c'/>
<id>urn:sha1:565263ef1c8744232561ce297dabbdff3e3d284c</id>
<content type='text'>
family.cmake listed src/portable/microchip/samd/hcd_samd.c twice: once
unconditionally, and once inside `if(SAM_FAMILY STREQUAL "samd21")` under the
comment "Add HCD support for SAMD21 (has host capability)". The unconditional copy
defeated the gate, so cmake compiled the host controller driver for saml21 and
saml22 while family.mk compiled it for samd21 alone - and SAML22 has no host
controller at all (hcd_samd.c fails there with `unknown type name
'UsbHostDescriptor'`).

Nothing built the host examples on this family, so the divergence was invisible;
the next commit makes it matter.
</content>
</entry>
<entry>
<title>vendor: remove the obsolete host vendor driver</title>
<updated>2026-08-21T04:06:14Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-21T04:06:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=a57f857f811e054e7a240fc55520648192349c2b'/>
<id>urn:sha1:a57f857f811e054e7a240fc55520648192349c2b</id>
<content type='text'>
vendor_host.c/.h implemented a CFG_TUH_VENDOR class driver that no example, board
or test ever enabled: usbh's driver table entry was compiled out everywhere, and
the six tusb_config.h files that mentioned the macro all set it to 0. Maintainer
call - dead code, not a shrinking of supported classes.

Removes the sources, the usbh driver-table entry, the CFG_TUH_VENDOR default in
tusb_option.h, the tusb.h include, both build-system source lists, the rp2040
family.cmake entry and the IAR project template rows.
</content>
</entry>
</feed>
