Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
574 commits
Select commit Hold shift + click to select a range
0c197a2
try to skip passed board in hil test when re-run
hathach Jul 8, 2025
a0cb8aa
Remember scroll position.
raldone01 Jul 8, 2025
a9c51a7
Use localstorage clear.
raldone01 Jul 8, 2025
091c6a7
only clean/checkout/download artifacts on first attempt
hathach Jul 8, 2025
42de71f
Merge pull request #3166 from hathach/hil-skip-passed-board-in-rerun
hathach Jul 9, 2025
59b5589
fix HID parser variable size handling
hathach Jul 9, 2025
5eb68a3
Add spec reference for 4-byte HID item size
hathach Jul 9, 2025
bb07a82
Merge pull request #3150 from HiFiPhile/xfer_isr
hathach Jul 9, 2025
04fb587
Merge pull request #3165 from hathach/codex/find-and-fix-a-codebase-bug
hathach Jul 9, 2025
386f551
Merge branch 'refs/heads/master' into fork/ChrisDeadman/hcd-samd-support
hathach Jul 9, 2025
e598972
add board_vbus_set() for samd21/d51 to enable usb host vbus
hathach Jul 9, 2025
227b22d
Merge pull request #2573 from ChrisDeadman/hcd-samd-support
hathach Jul 9, 2025
b5694fd
add option to pass symbol defines to ci build.py
hathach Jul 9, 2025
f918c4a
Merge pull request #3167 from hathach/add-define-build-script
hathach Jul 9, 2025
9f626fe
Fix F4 BSP without UART_DEV.
HiFiPhile Nov 10, 2024
1d2735f
FIx recurrent suspend ISR.
HiFiPhile Nov 10, 2024
546e841
Merge pull request #2873 from HiFiPhile/susp_isr
hathach Jul 10, 2025
77be5f9
Merge branch 'master' into fork/roma-jam/feature/add_tusb_teardown
hathach Jul 10, 2025
f14fcaa
rename to tusb_deinit() to match other namingg
hathach Jul 10, 2025
40dc1dd
Merge pull request #2987 from hathach/fix-2923-alt
hathach Jul 10, 2025
e9a78c5
add tud_msc_inquiry2_cb() for full inquiry response
hathach Jul 11, 2025
5ce3e3b
Merge pull request #3168 from hathach/feature/add_tusb_teardown
hathach Jul 11, 2025
29c2af7
Merge pull request #3172 from hathach/msc-inquiry2-cb
hathach Jul 11, 2025
f074815
Merge branch 'master' into feature/usbtmc_vendor-specific
HiFiPhile Jul 11, 2025
4cb4fb2
Mitigate potential xss.
raldone01 Jul 11, 2025
4832762
typo fix
HiFiPhile Jul 11, 2025
a365cf6
fix last transfer size
HiFiPhile Jul 11, 2025
1862685
Fix compilation when CH34X support is disabled
elipsitz Jul 16, 2025
8a78804
Merge pull request #3175 from elipsitz/master
hathach Jul 16, 2025
299ca25
Report CH32V305 as working
rhgndf Jul 18, 2025
93f1f5b
fix typo
HiFiPhile Jul 20, 2025
2e0ea80
Merge pull request #3179 from rhgndf/add_ch32v305
HiFiPhile Jul 22, 2025
673a916
Fix #3159: Handle MIDI interface descriptor after audio streaming int…
rppicomidi Jul 5, 2025
0d080ca
Delete debugging printf
rppicomidi Jul 22, 2025
9030fe4
Restore accidentally erased debug log message
rppicomidi Jul 23, 2025
e1509ba
Merge pull request #3182 from HiFiPhile/h7_fix
hathach Jul 24, 2025
aacd73b
Add nanoch32v305
rhgndf Jul 24, 2025
30d6789
Improve web usb and web serial robustness.
raldone01 Jul 24, 2025
c1d3fc8
dhcp: Fix DHCP_OFFER/DHCP_ACK destinaton.
s09289728096 Jul 25, 2025
bf18444
Fix compile error.
s09289728096 Jul 25, 2025
f36f97c
More catches.
raldone01 Jul 26, 2025
be11454
Update src/class/usbtmc/usbtmc_device.c
hathach Jul 26, 2025
a72f039
Merge pull request #3173 from HiFiPhile/feature/usbtmc_vendor-specific
hathach Jul 26, 2025
231d412
Fix gpio clock
rhgndf Jul 27, 2025
9005f12
Fix CI
rhgndf Jul 27, 2025
6fd9457
Fix goto indentation
s09289728096 Jul 27, 2025
aeb21c2
correct flash/ram for v307 and v305
hathach Jul 28, 2025
de9a6c8
Merge pull request #3186 from rhgndf/nanoch32v305
hathach Jul 28, 2025
3682b6c
fix pre-commit, remove svd file since they are heavy and should be in…
hathach Jul 28, 2025
b531f43
add ci build for at32: f402_405, f403a_407, f423
hathach Jul 28, 2025
9c1115e
Add reconnect m
raldone01 Jul 29, 2025
b67e008
add ci build for all at32, use linker and startup from mcu cmsis inst…
hathach Jul 31, 2025
e0f2343
clean up
hathach Jul 31, 2025
a16c7a2
Merge pull request #3191 from hathach/at32
hathach Aug 1, 2025
9290788
add at32 to README.rst, rename at32 board to lower case, correct name…
hathach Aug 1, 2025
f5974b0
add bufsize to tud_msc_inquiry2_cb()
hathach Aug 1, 2025
dce5880
Merge pull request #3194 from hathach/at32-doc
hathach Aug 1, 2025
f66f98f
Update examples/device/msc_dual_lun/src/msc_disk_dual.c
hathach Aug 1, 2025
60f075d
Merge pull request #3195 from hathach/update-inquiry2
hathach Aug 2, 2025
12a1d0e
use tu_desc_in_bounds() for descriptor loop
hathach Aug 2, 2025
8f46021
Merge pull request #3183 from rppicomidi/fix_3159
hathach Aug 2, 2025
87d9e05
Merge pull request #3091 from raldone01/fix/web_serial
hathach Aug 2, 2025
d9aa4c6
fix tud_audio_set_itf_close_EP_cb() typo
hathach Aug 2, 2025
5153312
Merge pull request #3197 from hathach/fix-audio-typo
hathach Aug 5, 2025
2298c2f
Fix AT32F405xx missing USB HS definition
peppapighs Aug 5, 2025
4bfba6b
fix rp2 iso transfer: reset state before notify stack. since new audi…
hathach Aug 5, 2025
a014df9
Merge pull request #3200 from peppapighs/at32f405-usb-hs
hathach Aug 5, 2025
f6bec10
Merge pull request #3203 from hathach/fix-rp2-audio-iso-transfer
hathach Aug 5, 2025
283b06b
Add MTP class device
nbmaurizio Mar 12, 2025
5b9908a
update at32f405 dwc2 info and phy width selection
hathach Aug 7, 2025
5fb3c09
Merge pull request #3187 from s09289728096/fix_dhcp
hathach Aug 7, 2025
7142818
Fix STM32L4 GPIOD clock enable for variants without GPIOD
martijnvdwoude Aug 9, 2025
836f887
Add weact blackpill support
rhgndf Aug 10, 2025
4a78e4c
Add to boards.rst file
rhgndf Aug 10, 2025
24e596b
Fix file
rhgndf Aug 10, 2025
ddb8f0f
Add ESP32-C5 and ESP32-C61 definitions
tannewt Aug 15, 2025
e1cd4aa
add some consumer page configs
ohmdelta Aug 20, 2025
bd9dd75
Small cleanups.
verylowfreq Aug 24, 2025
522a34e
Insert small delay for LowSpeed device
verylowfreq Aug 24, 2025
a3bb7a9
Improve retry operation at NAK response.
verylowfreq Aug 24, 2025
a6b4ed9
STM32N6570-DK board is added. Build with DEBUG=1 (make BOARD=stm32n65…
armusin Aug 24, 2025
eda5c3a
STM32N6570-DK gets listed in boards.rst
armusin Aug 24, 2025
6f2b5fc
Remove dynamic memory allocation
verylowfreq Aug 24, 2025
12ee78d
Fix osal_spin_unlock for mynewt
kasjer Aug 24, 2025
e36dab3
Merge pull request #3227 from kasjer/kasjer/mynwet-spin-lock-fix
HiFiPhile Aug 26, 2025
edf1882
Merge pull request #3217 from tannewt/esp32c5_c61
hathach Aug 27, 2025
38f41f5
fix(dcd/dwc2): Fix reset procedure for versions >=4.20a
tore-espressif Aug 28, 2025
8c5d052
Merge pull request #3228 from espressif/feat/dcd_dwc_v4.30a
tannewt Aug 28, 2025
f5d0483
use tusb_time_millis_api() instead of board_millis()
hathach Sep 3, 2025
bcff638
Merge pull request #3210 from martijnvdwoude/fix/stm32l4-gpiod-condit…
hathach Sep 3, 2025
5a50159
Merge pull request #3211 from rhgndf/at32f403a_weact_blackpill
hathach Sep 3, 2025
61761b9
Merge pull request #3225 from verylowfreq/pr-ch32v-usbfs-host
hathach Sep 3, 2025
c5a3909
add at32f415 dwc2 info
hathach Sep 3, 2025
08f3971
Initial plan
Copilot Sep 3, 2025
da9284e
Fix obsolete cnt assignment in _tu_fifo_peek() overflow check
Copilot Sep 3, 2025
047b856
Merge pull request #3206 from hathach/update-at32f405-phywidth-sel
hathach Sep 3, 2025
a96ee81
remove duplicated enum
hathach Sep 4, 2025
2c0e360
Merge pull request #3221 from ohmdelta/master
hathach Sep 4, 2025
93487de
Merge pull request #3230 from hathach/copilot/fix-3218
hathach Sep 4, 2025
02e5c95
Initial plan
Copilot Sep 4, 2025
fe42b3a
Update STM32 CMSIS dependencies to fix HSITRIM register bug
Copilot Sep 4, 2025
640f57d
Remove accidentally committed dependency directories
Copilot Sep 4, 2025
f6ca80a
modified the bsp files of at32 to make them work better
Sep 4, 2025
7625b86
Update all STM32 HAL driver dependencies to latest versions
Copilot Sep 4, 2025
d69d41a
fix linker h745 issue with clang
hathach Sep 4, 2025
4b716ec
fix linker h745 issue with clang
hathach Sep 4, 2025
78ab527
Update all STM32 CMSIS device dependencies to latest versions
Copilot Sep 4, 2025
4ec81ba
Merge pull request #3235 from hathach/copilot/fix-3209
hathach Sep 4, 2025
90080d4
update pio-usb
hathach Sep 4, 2025
b2cdea9
Merge pull request #3237 from hathach/update-pio-usb
hathach Sep 4, 2025
89f8fbc
Create comprehensive GitHub Copilot instructions and fix pre-commit c…
Copilot Sep 4, 2025
3b983cb
the family name error of at32 has been corrected
Sep 5, 2025
a379efc
fix pre-commit
hathach Sep 5, 2025
8304587
Merge pull request #3236 from ning3270455369/master
hathach Sep 5, 2025
0263cfc
fix #3239: discard poorly formed packets
rppicomidi Sep 6, 2025
0592369
Merge pull request #3226 from armusin/stm32n6570-dk
hathach Sep 8, 2025
4a8b822
Merge pull request #3240 from rppicomidi/fix_3239
hathach Sep 8, 2025
d70d404
use tusb_time_delay_ms_api for delay, also move tusb_time api to comm…
hathach Sep 10, 2025
b6b2209
Merge pull request #3126 from salkinium/fix/phyc_pll
hathach Sep 10, 2025
19f67ff
Initial STM32WBARI eval support
Sep 9, 2025
48f6b95
Incorporate upstream changes to dwc2_common.c
Sep 9, 2025
2e9ae5a
STM32WBARI eval CMake build support
Sep 10, 2025
c9527bc
Bring up to date with master
Sep 10, 2025
9cde80f
fix pre-commit
hathach Sep 11, 2025
5e661ea
Revert "Incorporate upstream changes to dwc2_common.c"
hathach Sep 11, 2025
040d1b4
Make get_deps.py WBA definition consistent with upstream and other defs
Sep 11, 2025
af7310b
Revert fsdev_stm32.h changes
Sep 11, 2025
a20252a
Merge branch 'master' of github.com:Dolphindalt/tinyusb
Sep 11, 2025
e09a2d8
Change CMSIS patch to match update path in family.mk for WBA
Sep 11, 2025
9135977
rename stm32wba eval to nucleo
hathach Sep 12, 2025
ba36df6
fix warnings, update docs
hathach Sep 12, 2025
9f055f1
missing cmsis5 for wba
hathach Sep 12, 2025
2027ac2
Merge pull request #3245 from Dolphindalt/master
hathach Sep 12, 2025
d3ab48b
Fix IAR build
HiFiPhile Sep 12, 2025
5755afa
Fix some IAR warnings
HiFiPhile Sep 12, 2025
802819d
add all constant from MTP specs appendix, rename some e.g OPEC to OP,…
hathach Sep 12, 2025
3b4884f
Move BOARD_ConfigMPU into board specific init
HiFiPhile Sep 12, 2025
4db2bda
echi: fix NXP USBPHY disconnection detection
HiFiPhile Sep 12, 2025
99bee6a
ehci: fix removed qhd get reused
HiFiPhile Sep 12, 2025
fad3dc4
Merge branch 'master' into sb-ep
HiFiPhile Sep 12, 2025
7810b58
exclude stm32l0538 due to size limit
HiFiPhile Sep 12, 2025
8515e47
Update comment
HiFiPhile Sep 12, 2025
841cac6
Merge pull request #3152 from Milek7/sb-ep
HiFiPhile Sep 12, 2025
cf6cbf0
Fix AT32 compile after #3152
HiFiPhile Sep 12, 2025
c484aae
Merge pull request #3247 from hathach/fsdev_fix
hathach Sep 13, 2025
f674561
Merge pull request #3246 from HiFiPhile/nxp_host
hathach Sep 13, 2025
cc19c02
dwc2: wait for ahb idle before core reset
hathach Sep 15, 2025
6522067
fix imxrt build
hathach Sep 15, 2025
6f06eff
add nrf54 to dwc2 info
hathach Sep 15, 2025
feef534
Merge pull request #3251 from hathach/fix-dwc2-reseet
hathach Sep 15, 2025
8e34ba9
Merge branch 'master' into fork/ennebi/mtp
hathach Sep 15, 2025
4ef99ec
fix copying readme.txt contents
hathach Sep 15, 2025
5fb8c57
merge context into interface and refactor, reformat
hathach Sep 16, 2025
10298f0
refactor generic container to use EPBUF declaration
hathach Sep 16, 2025
4182342
Add ESP32-H4 as a supported MCU in TinyUSB and wire it into build/run…
igi540 Sep 16, 2025
d9ad09a
Merge pull request #3252 from espressif/feat/esp32h4_support
hathach Sep 16, 2025
541c62c
refactor mtp xfer callback
hathach Sep 16, 2025
aea56dc
remove mtp context
hathach Sep 16, 2025
f18b750
use existing overloadable Pico SDK section macro instead of creating …
majbthrd Sep 17, 2025
369a1ff
Update weak callbacks to new syntax
HiFiPhile Sep 17, 2025
73f3900
Replace old delay functions by tusb_time_delay_ms_api
HiFiPhile Sep 17, 2025
50949eb
Fix board_get_unique_id
HiFiPhile Sep 17, 2025
be9409b
Fix board_init_after_tusb
HiFiPhile Sep 17, 2025
47bb79a
Fix board_reset_to_bootloader
HiFiPhile Sep 17, 2025
ce41292
Fix address translation functions
HiFiPhile Sep 17, 2025
be618ba
Fix RPI build
HiFiPhile Sep 17, 2025
9d13c8f
Potential fix for code scanning alert no. 914: Commented-out code
HiFiPhile Sep 17, 2025
fd2cd3f
Merge pull request #3255 from majbthrd/enoughwheels
hathach Sep 18, 2025
b4cc5af
Fix ESP32 build
HiFiPhile Sep 18, 2025
e621f2f
set driver count to 0
HiFiPhile Sep 18, 2025
0961e06
Add usbd_edpt_xfer_fifo stub
HiFiPhile Sep 18, 2025
0655f98
Merge branch 'weak_cb' of https://github.com/hathach/tinyusb into wea…
HiFiPhile Sep 18, 2025
f99f203
reworking MTP API, adding callback, getting GetDeviceInfo working
hathach Sep 19, 2025
e76d09b
rework get storageIDs and get storage info
hathach Sep 19, 2025
57c5e55
rework get storageIDs and get storage info
hathach Sep 19, 2025
b70804b
implement get device properties value
hathach Sep 19, 2025
d9c6dfb
implement get device properties describer and device properties value
hathach Sep 20, 2025
7463705
Fix table display issue in README.rst
Isoheptane Sep 20, 2025
ff00470
Merge pull request #3258 from Isoheptane/patch-1
HiFiPhile Sep 20, 2025
f5a3f25
implement get objection handles
hathach Sep 21, 2025
4c81899
implement get object info
hathach Sep 21, 2025
6fa5268
implement get object, close session
hathach Sep 22, 2025
7162cae
Fix erroneous documentation of TU_ASSERT/TU_VERIFY
terjr Sep 22, 2025
5b200c4
Merge pull request #3259 from terjr/fix-tusb-verify-documentation
HiFiPhile Sep 22, 2025
1ab45bc
try to add logo png to mtp example
hathach Sep 23, 2025
3c39f60
refactor API
hathach Sep 23, 2025
6317730
unify callback argument. support multiple packet get object
hathach Sep 24, 2025
b8126d9
clean up
hathach Sep 24, 2025
f36b63a
Add HID Usage Page and Table for Power Devices (0x84 - 0x85)
ludoux Sep 24, 2025
f4a3c1a
Fix incorrect comments
ludoux Sep 25, 2025
f839771
implement MTP_OP_SEND_OBJECT_INFO, refactor fs example
hathach Sep 25, 2025
c9a8330
implement send object command, able to create new file
hathach Sep 25, 2025
879f02f
implement delete object
hathach Sep 25, 2025
34be38d
clean up, wrap up bulk command supported
hathach Sep 25, 2025
1f9c415
Merge pull request #3265 from ludoux/hid-power-devices
HiFiPhile Sep 25, 2025
e4f7fcf
fix compile warnings
hathach Sep 26, 2025
e92262e
fix more ci build
hathach Sep 26, 2025
5c630ee
skip mtp for cynthion_d11
hathach Sep 26, 2025
f9d4bc7
implement tud_mtp_mounted() and tud_mtp_event_send()
hathach Sep 26, 2025
cb21ca1
implement control request
hathach Sep 27, 2025
adce3bb
implement serial for MTP
hathach Sep 27, 2025
bc688cc
add edpt claim for public API
hathach Sep 27, 2025
a09c65c
make command container more consistent
hathach Sep 27, 2025
152d25e
Merge pull request #3256 from hathach/weak_cb
hathach Sep 27, 2025
8952838
audio: simplify alt settings management
HiFiPhile Sep 27, 2025
5130850
Merge pull request #3266 from hathach/uac_simplify
hathach Sep 29, 2025
4f3a5f9
refactor mtp examples, add phase and session id to callback data
hathach Sep 29, 2025
bdd557c
Merge branch 'master' into fork/ennebi/mtp
hathach Sep 29, 2025
ff492dc
fix ci
hathach Sep 29, 2025
ec5436b
bsp: Add STM32U083C-DK board
HiFiPhile Sep 29, 2025
bd35dd1
Fix PMA size for U0
HiFiPhile Sep 29, 2025
4cf7e95
Refresh board presets
HiFiPhile Sep 29, 2025
30f8a9d
Disable SBUF_ISO for U0
HiFiPhile Sep 29, 2025
7281bfb
Fix warning
HiFiPhile Sep 29, 2025
387c28a
Add u0 to ci
HiFiPhile Sep 29, 2025
2f9f5c6
Fix ci
HiFiPhile Sep 29, 2025
94b03e2
examples: make: fix LOGGER=rtt
karlp Sep 29, 2025
c33fd3e
Increase stack size to 2kB
HiFiPhile Sep 30, 2025
8206002
update docs
HiFiPhile Sep 30, 2025
732d4a8
fix serial, try to test mtp with hil
hathach Sep 30, 2025
43a7663
Merge pull request #3268 from HiFiPhile/stm32u083cdk
hathach Oct 1, 2025
43e6c9d
Merge pull request #3269 from karlp/pr/fix-rtt
hathach Oct 1, 2025
4e4e2be
test mtp with hil
hathach Oct 1, 2025
13c2401
minor update
hathach Oct 1, 2025
eceb281
Merge branch 'master' into fork/ennebi/mtp
hathach Oct 1, 2025
2693958
hil tinyusb always checkoutt/download artifacts
hathach Oct 1, 2025
acf2b8c
"Claude PR Assistant workflow"
hathach Oct 1, 2025
9da1113
"Claude Code Review workflow"
hathach Oct 1, 2025
6d32256
HIL add timeout for opening mtp device
hathach Oct 1, 2025
3c108b2
add CLAUDE.md and fix pre-commit build
hathach Oct 2, 2025
4a0613c
fix mtp serial
hathach Oct 2, 2025
3d71177
Merge pull request #3272 from hathach/add-claude-github-actions-17593…
hathach Oct 2, 2025
981dc98
mtp example work with highspeed device
hathach Oct 2, 2025
dbc2086
remove claude-code-review.yml
hathach Oct 2, 2025
f655d21
Merge pull request #3274 from hathach/remove-claude-code-review
hathach Oct 2, 2025
3773d60
fix typos
hathach Oct 2, 2025
9cd5fb6
skip mtp for now
hathach Oct 2, 2025
610f353
use cache to store skip board in hil ci
hathach Oct 2, 2025
c1bf19e
Merge pull request #3023 from ennebi/mtp
hathach Oct 2, 2025
e2dbf2b
remove claude code workflow
hathach Oct 3, 2025
3b00724
fix iar build
hathach Oct 3, 2025
f0670fd
fix make build
hathach Oct 3, 2025
c3f6c20
fix make stm32u0
hathach Oct 3, 2025
f3f6046
hil simplify skip board from previous run
hathach Oct 3, 2025
6ce46da
Merge pull request #3277 from hathach/remove-claude-code
hathach Oct 3, 2025
b18a8fb
update for release 0.19.0
hathach Oct 2, 2025
8832d22
update docs
hathach Oct 3, 2025
8d7e8a1
update docs
hathach Oct 4, 2025
331c263
Merge pull request #3276 from hathach/release-0.19.0
hathach Oct 6, 2025
039ff97
Merge tag '0.19.0' into sync/upstream
roma-jam Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 6 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ jobs:
echo "MATRIX_JSON=$MATRIX_JSON"

BUILDSYSTEM_TOOLCHAIN=(
"cmake aarch64-gcc"
"cmake arm-clang"
"make aarch64-gcc"
"make arm-gcc"
"make msp430-gcc"
"make riscv-gcc"
"make rx-gcc"
"cmake arm-gcc"
"cmake esp-idf"
"cmake msp430-gcc"
"cmake riscv-gcc"
)

# only build IAR if not forked PR, since IAR token is not shared
if [ -z $CIRCLE_PR_USERNAME ]; then
BUILDSYSTEM_TOOLCHAIN+=("cmake arm-iar")
fi

RESOURCE_LARGE='["nrf", "imxrt", "stm32f4", "stm32h7"]'
RESOURCE_LARGE='["nrf", "imxrt", "stm32f4", "stm32h7 stm32h7rs"]'

gen_build_entry() {
local build_system="$1"
Expand Down Expand Up @@ -67,7 +66,7 @@ jobs:
FAMILY_LARGE=$(jq -n --argjson family "$FAMILY" --argjson resource "$RESOURCE_LARGE" '$family | map(select(IN($resource[])))')
FAMILY=$(jq -n --argjson family "$FAMILY" --argjson resource "$RESOURCE_LARGE" '$family | map(select(IN($resource[]) | not))')

if [[ $toolchain == esp-idf ]]; then
if [[ $toolchain == esp-idf || $toolchain == arm-iar ]]; then
gen_build_entry "$build_system" "$toolchain" "$FAMILY" "large"
else
gen_build_entry "$build_system" "$toolchain" "$FAMILY" "medium+"
Expand Down
13 changes: 1 addition & 12 deletions .circleci/config2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@ commands:
- run:
name: Set toolchain url and key
command: |
TOOLCHAIN_JSON='{
"aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz",
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
"rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run",
"arm-iar": "https://updates.iar.com/FileStore/STANDARD/001/003/322/cxarm-9.60.3.deb"
}'
toolchain_url=$(echo $TOOLCHAIN_JSON | jq -r '.["<< parameters.toolchain >>"]')

toolchain_url=$(jq -r '."<< parameters.toolchain >>"' .github/actions/setup_toolchain/toolchain.json)
# only cache if not a github link
if [[ $toolchain_url != "https://github.com"* ]]; then
echo "<< parameters.toolchain >>-$toolchain_url" > toolchain_key
Expand Down Expand Up @@ -121,7 +111,6 @@ commands:
TOOLCHAIN_OPTION="--toolchain clang"
elif [ << parameters.toolchain >> == arm-iar ]; then
TOOLCHAIN_OPTION="--toolchain iar"
echo IAR_LMS_CLOUD_URL=$IAR_LMS_CLOUD_URL
iccarm --version
elif [ << parameters.toolchain >> == arm-gcc ]; then
TOOLCHAIN_OPTION="--toolchain gcc"
Expand Down
13 changes: 2 additions & 11 deletions .github/actions/setup_toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
if: inputs.toolchain == 'arm-gcc'
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '13.2.Rel1'
release: '14.2.Rel1'

- name: Pull ESP-IDF docker
if: inputs.toolchain == 'esp-idf'
Expand All @@ -28,26 +28,17 @@ runs:
- name: Get Toolchain URL
if: >-
inputs.toolchain != 'arm-gcc' &&
inputs.toolchain != 'arm-iar' &&
inputs.toolchain != 'esp-idf'
id: set-toolchain-url
run: |
TOOLCHAIN_JSON='{
"aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
"rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run"
}'
TOOLCHAIN_URL=$(echo $TOOLCHAIN_JSON | jq -r '.["${{ inputs.toolchain }}"]')
TOOLCHAIN_URL=$(jq -r '."${{ inputs.toolchain }}"' .github/actions/setup_toolchain/toolchain.json)
echo "toolchain_url=$TOOLCHAIN_URL"
echo "toolchain_url=$TOOLCHAIN_URL" >> $GITHUB_OUTPUT
shell: bash

- name: Download Toolchain
if: >-
inputs.toolchain != 'arm-gcc' &&
inputs.toolchain != 'arm-iar' &&
inputs.toolchain != 'esp-idf'
uses: ./.github/actions/setup_toolchain/download
with:
Expand Down
16 changes: 12 additions & 4 deletions .github/actions/setup_toolchain/download/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,25 @@ runs:
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/${{ inputs.toolchain }}
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz

if [[ ${{ inputs.toolchain }} == rx-gcc ]]; then
mv toolchain.tar.gz toolchain.run
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.run
chmod +x toolchain.run
./toolchain.run -p ~/cache/${{ inputs.toolchain }}/gnurx -y
elif [[ ${{ inputs.toolchain }} == arm-iar ]]; then
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O ~/cache/${{ inputs.toolchain }}/cxarm.deb
else
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
fi
shell: bash

- name: Set Toolchain Path
- name: Setup Toolchain
run: |
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
if [[ ${{ inputs.toolchain }} == arm-iar ]]; then
sudo apt-get install -y ~/cache/${{ inputs.toolchain }}/cxarm.deb
echo >> $GITHUB_PATH "/opt/iar/cxarm/arm/bin"
else
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
fi
shell: bash
9 changes: 9 additions & 0 deletions .github/actions/setup_toolchain/toolchain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-linux-x64.tar.gz",
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
"rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run",
"arm-iar": "https://netstorage.iar.com/FileStore/STANDARD/001/003/583/cxarm-9.60.4.deb"
}
190 changes: 190 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# TinyUSB
TinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events deferred to non-ISR task functions.

Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.

## Working Effectively

### Bootstrap and Build Setup
- Install ARM GCC toolchain: `sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi`
- Fetch core dependencies: `python3 tools/get_deps.py` -- takes <1 second. NEVER CANCEL.
- For specific board families: `python3 tools/get_deps.py FAMILY_NAME` (e.g., rp2040, stm32f4)
- Dependencies are cached in `lib/` and `hw/mcu/` directories

### Build Examples
Choose ONE of these approaches:

**Option 1: Individual Example with CMake (RECOMMENDED)**
```bash
cd examples/device/cdc_msc
mkdir -p build && cd build
cmake -DBOARD=raspberry_pi_pico -DCMAKE_BUILD_TYPE=MinSizeRel ..
cmake --build . -j4
```
-- takes 1-2 seconds. NEVER CANCEL. Set timeout to 5+ minutes.

**CMake with Ninja (Alternative)**
```bash
cd examples/device/cdc_msc
mkdir build && cd build
cmake -G Ninja -DBOARD=raspberry_pi_pico ..
ninja
```

**Option 2: Individual Example with Make**
```bash
cd examples/device/cdc_msc
make BOARD=raspberry_pi_pico all
```
-- takes 2-3 seconds. NEVER CANCEL. Set timeout to 5+ minutes.

**Option 3: All Examples for a Board**
```bash
python3 tools/build.py -b BOARD_NAME
```
-- takes 15-20 seconds, may have some objcopy failures that are non-critical. NEVER CANCEL. Set timeout to 30+ minutes.

### Build Options
- **Debug build**:
- CMake: `-DCMAKE_BUILD_TYPE=Debug`
- Make: `DEBUG=1`
- **With logging**:
- CMake: `-DLOG=2`
- Make: `LOG=2`
- **With RTT logger**:
- CMake: `-DLOG=2 -DLOGGER=rtt`
- Make: `LOG=2 LOGGER=rtt`
- **RootHub port selection**:
- CMake: `-DRHPORT_DEVICE=1`
- Make: `RHPORT_DEVICE=1`
- **Port speed**:
- CMake: `-DRHPORT_DEVICE_SPEED=OPT_MODE_FULL_SPEED`
- Make: `RHPORT_DEVICE_SPEED=OPT_MODE_FULL_SPEED`

### Flashing and Deploymen
- **Flash with JLink**:1
- CMake: `ninja cdc_msc-jlink`
- Make: `make BOARD=raspberry_pi_pico flash-jlink`
- **Flash with OpenOCD**:
- CMake: `ninja cdc_msc-openocd`
- Make: `make BOARD=raspberry_pi_pico flash-openocd`
- **Generate UF2**:
- CMake: `ninja cdc_msc-uf2`
- Make: `make BOARD=raspberry_pi_pico all uf2`
- **List all targets** (CMake/Ninja): `ninja -t targets`

### Unit Testing
- Install Ceedling: `sudo gem install ceedling`
- Run all unit tests: `cd test/unit-test && ceedling` or `cd test/unit-test && ceedling test:all` -- takes 4 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
- Run specific test: `cd test/unit-test && ceedling test:test_fifo`
- Tests use Unity framework with CMock for mocking

### Documentation
- Install requirements: `pip install -r docs/requirements.txt`
- Build docs: `cd docs && sphinx-build -b html . _build` -- takes 2-3 seconds. NEVER CANCEL. Set timeout to 10+ minutes.

### Code Quality and Validation
- Format code: `clang-format -i path/to/file.c` (uses `.clang-format` config)
- Check spelling: `pip install codespell && codespell` (uses `.codespellrc` config)
- Pre-commit hooks validate unit tests and code quality automatically

## Validation

### ALWAYS Run These After Making Changes
1. **Pre-commit validation** (RECOMMENDED): `pre-commit run --all-files`
- Install pre-commit: `pip install pre-commit && pre-commit install`
- Runs all quality checks, unit tests, spell checking, and formatting
- Takes 10-15 seconds. NEVER CANCEL. Set timeout to 15+ minutes.
2. **Build validation**: Build at least one example that exercises your changes
```bash
cd examples/device/cdc_msc
make BOARD=raspberry_pi_pico all
```

### Manual Testing Scenarios
- **Device examples**: Cannot be fully tested without real hardware, but must build successfully
- **Unit tests**: Exercise core stack functionality - ALL tests must pass
- **Build system**: Must be able to build examples for multiple board families

### Board Selection for Testing
- **STM32F4**: `stm32f407disco` - no external SDK required, good for testing
- **RP2040**: `raspberry_pi_pico` - requires Pico SDK, commonly used
- **Other families**: Check `hw/bsp/FAMILY/boards/` for available boards

## Common Tasks and Time Expectations

### Repository Structure Quick Reference
```
├── src/ # Core TinyUSB stack
│ ├── class/ # USB device classes (CDC, HID, MSC, Audio, etc.)
│ ├── portable/ # MCU-specific drivers (organized by vendor)
│ ├── device/ # USB device stack core
│ ├── host/ # USB host stack core
│ └── common/ # Shared utilities (FIFO, etc.)
├── examples/ # Example applications
│ ├── device/ # Device examples (cdc_msc, hid_generic, etc.)
│ ├── host/ # Host examples
│ └── dual/ # Dual-role examples
├── hw/bsp/ # Board Support Packages
│ └── FAMILY/boards/ # Board-specific configurations
├── test/unit-test/ # Unit tests using Ceedling
├── tools/ # Build and utility scripts
└── docs/ # Sphinx documentation
```

### Build Time Reference
- **Dependency fetch**: <1 second
- **Single example build**: 1-3 seconds
- **Unit tests**: ~4 seconds
- **Documentation build**: ~2.5 seconds
- **Full board examples**: 15-20 seconds
- **Toolchain installation**: 2-5 minutes (one-time)

### Key Files to Know
- `tools/get_deps.py`: Manages dependencies for MCU families
- `tools/build.py`: Builds multiple examples, supports make/cmake
- `src/tusb.h`: Main TinyUSB header file
- `src/tusb_config.h`: Configuration template
- `examples/device/cdc_msc/`: Most commonly used example for testing
- `test/unit-test/project.yml`: Ceedling test configuration

### Debugging Build Issues
- **Missing compiler**: Install `gcc-arm-none-eabi` package
- **Missing dependencies**: Run `python3 tools/get_deps.py FAMILY`
- **Board not found**: Check `hw/bsp/FAMILY/boards/` for valid board names
- **objcopy errors**: Often non-critical in full builds, try individual example builds

### Working with USB Device Classes
- **CDC (Serial)**: `src/class/cdc/` - Virtual serial port
- **HID**: `src/class/hid/` - Human Interface Device (keyboard, mouse, etc.)
- **MSC**: `src/class/msc/` - Mass Storage Class (USB drive)
- **Audio**: `src/class/audio/` - USB Audio Class
- Each class has device (`*_device.c`) and host (`*_host.c`) implementations

### MCU Family Support
- **STM32**: Largest support (F0, F1, F2, F3, F4, F7, G0, G4, H7, L4, U5, etc.)
- **Raspberry Pi**: RP2040, RP2350 with PIO-USB host support
- **NXP**: iMXRT, Kinetis, LPC families
- **Microchip**: SAM D/E/G/L families
- Check `hw/bsp/` for complete list and `docs/reference/boards.rst` for details

## Code Style Guidelines

### General Coding Standards
- Use C99 standard
- Memory-safe: no dynamic allocation
- Thread-safe: defer all interrupt events to non-ISR task functions
- 2-space indentation, no tabs
- Use snake_case for variables/functions
- Use UPPER_CASE for macros and constants
- Follow existing variable naming patterns in files you're modifying
- Include proper header comments with MIT license
- Add descriptive comments for non-obvious functions

### Best Practices
- When including headers, group in order: C stdlib, tusb common, drivers, classes
- Always check return values from functions that can fail
- Use TU_ASSERT() for error checking with return statements
- Follow the existing code patterns in the files you're modifying

Remember: TinyUSB is designed for embedded systems - builds are fast, tests are focused, and the codebase is optimized for resource-constrained environments.
Loading
Loading