diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 34e1779840..c47f0f0f95 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,93 +1,50 @@ -name: Bug Report -description: Report a problem with TinyUSB -labels: 'Bug 🐞' +name: Bug report +description: Report build and runtime bugs +labels: ["Type: Bug"] body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - It's okay to leave some blank if it doesn't apply to your problem. - - - type: dropdown + - type: checkboxes + id: checklist attributes: - label: Operating System + label: Answers checklist. + description: Before submitting a new issue, please follow the checklist and try to find the answer. options: - - Linux - - MacOS - - RaspberryPi OS - - Windows 7 - - Windows 10 - - Windows 11 - - Others - validations: - required: true - + - label: I have read the component documentation [ESP-IDF Components](https://components.espressif.com) and the issue is not addressed there. + required: true + - label: I am using target and esp-idf version as defined in component's idf_component.yml + required: true + - 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. + required: true + - 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. + required: true - type: input + id: idf_version attributes: - label: Commit SHA - placeholder: e.g 3a042b37da28d0ba1e5593eb1068ca5645d77b56 or version bundled by esp-idf or pico-sdk + label: ESP-IDF version. + description: Which ESP-IDF version does this issue occur on? Run `git describe --tags` in your esp-idf folder to find it. + placeholder: ex. v5.0-rc1 validations: required: true - - type: input + id: devkit attributes: - label: Board - placeholder: e.g Adafruit Feather nRF52840 Express - validations: - required: true - - - type: textarea - attributes: - label: Firmware - placeholder: | - 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 - - Fork this repo, checkout a new branch - - Add your-own-example based on stock one - - Push and post it here. - validations: - required: true - - - type: textarea - attributes: - label: What happened ? - placeholder: A clear and concise description of what the bug is. - validations: - required: true - - - type: textarea - attributes: - label: How to reproduce ? - placeholder: | - 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. - 1. Go to '...' - 2. Click on '....' - 3. See error + label: Development Kit. + description: Which Development Kit does this issue occur on? + placeholder: ex. ESP32-Wrover-Kit v2 | Custom Board validations: required: true - - - type: textarea + - type: input + id: component_version attributes: - label: Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2) - placeholder: | - Attach your debug log txt file here, where the issue occurred, best with comments to explain the actual events. - - Note1: Please DO NOT paste your lengthy log contents here since it hurts the readability. - 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. - More information can be found at [example's readme](https://github.com/hathach/tinyusb/blob/master/docs/getting_started.md) + label: Used Component version. + description: Which Component version does this issue occur on? Check `dependencies.lock` file in your project root to find it. + placeholder: ex. v1.2.0-rc0 validations: required: true - - type: textarea + id: more-info attributes: - label: Screenshots - description: If applicable, add screenshots to help explain your problem. + label: More Information. + description: Any other information from investigating this? + placeholder: ex. I tried on Windows 10 PC and the issue couldn't be reproduced there. validations: required: false - - - type: checkboxes - attributes: - label: I have checked existing issues, discussion and documentation - description: You agree to check all the resources above before opening a new issue. - options: - - label: I confirm I have checked existing issues, discussion and documentation. - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 28fd274674..0000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: TinyUSB Discussion - url: https://github.com/hathach/tinyusb/discussions - about: If you have other questions or need help, post it here. - - name: TinyUSB Docs - url: https://docs.tinyusb.org/ - about: Online documentation diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 19f403246e..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Feature Request -description: Suggest an idea for this project -labels: 'Feature 💡' -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this request! - It's okay to leave some blank if it doesn't apply to your request. - - - type: input - attributes: - label: Related area - description: Please briefly explain the area of your Feature Request. - placeholder: eg. new port support, device stack, class driver ... - validations: - required: true - - - type: input - attributes: - label: Hardware specification - description: Please provide if your proposal depends on specific Hardware. - placeholder: eg. rp2040, samd51 ... - validations: - required: true - - - type: textarea - attributes: - label: Is your feature request related to a problem? - description: Please provide a clear and concise description of what the problem is. Add relevant issue link. - placeholder: ex. I'm facing the issue/missing function... - validations: - required: true - - - type: textarea - attributes: - label: Describe the solution you'd like - description: Please provide a clear and concise description of what you want to happen. - placeholder: ex. When using this function... - validations: - required: true - - - type: checkboxes - attributes: - label: I have checked existing issues, dicussion and documentation - description: You agree to check all the resources above before opening a new issue. - options: - - label: I confirm I have checked existing issues, dicussion and documentation. - required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..22c9febcb0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +## Requirements +_Provide a requirements for requesting changes_ + +## Limitations +_Describe limitations if there are any_ + +## Breaking change +_No breaking changes_ + +## Checklist + +- [ ] Pull Request name has appropriate format (for example: "fix(dcd_dwc2): Resolved address selection when several phy are present") +- [ ] _Optional:_ README.md updated +- [ ] CI passed + +## Related issues +_No related issues_ diff --git a/.github/ci/.build_and_run_idf_examples_config.toml b/.github/ci/.build_and_run_idf_examples_config.toml new file mode 100644 index 0000000000..a213e3ad5d --- /dev/null +++ b/.github/ci/.build_and_run_idf_examples_config.toml @@ -0,0 +1,23 @@ +# Config file for build_and_run_idf_examples.yml workflow + +# This file contains configuration settings for the idf-build-apps tool, +# which is used to build and run example applications in the workflow. +# If you change the 'build_dir' value, make sure to update the corresponding +# Run step in the workflow, as it will need to reference the new build directory. + +paths = [ + "${IDF_PATH}/examples/peripherals/usb/device", # ESP-IDF USB Device examples path +] + +exclude = [ + "${IDF_PATH}/examples/peripherals/usb/device/cherryusb_serial_device", # Exclude cherryusb-based device examples +] + +recursive = true +manifest_file = "${IDF_PATH}/examples/peripherals/.build-test-rules.yml" +check_warnings = true +target = "all" +enable_preview_targets = true + +# Build related options (build_dir uses '@t' for target and '@w' for wildcard pattern (sdkconfig usually) +build_dir = "build_@t_@w" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index aa148eb79f..0000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,5 +0,0 @@ -**Describe the PR** -A clear and concise description of what this PR solve. - -**Additional context** -If applicable, add any other context about the PR and/or screenshots here. diff --git a/.github/workflows/build_and_run_esp_usb_test_apps.yml b/.github/workflows/build_and_run_esp_usb_test_apps.yml index c0a85b23a4..ee82f26aa7 100644 --- a/.github/workflows/build_and_run_esp_usb_test_apps.yml +++ b/.github/workflows/build_and_run_esp_usb_test_apps.yml @@ -1,4 +1,8 @@ -name: ESP-USB Test Apps +# This workflow builds and runs ESP-USB test applications for pull requests. +# It checks out the latest code from ESP-USB master, builds test apps using Espressif's IDF, +# uploads artifacts, and runs tests on self-hosted runners for supported targets. + +name: ESP-USB Test Apps [master] on: pull_request: @@ -8,12 +12,20 @@ jobs: build: name: Build strategy: + fail-fast: false matrix: - idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"] + idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"] runs-on: ubuntu-latest container: espressif/idf:${{ matrix.idf_ver }} env: - ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps + IDF_COMP_MAN_VER: "2.4.3" + IDF_BUILD_APPS_VER: "2.13.3" + # We are cloning esp-usb repo to get the test apps to build, the paths should be configured explicitly + ESP_USB_PATH: esp-usb + ESP_USB_CONFIG_FILE: esp-usb/.idf_build_apps.toml + ESP_USB_MANIFEST: esp-usb/.build-test-rules.yml + ESP_USB_IGNORE_WARNING_FILE: esp-usb/.ignore_build_warnings.txt + ESP_TINYUSB_TEST_APPS: esp-usb/device/esp_tinyusb/test_apps steps: - uses: actions/checkout@v4 with: @@ -25,57 +37,69 @@ jobs: shell: bash run: | . ${IDF_PATH}/export.sh - pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade + pip install --no-cache-dir idf-component-manager>=${{ env.IDF_COMP_MAN_VER }} idf-build-apps==${{ env.IDF_BUILD_APPS_VER }} pyyaml --upgrade export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function" export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes" export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}" python .github/ci/override_managed_component.py tinyusb . ${{ env.ESP_TINYUSB_TEST_APPS }}/*/ - cd esp-usb - idf-build-apps find --path ./device/esp_tinyusb/test_apps/ - idf-build-apps build --path ./device/esp_tinyusb/test_apps/ + 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 }} + 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 }} - uses: actions/upload-artifact@v4 with: - name: usb_test_app_bin_${{ matrix.idf_ver }} + # Test apps builds live under the repository workspace, we use workspace-relative glob + name: usb_device_test_app_bin_${{ matrix.idf_ver }} path: | - ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/bootloader/bootloader.bin - ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/partition_table/partition-table.bin - ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/test_app_*.bin - ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/test_app_*.elf - ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/flasher_args.json - ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/config/sdkconfig.json + **/build_esp*/bootloader/bootloader.bin + **/build_esp*/partition_table/partition-table.bin + **/build_esp*/test_app_*.bin + **/build_esp*/test_app_*.elf + **/build_esp*/flasher_args.json + **/build_esp*/config/sdkconfig.json if-no-files-found: error - # run-target: - # name: Run - # if: ${{ github.repository_owner == 'espressif' }} - # needs: build - # strategy: - # matrix: - # idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"] - # idf_target: ["esp32s2"] - # runner_tag: ["usb_device"] - # runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"] - # container: - # image: python:3.11-bookworm - # options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" - # env: - # ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps - # steps: - # - uses: actions/checkout@v4 - # - name: Clone esp-usb repository - # run: | - # git clone https://github.com/espressif/esp-usb.git - # - name: ⚙️ Install System tools - # run: | - # apt update - # apt install -y usbutils - # - name: Install Python packages - # env: - # PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" - # run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb - # - uses: actions/download-artifact@v4 - # with: - # name: usb_test_app_bin_${{ matrix.idf_ver }} - # path: ${{env.ESP_TINYUSB_TEST_APPS}} - # - name: Run USB Test App on target - # 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 }} + run-target: + name: Run + # Disable the job in forks + if: ${{ github.repository_owner == 'espressif' }} + needs: build + strategy: + fail-fast: false + matrix: + idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"] + idf_target: ["esp32s2", "esp32p4"] + sdkconfig: ["default"] + runner_tag: ["usb_device"] + exclude: + # Exclude esp32p4 for releases before IDF 5.3 for all runner tags (esp32p4 support starts in IDF 5.3) + - idf_ver: "release-v5.1" + idf_target: "esp32p4" + - idf_ver: "release-v5.2" + idf_target: "esp32p4" + runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"] + container: + image: python:3.11-bookworm + options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" + env: + ESP_USB_ROOT: esp-usb + ESP_USB_TEST_APPS_PATH: esp-usb/device/esp_tinyusb/test_apps + steps: + - uses: actions/checkout@v4 + - name: Clone esp-usb repository + run: | + git clone https://github.com/espressif/esp-usb.git + - name: ⚙️ Install System tools + run: | + apt update + apt install -y usbutils + - name: Install Python packages + env: + PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" + run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb + - uses: actions/download-artifact@v4 + with: + # No need to set the path manually. + # The test apps were built after cloning the esp-usb repo, + # and the build artifacts already have the correct folder structure. + name: usb_device_test_app_bin_${{ matrix.idf_ver }} + - name: Run on target + run: pytest ${{ env.ESP_USB_TEST_APPS_PATH }} --target=${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --build-dir=build_${{ matrix.idf_target }}_${{ matrix.sdkconfig }} diff --git a/.github/workflows/build_and_run_idf_examples.yml b/.github/workflows/build_and_run_idf_examples.yml index 2d1792fe78..6702c2c08d 100644 --- a/.github/workflows/build_and_run_idf_examples.yml +++ b/.github/workflows/build_and_run_idf_examples.yml @@ -6,56 +6,81 @@ on: jobs: build: + name: Build strategy: - matrix: - idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"] fail-fast: false + matrix: + idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"] runs-on: ubuntu-latest container: espressif/idf:${{ matrix.idf_ver }} env: - CONFIG_PATH: ${{ github.workspace }}/.github/ci/.idf_build_examples_config.toml + IDF_COMP_MAN_VER: "2.4.3" + IDF_BUILD_APPS_VER: "2.13.3" + CONFIG_PATH: ${{ github.workspace }}/.github/ci/.build_and_run_idf_examples_config.toml steps: - uses: actions/checkout@v4 - name: Install Python dependencies shell: bash run: | . ${IDF_PATH}/export.sh - pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade + pip install --no-cache-dir idf-component-manager>=${{ env.IDF_COMP_MAN_VER }} idf-build-apps==${{ env.IDF_BUILD_APPS_VER }} pyyaml --upgrade + - name: Build Network USB related examples + shell: bash + run: | + . ${IDF_PATH}/export.sh + # Hint: To build network example we just use default config and network build rules provided by IDF + export EXAMPLES_PATH="${IDF_PATH}/examples/network/sta2eth" + export MANIFEST_FILE="${IDF_PATH}/examples/network/.build-test-rules.yml" + python .github/ci/override_managed_component.py tinyusb . ${EXAMPLES_PATH} + idf-build-apps find -p ${EXAMPLES_PATH} -t esp32s2 --manifest-files ${MANIFEST_FILE} --manifest-rootpath ${IDF_PATH} + idf-build-apps build -p ${EXAMPLES_PATH} -t esp32s2 --manifest-files ${MANIFEST_FILE} --manifest-rootpath ${IDF_PATH} - name: Build USB Device examples shell: bash run: | . ${IDF_PATH}/export.sh python .github/ci/override_managed_component.py tinyusb . ${IDF_PATH}/examples/peripherals/usb/device/tusb_* - python .github/ci/override_managed_component.py tinyusb . ${IDF_PATH}/examples/network/sta2eth - cd ${IDF_PATH} - idf-build-apps find --config-file ${CONFIG_PATH} - idf-build-apps build --config-file ${CONFIG_PATH} + idf-build-apps find --config-file ${CONFIG_PATH} --manifest-rootpath ${IDF_PATH} + idf-build-apps build --config-file ${CONFIG_PATH} --manifest-rootpath ${IDF_PATH} - uses: actions/upload-artifact@v4 + env: + IDF_ROOT: "/opt/esp/idf" with: - # We upload only the USB Device example binaries to run them on the target - name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} + # We upload only USB Device example binaries to run them on the target + name: usb_device_examples_bin_${{ matrix.idf_ver }} path: | - /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/bootloader/bootloader.bin - /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/partition_table/partition-table.bin - /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/tusb_*.bin - /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/tusb_*.elf - /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/flasher_args.json - /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/config/sdkconfig.json + ${{ env.IDF_ROOT }}/**/build_esp*/bootloader/bootloader.bin + ${{ env.IDF_ROOT }}/**/build_esp*/partition_table/partition-table.bin + ${{ env.IDF_ROOT }}/**/build_esp*/tusb_*.bin + ${{ env.IDF_ROOT }}/**/build_esp*/tusb_*.elf + ${{ env.IDF_ROOT }}/**/build_esp*/flasher_args.json + ${{ env.IDF_ROOT }}/**/build_esp*/config/sdkconfig.json if-no-files-found: error run-target: - name: Run USB Device examples + name: Run + # Disable the job in forks if: ${{ github.repository_owner == 'espressif' }} needs: build strategy: fail-fast: false matrix: - idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5" , "latest"] - idf_target: ["esp32s2"] + idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"] + idf_target: ["esp32s2", "esp32p4"] runner_tag: ["usb_device"] + exclude: + # Exclude esp32p4 for releases before IDF 5.3 for all runner tags (esp32p4 support starts in IDF 5.3) + - idf_ver: "release-v5.1" + idf_target: "esp32p4" + - idf_ver: "release-v5.2" + idf_target: "esp32p4" runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"] container: + # We run on espressif/idf image as we need the code of examples to be present to run pytest image: espressif/idf:${{ matrix.idf_ver }} options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" + env: + # We do not use ${IDF_PATH} here, because it is not available during download of artifacts step + IDF_ROOT: "/opt/esp/idf" + IDF_EXAMPLES_PATH: "${IDF_PATH}/examples/peripherals/usb/device" steps: - name: ⚙️ Install System tools run: | @@ -65,16 +90,15 @@ jobs: env: PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" run: | - cd ${IDF_PATH} - . ./export.sh + . ${IDF_PATH}/export.sh pip install --no-cache-dir --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-jtag pytest-embedded-idf pyserial pyusb python-gitlab minio idf-build-apps idf_ci pytest_ignore_test_results pytest-timeout netifaces - uses: actions/download-artifact@v4 with: - name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} - path: /opt/esp/idf/examples/peripherals/usb/device - - name: Run USB Test App on target + # Need to set the path manually. + # The examples were built on a system files, which are not under the repository. + name: usb_device_examples_bin_${{ matrix.idf_ver }} + path: ${{ env.IDF_ROOT }} + - name: Run on target run: | - cd ${IDF_PATH} - . ./export.sh - export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device" - pytest ${EXAMPLES_PATH} --target ${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --ignore-result-cases=*ncm_example + . ${IDF_PATH}/export.sh + pytest ${{ env.IDF_EXAMPLES_PATH }} --target ${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --ignore-result-cases=*ncm_example --build-dir=build_${{ matrix.idf_target }} diff --git a/.github/workflows/build_iot_examples.yml b/.github/workflows/build_iot_examples.yml index 0c650c7aac..28c4341385 100644 --- a/.github/workflows/build_iot_examples.yml +++ b/.github/workflows/build_iot_examples.yml @@ -6,16 +6,19 @@ on: jobs: build: + name: Build strategy: matrix: - idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5", "latest"] + idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"] name: ["usb_uart_bridge"] runs-on: ubuntu-latest container: espressif/idf:${{ matrix.idf_ver }} env: - ESP_IOT_PATH: esp-iot-solution - MANIFEST_PATH: esp-iot-solution/examples/.build-rules.yml - EXAMPLE_PATH: esp-iot-solution/examples/usb/device/${{ matrix.name }} + IDF_COMP_MAN_VER: "2.4.3" + IDF_BUILD_APPS_VER: "2.13.3" + TARGET_PATH: esp-iot-solution + TARGET_MANIFEST_PATH: esp-iot-solution/examples/.build-rules.yml + TARGET_EXAMPLES_PATH: esp-iot-solution/examples/usb/device/${{ matrix.name }} steps: - uses: actions/checkout@v4 with: @@ -27,7 +30,7 @@ jobs: shell: bash run: | . ${IDF_PATH}/export.sh - pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade - python .github/ci/override_managed_component.py tinyusb . ${{ env.EXAMPLE_PATH }}/ - idf-build-apps find --paths ${{ env.EXAMPLE_PATH }} --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }} - idf-build-apps build --paths ${{ env.EXAMPLE_PATH }} --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }} + pip install --no-cache-dir idf-component-manager>=${{ env.IDF_COMP_MAN_VER }} idf-build-apps==${{ env.IDF_BUILD_APPS_VER }} pyyaml --upgrade + python .github/ci/override_managed_component.py tinyusb . ${{ env.TARGET_EXAMPLES_PATH }}/ + idf-build-apps find -p ${{ env.TARGET_EXAMPLES_PATH }} -t all --manifest-file ${{ env.TARGET_MANIFEST_PATH }} --manifest-rootpath ${{ env.TARGET_PATH }} + idf-build-apps build -p ${{ env.TARGET_EXAMPLES_PATH }} -t all --manifest-file ${{ env.TARGET_MANIFEST_PATH }} --manifest-rootpath ${{ env.TARGET_PATH }} diff --git a/hw/bsp/espressif/boards/family.c b/hw/bsp/espressif/boards/family.c index a837417f40..a29415cc0e 100644 --- a/hw/bsp/espressif/boards/family.c +++ b/hw/bsp/espressif/boards/family.c @@ -90,7 +90,7 @@ void board_init(void) { gpio_set_direction(BUTTON_PIN, GPIO_MODE_INPUT); gpio_set_pull_mode(BUTTON_PIN, BUTTON_STATE_ACTIVE ? GPIO_PULLDOWN_ONLY : GPIO_PULLUP_ONLY); -#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3, OPT_MCU_ESP32P4) +#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3, OPT_MCU_ESP32H4, OPT_MCU_ESP32P4) usb_init(); #endif diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c index 5c00cc358a..afc63a4981 100644 --- a/src/class/video/video_device.c +++ b/src/class/video/video_device.c @@ -644,7 +644,8 @@ static bool _negotiate_streaming_parameters(videod_streaming_interface_t const * tusb_desc_cs_video_fmt_t const *fmt = _find_desc_format(tu_desc_next(vs), end, fmtnum); tusb_desc_cs_video_frm_t const *frm = _find_desc_frame(tu_desc_next(fmt), end, frmnum); - uint_fast32_t interval, interval_ms; + uint_fast32_t interval = 0; + uint_fast32_t interval_ms = 0; switch (request) { case VIDEO_REQUEST_GET_MAX: { uint_fast32_t min_interval, max_interval; diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c index f10f0bdc33..20b499af8f 100644 --- a/src/portable/synopsys/dwc2/dcd_dwc2.c +++ b/src/portable/synopsys/dwc2/dcd_dwc2.c @@ -422,8 +422,9 @@ bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) { // Force device mode dwc2->gusbcfg = (dwc2->gusbcfg & ~GUSBCFG_FHMOD) | GUSBCFG_FDMOD; - // Clear A override, force B Valid - dwc2->gotgctl = (dwc2->gotgctl & ~GOTGCTL_AVALOEN) | GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL; + // No overrides + dwc2->gotgctl &= ~(GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL | GOTGCTL_VBVALOVAL); + #if CFG_TUSB_MCU == OPT_MCU_STM32N6 // No hardware detection of Vbus B-session is available on the STM32N6