Skip to content

Commit 30802a1

Browse files
author
hathach
committed
Merge remote-tracking branch 'origin/master' into msc_stall
2 parents 8a8cea5 + 2883403 commit 30802a1

File tree

22 files changed

+140
-107
lines changed

22 files changed

+140
-107
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
release:
99
types: [ published ]
10+
1011
concurrency:
1112
group: ${{ github.workflow }}-${{ github.ref }}
1213
cancel-in-progress: true
@@ -15,9 +16,9 @@ env:
1516
HIL_JSON: test/hil/tinyusb.json
1617

1718
jobs:
18-
# Check if code paths changed (skip builds if doc-only)
19+
# Check if the code changes and we need to run ci build
20+
# Cannot use paths filter in the on-event since we want this workflow to run even when there are no code changes, to register the commit chain
1921
check-paths:
20-
if: github.event_name == 'pull_request' || github.event_name == 'push'
2122
runs-on: ubuntu-latest
2223
permissions:
2324
contents: read
@@ -46,13 +47,8 @@ jobs:
4647
- '.github/workflows/ci_set_matrix.py'
4748
4849
set-matrix:
49-
needs: [check-paths]
50-
if: |
51-
always() && (
52-
github.event_name == 'release' ||
53-
github.event_name == 'workflow_dispatch' ||
54-
needs.check-paths.outputs.code_changed == 'true'
55-
)
50+
needs: [ check-paths ]
51+
if: needs.check-paths.outputs.code_changed == 'true'
5652
runs-on: ubuntu-latest
5753
outputs:
5854
json: ${{ steps.set-matrix-json.outputs.matrix }}
@@ -197,7 +193,7 @@ jobs:
197193
# Build Make/CMake on Windows/MacOS
198194
# ---------------------------------------
199195
build-os:
200-
needs: [check-paths]
196+
needs: [ check-paths ]
201197
if: needs.check-paths.outputs.code_changed == 'true'
202198
uses: ./.github/workflows/build_util.yml
203199
strategy:
@@ -215,8 +211,9 @@ jobs:
215211
# Zephyr
216212
# ---------------------------------------
217213
zephyr:
218-
needs: [check-paths]
219-
if: needs.check-paths.outputs.code_changed == 'true'
214+
needs: [ check-paths ]
215+
# skip zephyr build due to failed build, fix later
216+
if: false && needs.check-paths.outputs.code_changed == 'true'
220217
runs-on: ubuntu-latest
221218
steps:
222219
- name: Checkout TinyUSB
@@ -238,10 +235,8 @@ jobs:
238235
# Run on PR only (hil-tinyusb), hil-hfp only run on non-forked PR
239236
# ---------------------------------------
240237
hil-build:
241-
needs: [check-paths, set-matrix]
242-
if: |
243-
github.repository_owner == 'hathach' &&
244-
(github.event_name == 'workflow_dispatch' || needs.check-paths.outputs.code_changed == 'true')
238+
needs: set-matrix
239+
if: github.repository_owner == 'hathach'
245240
uses: ./.github/workflows/build_util.yml
246241
strategy:
247242
fail-fast: false
@@ -260,10 +255,7 @@ jobs:
260255
# self-hosted on local VM, for attached hardware checkout HIL_JSON
261256
# ---------------------------------------
262257
hil-tinyusb:
263-
needs: [check-paths, hil-build]
264-
if: |
265-
github.repository_owner == 'hathach' &&
266-
(github.event_name == 'release' || github.event_name == 'workflow_dispatch' || needs.check-paths.outputs.code_changed == 'true')
258+
needs: hil-build
267259
runs-on: [ self-hosted, X64, hathach, hardware-in-the-loop ]
268260
steps:
269261
- name: Get Skip Boards from previous run
@@ -303,11 +295,10 @@ jobs:
303295
# Since IAR Token secret is not passed to forked PR, only build non-forked PR
304296
# ---------------------------------------
305297
hil-hfp:
306-
needs: [check-paths]
298+
needs: [ check-paths ]
307299
if: |
308300
github.repository_owner == 'hathach' &&
309-
github.event.pull_request.head.repo.fork == false &&
310-
(github.event_name == 'release' || github.event_name == 'workflow_dispatch' || needs.check-paths.outputs.code_changed == 'true')
301+
!(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true)
311302
runs-on: [ self-hosted, Linux, X64, hifiphile ]
312303
env:
313304
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
@@ -364,11 +355,9 @@ jobs:
364355
secrets: inherit
365356

366357
membrowse-comment:
367-
needs: [check-paths, membrowse]
368-
if: >
369-
always() &&
370-
github.event_name == 'pull_request' &&
371-
needs.check-paths.outputs.code_changed == 'true'
358+
needs: membrowse
359+
# skip membrowse comment since it is too verbal
360+
if: false && github.event_name == 'pull_request'
372361
runs-on: ubuntu-latest
373362
permissions:
374363
contents: read

.github/workflows/ci_set_matrix.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
# family: [supported toolchain]
1717
family_list = {
18-
"at32f45x at32f402_405 at32f403a_407 at32f413 at32f415 at32f423 at32f425 at32f435_437 broadcom_32bit da1469x": [
19-
"arm-gcc"],
18+
"at32f45x at32f402_405 at32f403a_407 at32f413 at32f415 at32f423 at32f425 at32f435_437": ["arm-gcc"],
19+
"broadcom_32bit da1469x": ["arm-gcc"],
2020
"broadcom_64bit": ["aarch64-gcc"],
2121
"ch32v10x ch32v20x ch32v30x fomu gd32vf103 hpmicro": ["riscv-gcc"],
2222
"imxrt": ["arm-gcc", "arm-clang"],
@@ -38,9 +38,9 @@
3838
"stm32h7": ["arm-gcc", "arm-clang", "arm-iar"],
3939
"stm32h7rs stm32l0 stm32l4": ["arm-gcc", "arm-clang", "arm-iar"],
4040
"stm32n6": ["arm-gcc"],
41-
"stm32u0 stm32wb stm32wba": ["arm-gcc", "arm-clang", "arm-iar"],
42-
"stm32u5": ["arm-gcc", "arm-clang", "arm-iar"],
43-
"-bespressif_s2_devkitc": ["esp-idf"],
41+
"stm32u0 stm32u5": ["arm-gcc", "arm-clang", "arm-iar"],
42+
"stm32wb stm32wba": ["arm-gcc", "arm-clang", "arm-iar"],
43+
# "-bespressif_s2_devkitc": ["esp-idf"],
4444
# S3, P4 will be built by hil test
4545
# "-bespressif_s3_devkitm": ["esp-idf"],
4646
# "-bespressif_p4_function_ev": ["esp-idf"],

.idea/cmake.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ If you have a special requirement, ``usbd_app_driver_get_cb()`` can be used to w
101101
Host Stack
102102
----------
103103

104-
- Human Interface Device (HID): Keyboard, Mouse, Generic
105-
- Mass Storage Class (MSC)
106104
- Communication Device Class: CDC-ACM
107105
- Vendor serial over USB: FTDI, CP210x, CH34x, PL2303
106+
- Human Interface Device (HID): Keyboard, Mouse, Generic
107+
- Mass Storage Class (MSC)
108+
- Musical Instrument Digital Interface (MIDI)
108109
- Hub with multiple-level support
109110

110111
Similar to the Device Stack, if you have a special requirement, ``usbh_app_driver_get_cb()`` can be used to write your own class driver without modifying the stack.

docs/getting_started.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ Get the Code
3434
$ python tools/get_deps.py -b stm32h743eval # or python tools/get_deps.py stm32h7
3535
3636
.. note::
37-
For rp2040 `pico-sdk <https://github.com/raspberrypi/pico-sdk>`_ or `esp-idf <https://github.com/espressif/esp-idf>`_ for Espressif targets are required; install them per vendor instructions.
37+
Some MCU families require additional SDKs, please follow their instructions to install and set it up
38+
39+
* **rp2040**: Requires `pico-sdk <https://github.com/raspberrypi/pico-sdk>`_
40+
* **Espressif (esp32)**: Requires `esp-idf <https://github.com/espressif/esp-idf>`_. Only a few examples support the ESP-IDF build system. Look for ones with `src/CMakeLists.txt` that contain `idf_component_register()`, such as `cdc_msc_freertos`.
3841

3942
Simple Device Example
4043
---------------------

examples/device/cdc_dual_ports/src/tusb_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
105105

106106
// CDC Endpoint transfer buffer size, more is faster
107+
// Leave it as default size (512 for HS, 64 for FS) unless your host application
108+
// is able to send ZLP (Zero Length Packet) to terminate transfer !
107109
#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
108110

109111
#ifdef __cplusplus

examples/device/cdc_msc/src/tusb_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
105105

106106
// CDC Endpoint transfer buffer size, more is faster
107+
// Leave it as default size (512 for HS, 64 for FS) unless your host application
108+
// is able to send ZLP (Zero Length Packet) to terminate transfer !
107109
#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
108110

109111
// MSC Buffer size of Device Mass storage

examples/device/cdc_msc_freertos/src/tusb_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
112112

113113
// CDC Endpoint transfer buffer size, more is faster
114+
// Leave it as default size (512 for HS, 64 for FS) unless your host application
115+
// is able to send ZLP (Zero Length Packet) to terminate transfer !
114116
#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
115117

116118
// MSC Buffer size of Device Mass storage

examples/device/cdc_uac2/src/tusb_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ extern "C" {
160160
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
161161

162162
// CDC Endpoint transfer buffer size, more is faster
163+
// Leave it as default size (512 for HS, 64 for FS) unless your host application
164+
// is able to send ZLP (Zero Length Packet) to terminate transfer !
163165
#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
164166

165167
#ifdef __cplusplus

0 commit comments

Comments
 (0)