Skip to content

Commit

Permalink
Merge branch 'master' into add-format-MSC-host
Browse files Browse the repository at this point in the history
  • Loading branch information
igi540 authored Dec 9, 2024
2 parents e056e9b + e5feb3f commit 308f9cd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build_and_run_test_app_usb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion device/esp_tinyusb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions device/esp_tinyusb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion device/esp_tinyusb/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
28 changes: 26 additions & 2 deletions device/esp_tinyusb/test_apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"]
```


0 comments on commit 308f9cd

Please sign in to comment.