Skip to content

Commit 461d10a

Browse files
authored
Merge pull request #68 from espressif/sync/release_v0.18
Synchronization patch with changes from release/v0.18 [v0.19]
2 parents e7d7e3b + d0c97f9 commit 461d10a

File tree

12 files changed

+213
-225
lines changed

12 files changed

+213
-225
lines changed
Lines changed: 32 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,50 @@
1-
name: Bug Report
2-
description: Report a problem with TinyUSB
3-
labels: 'Bug 🐞'
1+
name: Bug report
2+
description: Report build and runtime bugs
3+
labels: ["Type: Bug"]
44
body:
5-
- type: markdown
6-
attributes:
7-
value: |
8-
Thanks for taking the time to fill out this bug report!
9-
It's okay to leave some blank if it doesn't apply to your problem.
10-
11-
- type: dropdown
5+
- type: checkboxes
6+
id: checklist
127
attributes:
13-
label: Operating System
8+
label: Answers checklist.
9+
description: Before submitting a new issue, please follow the checklist and try to find the answer.
1410
options:
15-
- Linux
16-
- MacOS
17-
- RaspberryPi OS
18-
- Windows 7
19-
- Windows 10
20-
- Windows 11
21-
- Others
22-
validations:
23-
required: true
24-
11+
- label: I have read the component documentation [ESP-IDF Components](https://components.espressif.com) and the issue is not addressed there.
12+
required: true
13+
- label: I am using target and esp-idf version as defined in component's idf_component.yml
14+
required: true
15+
- label: I have searched the upstream [issue tracker](https://github.com/hathach/tinyusb/issues?q=is%3Aissue) for a similar issue and not found any related issue.
16+
required: true
17+
- label: I have searched the Espressif esp-usb component [issue tracker](https://github.com/espressif/esp-usb/issues?q=is%3Aissue) for a similar issue and not found any related issue.
18+
required: true
2519
- type: input
20+
id: idf_version
2621
attributes:
27-
label: Commit SHA
28-
placeholder: e.g 3a042b37da28d0ba1e5593eb1068ca5645d77b56 or version bundled by esp-idf or pico-sdk
22+
label: ESP-IDF version.
23+
description: Which ESP-IDF version does this issue occur on? Run `git describe --tags` in your esp-idf folder to find it.
24+
placeholder: ex. v5.0-rc1
2925
validations:
3026
required: true
31-
3227
- type: input
28+
id: devkit
3329
attributes:
34-
label: Board
35-
placeholder: e.g Adafruit Feather nRF52840 Express
36-
validations:
37-
required: true
38-
39-
- type: textarea
40-
attributes:
41-
label: Firmware
42-
placeholder: |
43-
e.g examples/device/cdc_msc. If it is custom firmware, it is preferably compiled like one in example folder and reviewable for people to comment on. The easiest way is
44-
- Fork this repo, checkout a new branch
45-
- Add your-own-example based on stock one
46-
- Push and post it here.
47-
validations:
48-
required: true
49-
50-
- type: textarea
51-
attributes:
52-
label: What happened ?
53-
placeholder: A clear and concise description of what the bug is.
54-
validations:
55-
required: true
56-
57-
- type: textarea
58-
attributes:
59-
label: How to reproduce ?
60-
placeholder: |
61-
Exact steps in chronological order, details should be specific e.g if you use a command/script to test with, please post it as well.
62-
1. Go to '...'
63-
2. Click on '....'
64-
3. See error
30+
label: Development Kit.
31+
description: Which Development Kit does this issue occur on?
32+
placeholder: ex. ESP32-Wrover-Kit v2 | Custom Board
6533
validations:
6634
required: true
67-
68-
- type: textarea
35+
- type: input
36+
id: component_version
6937
attributes:
70-
label: Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
71-
placeholder: |
72-
Attach your debug log txt file here, where the issue occurred, best with comments to explain the actual events.
73-
74-
Note1: Please DO NOT paste your lengthy log contents here since it hurts the readability.
75-
Note2: To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h.
76-
More information can be found at [example's readme](https://github.com/hathach/tinyusb/blob/master/docs/getting_started.md)
38+
label: Used Component version.
39+
description: Which Component version does this issue occur on? Check `dependencies.lock` file in your project root to find it.
40+
placeholder: ex. v1.2.0-rc0
7741
validations:
7842
required: true
79-
8043
- type: textarea
44+
id: more-info
8145
attributes:
82-
label: Screenshots
83-
description: If applicable, add screenshots to help explain your problem.
46+
label: More Information.
47+
description: Any other information from investigating this?
48+
placeholder: ex. I tried on Windows 10 PC and the issue couldn't be reproduced there.
8449
validations:
8550
required: false
86-
87-
- type: checkboxes
88-
attributes:
89-
label: I have checked existing issues, discussion and documentation
90-
description: You agree to check all the resources above before opening a new issue.
91-
options:
92-
- label: I confirm I have checked existing issues, discussion and documentation.
93-
required: true

.github/ISSUE_TEMPLATE/config.yml

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

.github/ISSUE_TEMPLATE/feature_request.yml

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Requirements
2+
_Provide a requirements for requesting changes_
3+
4+
## Limitations
5+
_Describe limitations if there are any_
6+
7+
## Breaking change
8+
_No breaking changes_
9+
10+
## Checklist
11+
12+
- [ ] Pull Request name has appropriate format (for example: "fix(dcd_dwc2): Resolved address selection when several phy are present")
13+
- [ ] _Optional:_ README.md updated
14+
- [ ] CI passed
15+
16+
## Related issues
17+
_No related issues_
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Config file for build_and_run_idf_examples.yml workflow
2+
3+
# This file contains configuration settings for the idf-build-apps tool,
4+
# which is used to build and run example applications in the workflow.
5+
# If you change the 'build_dir' value, make sure to update the corresponding
6+
# Run step in the workflow, as it will need to reference the new build directory.
7+
8+
paths = [
9+
"${IDF_PATH}/examples/peripherals/usb/device", # ESP-IDF USB Device examples path
10+
]
11+
12+
exclude = [
13+
"${IDF_PATH}/examples/peripherals/usb/device/cherryusb_serial_device", # Exclude cherryusb-based device examples
14+
]
15+
16+
recursive = true
17+
manifest_file = "${IDF_PATH}/examples/peripherals/.build-test-rules.yml"
18+
check_warnings = true
19+
target = "all"
20+
enable_preview_targets = true
21+
22+
# Build related options (build_dir uses '@t' for target and '@w' for wildcard pattern (sdkconfig usually)
23+
build_dir = "build_@t_@w"

.github/pull_request_template.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 72 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
name: ESP-USB Test Apps
1+
# This workflow builds and runs ESP-USB test applications for pull requests.
2+
# It checks out the latest code from ESP-USB master, builds test apps using Espressif's IDF,
3+
# uploads artifacts, and runs tests on self-hosted runners for supported targets.
4+
5+
name: ESP-USB Test Apps [master]
26

37
on:
48
pull_request:
@@ -8,12 +12,20 @@ jobs:
812
build:
913
name: Build
1014
strategy:
15+
fail-fast: false
1116
matrix:
12-
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
17+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"]
1318
runs-on: ubuntu-latest
1419
container: espressif/idf:${{ matrix.idf_ver }}
1520
env:
16-
ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps
21+
IDF_COMP_MAN_VER: "2.4.3"
22+
IDF_BUILD_APPS_VER: "2.13.3"
23+
# We are cloning esp-usb repo to get the test apps to build, the paths should be configured explicitly
24+
ESP_USB_PATH: esp-usb
25+
ESP_USB_CONFIG_FILE: esp-usb/.idf_build_apps.toml
26+
ESP_USB_MANIFEST: esp-usb/.build-test-rules.yml
27+
ESP_USB_IGNORE_WARNING_FILE: esp-usb/.ignore_build_warnings.txt
28+
ESP_TINYUSB_TEST_APPS: esp-usb/device/esp_tinyusb/test_apps
1729
steps:
1830
- uses: actions/checkout@v4
1931
with:
@@ -25,57 +37,69 @@ jobs:
2537
shell: bash
2638
run: |
2739
. ${IDF_PATH}/export.sh
28-
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade
40+
pip install --no-cache-dir idf-component-manager>=${{ env.IDF_COMP_MAN_VER }} idf-build-apps==${{ env.IDF_BUILD_APPS_VER }} pyyaml --upgrade
2941
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
3042
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
3143
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
3244
python .github/ci/override_managed_component.py tinyusb . ${{ env.ESP_TINYUSB_TEST_APPS }}/*/
33-
cd esp-usb
34-
idf-build-apps find --path ./device/esp_tinyusb/test_apps/
35-
idf-build-apps build --path ./device/esp_tinyusb/test_apps/
45+
idf-build-apps find --config-file ${{ env.ESP_USB_CONFIG_FILE }} -p ${{ env.ESP_TINYUSB_TEST_APPS }} -t all --manifest-files ${{ env.ESP_USB_MANIFEST }} --manifest-rootpath ${{ env.ESP_USB_PATH }}
46+
idf-build-apps build --config-file ${{ env.ESP_USB_CONFIG_FILE }} -p ${{ env.ESP_TINYUSB_TEST_APPS }} -t all --manifest-files ${{ env.ESP_USB_MANIFEST }} --manifest-rootpath ${{ env.ESP_USB_PATH }} --ignore-warning-files ${{ env.ESP_USB_IGNORE_WARNING_FILE }}
3647
- uses: actions/upload-artifact@v4
3748
with:
38-
name: usb_test_app_bin_${{ matrix.idf_ver }}
49+
# Test apps builds live under the repository workspace, we use workspace-relative glob
50+
name: usb_device_test_app_bin_${{ matrix.idf_ver }}
3951
path: |
40-
${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/bootloader/bootloader.bin
41-
${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/partition_table/partition-table.bin
42-
${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/test_app_*.bin
43-
${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/test_app_*.elf
44-
${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/flasher_args.json
45-
${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/config/sdkconfig.json
52+
**/build_esp*/bootloader/bootloader.bin
53+
**/build_esp*/partition_table/partition-table.bin
54+
**/build_esp*/test_app_*.bin
55+
**/build_esp*/test_app_*.elf
56+
**/build_esp*/flasher_args.json
57+
**/build_esp*/config/sdkconfig.json
4658
if-no-files-found: error
4759

48-
# run-target:
49-
# name: Run
50-
# if: ${{ github.repository_owner == 'espressif' }}
51-
# needs: build
52-
# strategy:
53-
# matrix:
54-
# idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
55-
# idf_target: ["esp32s2"]
56-
# runner_tag: ["usb_device"]
57-
# runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
58-
# container:
59-
# image: python:3.11-bookworm
60-
# options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw"
61-
# env:
62-
# ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps
63-
# steps:
64-
# - uses: actions/checkout@v4
65-
# - name: Clone esp-usb repository
66-
# run: |
67-
# git clone https://github.com/espressif/esp-usb.git
68-
# - name: ⚙️ Install System tools
69-
# run: |
70-
# apt update
71-
# apt install -y usbutils
72-
# - name: Install Python packages
73-
# env:
74-
# PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/"
75-
# run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb
76-
# - uses: actions/download-artifact@v4
77-
# with:
78-
# name: usb_test_app_bin_${{ matrix.idf_ver }}
79-
# path: ${{env.ESP_TINYUSB_TEST_APPS}}
80-
# - name: Run USB Test App on target
81-
# run: pytest ${{env.ESP_TINYUSB_TEST_APPS}} --embedded-services esp,idf --target=${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --build-dir=build_${{ matrix.idf_target }}
60+
run-target:
61+
name: Run
62+
# Disable the job in forks
63+
if: ${{ github.repository_owner == 'espressif' }}
64+
needs: build
65+
strategy:
66+
fail-fast: false
67+
matrix:
68+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"]
69+
idf_target: ["esp32s2", "esp32p4"]
70+
sdkconfig: ["default"]
71+
runner_tag: ["usb_device"]
72+
exclude:
73+
# Exclude esp32p4 for releases before IDF 5.3 for all runner tags (esp32p4 support starts in IDF 5.3)
74+
- idf_ver: "release-v5.1"
75+
idf_target: "esp32p4"
76+
- idf_ver: "release-v5.2"
77+
idf_target: "esp32p4"
78+
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
79+
container:
80+
image: python:3.11-bookworm
81+
options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw"
82+
env:
83+
ESP_USB_ROOT: esp-usb
84+
ESP_USB_TEST_APPS_PATH: esp-usb/device/esp_tinyusb/test_apps
85+
steps:
86+
- uses: actions/checkout@v4
87+
- name: Clone esp-usb repository
88+
run: |
89+
git clone https://github.com/espressif/esp-usb.git
90+
- name: ⚙️ Install System tools
91+
run: |
92+
apt update
93+
apt install -y usbutils
94+
- name: Install Python packages
95+
env:
96+
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/"
97+
run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb
98+
- uses: actions/download-artifact@v4
99+
with:
100+
# No need to set the path manually.
101+
# The test apps were built after cloning the esp-usb repo,
102+
# and the build artifacts already have the correct folder structure.
103+
name: usb_device_test_app_bin_${{ matrix.idf_ver }}
104+
- name: Run on target
105+
run: pytest ${{ env.ESP_USB_TEST_APPS_PATH }} --target=${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --build-dir=build_${{ matrix.idf_target }}_${{ matrix.sdkconfig }}

0 commit comments

Comments
 (0)