diff --git a/.github/workflows/build_and_run_test_app_usb.yml b/.github/workflows/build_and_run_test_app_usb.yml index 2bcc4243..f6ce2f7c 100644 --- a/.github/workflows/build_and_run_test_app_usb.yml +++ b/.github/workflows/build_and_run_test_app_usb.yml @@ -59,13 +59,11 @@ jobs: idf_target: "esp32p4" - idf_ver: "release-v5.2" idf_target: "esp32p4" - - idf_ver: "release-v5.3" # TODO: enable IDF 5.3 once the docker image is updated - 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" --group-add plugdev + options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 diff --git a/device/esp_tinyusb/CHANGELOG.md b/device/esp_tinyusb/CHANGELOG.md index 3ed34ab0..85ed41dc 100644 --- a/device/esp_tinyusb/CHANGELOG.md +++ b/device/esp_tinyusb/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.5.0 (Unreleased) +## 1.5.0 - esp_tinyusb: Added DMA mode option to tinyusb DCD DWC2 configuration +- esp_tinyusb: Changed the default affinity mask of the task to CPU1 ## 1.4.5 diff --git a/device/esp_tinyusb/Kconfig b/device/esp_tinyusb/Kconfig index c12c79fa..0247e50d 100644 --- a/device/esp_tinyusb/Kconfig +++ b/device/esp_tinyusb/Kconfig @@ -55,6 +55,7 @@ menu "TinyUSB Stack" choice TINYUSB_TASK_AFFINITY prompt "TinyUSB task affinity" + default TINYUSB_TASK_AFFINITY_CPU1 if !FREERTOS_UNICORE default TINYUSB_TASK_AFFINITY_NO_AFFINITY depends on !TINYUSB_NO_DEFAULT_TASK help diff --git a/device/esp_tinyusb/idf_component.yml b/device/esp_tinyusb/idf_component.yml index 7aea4bee..1040d1bc 100644 --- a/device/esp_tinyusb/idf_component.yml +++ b/device/esp_tinyusb/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File description: Espressif's additions to TinyUSB documentation: "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_device.html" -version: "1.4.5" +version: "1.5.0" url: https://github.com/espressif/esp-usb/tree/master/device/esp_tinyusb dependencies: idf: '>=5.0' # IDF 4.x contains TinyUSB as submodule diff --git a/device/esp_tinyusb/test_apps/README.md b/device/esp_tinyusb/test_apps/README.md index a8d35595..a03e42ae 100644 --- a/device/esp_tinyusb/test_apps/README.md +++ b/device/esp_tinyusb/test_apps/README.md @@ -12,6 +12,8 @@ The main idea comes from this response on [stackoverflow](https://stackoverflow. - [`Docker tty script`](#docker-tty-script) - [`Logging`](#logging) - [`Running a docker container`](#running-a-docker-container) +- [`GitHub CI target runner setup`](#github-ci-target-runner-setup) +- [`GitLab CI target runner setup`](#gitlab-ci-target-runner-setup) ## UDEV rules @@ -101,9 +103,31 @@ crw-rw---- 1 root dialout 166, 1 Nov 13 10:26 /dev/ttyACM1 Run a Docker container with the following extra options: ``` sh -docker run --device-cgroup-rule='c 188:* rmw' --device-cgroup-rule='c 166:* rmw' --group-add plugdev --privileged .. +docker run --device-cgroup-rule='c 188:* rmw' --device-cgroup-rule='c 166:* rmw' --privileged .. ``` - `--device-cgroup-rule='c 188:* rmw'`: allow access to `ttyUSBx` (Major 188, all Minors) - `--device-cgroup-rule='c 166:* rmw'`: allow access to `ttyACMx` (Major 166, all Minors) -- `--group-add plugdev`: add the plugdev group + +## GitHub CI target runner setup + +To apply these changes to a GitHub target runner a `.yml` file used to run a Docker container for pytest must be modified. The Docker container is then run with the following options: + +``` yaml +container: + image: python:3.11-bookworm + options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" +``` + +## GitLab CI target runner setup + +To apply these changes to a GitLab runner the `config.toml` file located at `/etc/gitlab-runner/config.toml` on each GitLab target runner must be modified. + +According to GitLab's [documentation](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section) the `[runners.docker]` section of the `config.toml` file should include the `device_cgroup_rules` parameter: + +``` toml +[runners.docker] + ... + device_cgroup_rules = ["c 188:* rmw", "c 166:* rmw"] +``` +