<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/tools/build.py, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/tools/build.py?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/tools/build.py?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-14T19:31:14Z</updated>
<entry>
<title>dwc2: fix EP0 OUT dcache invalidate range; run usbtest on espressif s3/p4 and mimxrt1015</title>
<updated>2026-07-14T19:31:14Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-14T19:31:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=59f02a1c4c18d7e43a1bd6aaad4b50e71931c9ff'/>
<id>urn:sha1:59f02a1c4c18d7e43a1bd6aaad4b50e71931c9ff</id>
<content type='text'>
edpt_schedule_packets() advanced xfer-&gt;buffer past each armed EP0
chunk, so the OUT-complete handler invalidated the cache at the
ADVANCED pointer: one line past the received data. The CPU then read
stale cached bytes instead of the DMA'd packet, and the misplaced
invalidate discarded a dirty line of whatever variable follows the
buffer - random neighbor corruption on every control-OUT data stage.
Found by usbtest ctrl_out (cases 14/21) on espressif_p4_function_ev
with DMA enabled, the first DWC2 target combining buffer DMA with a
data cache: usbd control state wedged after the first control write
(every later request stalled), and one build layout panicked in the
usbd memcpy with a wild pointer.

Rework the EP0 chunk bookkeeping so xfer-&gt;buffer always points at the
un-consumed position: the arm no longer advances it; instead the EP0
re-arm paths advance past each completed (full) chunk, invalidating it
first on the OUT side. The final OUT completion invalidates exactly
the received bytes of its last chunk, taken from DOEPDMA ("incremented
on every AHB transaction", databook 7.1.83 - the same semantics the
SETUP path relies on) before dma_setup_prepare() re-targets it. EP0
chunking state (ep0_pending) is now also dropped on bus reset and on
a new SETUP, so a stale latched completion can no longer re-arm EP0
DMA from dead state. No behavior change for targets without dcache.

While root-causing, the FIFO layout was cross-checked against the
DWC2 databook/programming guide v4.20a: the existing GDFIFOCFG
programming (EPInfoBaseAddr = otg_dfifo_depth - 2*ep_count, one SPRAM
word per endpoint direction for buffer DMA) is conformant and needs
no change; the P4 HS instance's reset GDFIFOCFG (0x03800400) merely
reflects a scatter/gather-sized EP_LOC_CNT of 128 that buffer DMA
does not need.

With the fix in place, enable the usbtest battery on the espressif
fleet: tools/build.py allowlists device/usbtest (a plain IDF component
like board_test/video_capture) and both espressif boards' only-lists
gain device/usbtest. Also re-enable device/usbtest on mimxrt1015_evk:
its skip predated the dcd_ci_hs stale-ACTIVE-overlay fix (already on
this branch), which cured the battery that previously killed the
uPD720201 host controller twice (2026-07-11 ROM fw, 2026-07-13 case 27
on fw 2.0.2.6); rig-validated 30/30 three consecutive runs.

Validated on rig (all 30/30): espressif_p4_function_ev(-DMA) (was
22/30 under DMA), espressif_s3_devkitm(-DMA), stm32f723disco(-DMA),
mimxrt1015_evk; p4/s3 slave-mode unaffected (DMA-only code path);
compile-checked stm32h743nucleo +TUD DMA, stm32f407disco,
stm32l476disco (device ports currently on the dead hub).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_017TQZrFfU3K4Y198aLsUpBC
</content>
</entry>
<entry>
<title>build.py: keep only raspberry_pi_pico in rp2040 ci_preferred_boards</title>
<updated>2026-06-30T06:37:29Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-30T06:37:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4ae991fd886ecbe53b72d99c241a7ed1c4ee30b1'/>
<id>urn:sha1:4ae991fd886ecbe53b72d99c241a7ed1c4ee30b1</id>
<content type='text'>
The one-board selector uses preferred_list[0] anyway, so pico is the board built.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>build.py: prefer pico/pico2 for rp2040 CI; skill: drop one-time 0.20.0 backfill note</title>
<updated>2026-06-30T06:35:35Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-30T06:35:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=36667740cbd8c7db17304be0a1eea201590d25e0'/>
<id>urn:sha1:36667740cbd8c7db17304be0a1eea201590d25e0</id>
<content type='text'>
- ci_preferred_boards: rp2040 -&gt; 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) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>HIL: replace build.flags_on with named build variants (#3687)</title>
<updated>2026-06-11T01:16:43Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-11T01:16:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=6f35e76667f4015ef429ace5730e20cc0037e042'/>
<id>urn:sha1:6f35e76667f4015ef429ace5730e20cc0037e042</id>
<content type='text'>
* 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-&lt;name&gt;) and
the HIL report row; `flags` is the raw CFLAGS string (-D...=1) injected via
CFLAGS_CLI. No `variant` =&gt; a single build named after the board.

- build.py: --build-name &lt;name&gt; (dir) + --cflag=&lt;token&gt; (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-&lt;board&gt;* 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</content>
</entry>
<entry>
<title>refactor build scripts to support multiple build targets and improve argument handling</title>
<updated>2026-02-12T06:32:00Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-02-12T06:32:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=8a6012b0096cb71bb4cfaaa36813de4ac5003c18'/>
<id>urn:sha1:8a6012b0096cb71bb4cfaaa36813de4ac5003c18</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add build target argument to improve flexibility of build scripts and workflows</title>
<updated>2026-02-11T09:46:27Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-02-11T09:34:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=2e8e33f28494307276d7a5417569461fe6584b80'/>
<id>urn:sha1:2e8e33f28494307276d7a5417569461fe6584b80</id>
<content type='text'>
membrowse-upload upload with --identical if elf file does not exist
</content>
</entry>
<entry>
<title>add membrowse-upload target and use it in ci after build</title>
<updated>2026-02-10T16:51:55Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-02-10T16:45:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=39b157d22f8a82264f07cdd31396c15b7a9c9e6d'/>
<id>urn:sha1:39b157d22f8a82264f07cdd31396c15b7a9c9e6d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>apply copilot suggestion</title>
<updated>2026-01-09T04:01:58Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-01-09T04:01:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9465ce985bcf5732795d2aea5df4fd6315896cf9'/>
<id>urn:sha1:9465ce985bcf5732795d2aea5df4fd6315896cf9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Run CI build with fixed set of boards (#3389)</title>
<updated>2025-12-05T03:21:28Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2025-12-05T03:21:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=93b53158f02bce9497419298ac27150eebe567d3'/>
<id>urn:sha1:93b53158f02bce9497419298ac27150eebe567d3</id>
<content type='text'>
* run cmake ci build on github with a fixed set of board to keep the size stable
* Size Difference Report contain major &gt;1% and minor &lt;1&amp; table</content>
</entry>
<entry>
<title>fine tune ci to build more with circleci (#3386)</title>
<updated>2025-12-04T14:34:10Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2025-12-04T14:34:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e7105b1fa3ccd8200fe7fb8b0759d00afc9b07c1'/>
<id>urn:sha1:e7105b1fa3ccd8200fe7fb8b0759d00afc9b07c1</id>
<content type='text'>
* fine tune ci to build more with circleci
* skip make for arm-iar, esp-idf
* skip make + clang for circleci since llvm-objcopy got killed due to memory issue.
</content>
</entry>
</feed>
