summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMengsk <[email protected]>2022-11-07 12:47:41 +0100
committerMengsk <[email protected]>2022-11-07 12:47:41 +0100
commit9d3d8fd5b0788b811ad283d10d37dfd1b1005224 (patch)
treef66b39fe968cc1a6e46e3074bbda9b907064bc15 /.github
parent1eae139aa94130a63ecc4725852cb69c02566c82 (diff)
parente434a1dc0584e841da1ae4ff525bbe81a0f5514b (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into bsp_412
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml17
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml4
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md14
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.yml49
-rw-r--r--.github/workflows/build_aarch64.yml13
-rw-r--r--.github/workflows/build_arm.yml155
-rw-r--r--.github/workflows/build_esp.yml18
-rw-r--r--.github/workflows/build_msp430.yml16
-rw-r--r--.github/workflows/build_renesas.yml18
-rw-r--r--.github/workflows/build_riscv.yml18
-rw-r--r--.github/workflows/trigger.yml6
11 files changed, 232 insertions, 96 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index fc41d8ff1..2958d3b12 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -60,11 +60,12 @@ body:
- type: textarea
attributes:
- label: Debug Log
+ label: Debug Log as txt file
placeholder: |
- TinyUSB debug log where the issue occurred as attached txt file, best with comments to explain the actual events.
-
- Note: To enable logging, add `LOG=3` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=3` in your tusb_config.h.
+ 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 readibility.
+ Note2: To enable logging, add `LOG=3` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=3` 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)
validations:
required: false
@@ -75,3 +76,11 @@ body:
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
+
+ - 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/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 735a5ef22..28fd27467 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,4 +1,8 @@
+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.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 562d3113b..000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-name: Feature Request
-about: Suggest an idea for this project
-title: ''
-labels: Feature 💡
-assignees: ''
-
----
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 000000000..19f403246
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,49 @@
+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/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml
index 0cc7a5de1..18989a5e9 100644
--- a/.github/workflows/build_aarch64.yml
+++ b/.github/workflows/build_aarch64.yml
@@ -18,19 +18,21 @@ jobs:
matrix:
family:
# Alphabetical order
- - 'raspberrypi4'
+ - 'broadcom_64bit'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -55,6 +57,9 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml
index dc4d9fcfb..53f73a48f 100644
--- a/.github/workflows/build_arm.yml
+++ b/.github/workflows/build_arm.yml
@@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Ruby
- uses: actions/setup-ruby@v1
+ uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Unit Tests
run: |
@@ -39,6 +39,7 @@ jobs:
matrix:
family:
# Alphabetical order
+ - 'broadcom_32bit'
- 'imxrt'
- 'lpc15'
- 'lpc18'
@@ -56,51 +57,43 @@ jobs:
- 'stm32f1'
- 'stm32f4'
- 'stm32f7'
+ - 'stm32g4'
- 'stm32h7'
- 'stm32l4'
+ - 'stm32wb'
- 'tm4c123'
- 'xmc4000'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+
+ - name: Install ARM GCC
+ uses: carlosperate/arm-none-eabi-gcc-action@v1
+ with:
+ release: '11.2-2022.02'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
- - name: Checkout pico-sdk
+ - name: Checkout pico-sdk for rp2040
if: matrix.family == 'rp2040'
run: |
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
- - name: Set Toolchain URL
- run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
-
- - name: Cache Toolchain
- uses: actions/cache@v2
- id: cache-toolchain
- with:
- path: ~/cache/
- key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
-
- - name: Install Toolchain
- if: steps.cache-toolchain.outputs.cache-hit != 'true'
- run: |
- mkdir -p ~/cache/toolchain
- wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
- tar -C ~/cache/toolchain -xaf toolchain.tar.gz
-
- - name: Set Toolchain Path
- run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
@@ -108,13 +101,28 @@ jobs:
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/*/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
+ # Following steps are for Hardware Test with self-hosted
+
+ - name: Prepare Artifacts
+ if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
+ run: find examples/ -name "*.elf" -exec mv {} . \;
+
+ - name: Upload Artifacts for Hardware Test
+ if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ matrix.family }}
+ path: |
+ *.elf
+
# ---------------------------------------
- # Build all no-family (opharned) boards
+ # Build all no-family (orphaned) boards
# ---------------------------------------
build-board:
runs-on: ubuntu-latest
@@ -131,33 +139,86 @@ jobs:
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+
+ - name: Install ARM GCC
+ uses: carlosperate/arm-none-eabi-gcc-action@v1
+ with:
+ release: '11.2-2022.02'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- - name: Set Toolchain URL
- run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
+ - name: Build
+ run: python3 tools/build_board.py ${{ matrix.example }}
- - name: Cache Toolchain
- uses: actions/cache@v2
- id: cache-toolchain
+ # ---------------------------------------
+ # Hardware in the loop (HIL)
+ # Current self-hosted instance is running on an RPI4 with
+ # - pico + pico-probe connected via USB
+ # - pico-probe is /dev/ttyACM0
+ # ---------------------------------------
+ hw-test:
+ # Limit the run to only hathach due to limited resource on RPI4
+ if: github.repository_owner == 'hathach'
+ needs: build-arm
+ runs-on: [self-hosted, Linux, ARM64]
+
+ steps:
+ - name: Clean workspace
+ run: |
+ echo "Cleaning up previous run"
+ rm -rf "${{ github.workspace }}"
+ mkdir -p "${{ github.workspace }}"
+
+ - name: Download rp2040 Artifacts
+ uses: actions/download-artifact@v3
with:
- path: ~/cache/
- key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }}
+ name: rp2040
- - name: Install Toolchain
- if: steps.cache-toolchain.outputs.cache-hit != 'true'
+ - name: Create flash.sh
run: |
- mkdir -p ~/cache/toolchain
- wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
- tar -C ~/cache/toolchain -xaf toolchain.tar.gz
+ touch flash.sh
+ chmod +x flash.sh
+ echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"'
- - name: Set Toolchain Path
- run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Test cdc_dual_ports
+ run: |
+ ./flash.sh cdc_dual_ports.elf
+ while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done
+ test -e /dev/ttyACM1 && echo "ttyACM1 exists"
+ test -e /dev/ttyACM2 && echo "ttyACM2 exists"
+
+ - name: Test cdc_msc
+ run: |
+ ./flash.sh cdc_msc.elf
+ readme='/media/pi/TinyUSB MSC/README.TXT'
+ while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done
+ test -e /dev/ttyACM1 && echo "ttyACM1 exists"
+ test -f "$readme" && echo "$readme exists"
+ cat "$readme"
+
+ - name: Test dfu
+ run: |
+ ./flash.sh dfu.elf
+ while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done
+ dfu-util -d cafe -a 0 -U dfu0
+ dfu-util -d cafe -a 1 -U dfu1
+ grep "TinyUSB DFU! - Partition 0" dfu0
+ grep "TinyUSB DFU! - Partition 1" dfu1
+
+ - name: Test dfu_runtime
+ run: |
+ ./flash.sh dfu_runtime.elf
+ while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
+
+# - name: Test hid_boot_interface
+# run: |
+# ./flash.sh hid_boot_interface.elf
+# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done
- - name: Build
- run: python3 tools/build_board.py ${{ matrix.example }}
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
index 15071b178..51d91de49 100644
--- a/.github/workflows/build_esp.yml
+++ b/.github/workflows/build_esp.yml
@@ -18,20 +18,23 @@ jobs:
# ESP32-S2
- 'espressif_saola_1'
# ESP32-S3
- - 'espressif_addax_1'
+ #- 'espressif_s3_devkitm'
+ # S3 compile error with "dangerous relocation: call8: call target out of range: memcpy"
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Pull ESP-IDF docker
run: docker pull espressif/idf:latest
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -42,7 +45,8 @@ jobs:
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -maxdepth 3 -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -maxdepth 3 -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml
index 98dc36cd9..b43d9e740 100644
--- a/.github/workflows/build_msp430.yml
+++ b/.github/workflows/build_msp430.yml
@@ -18,16 +18,16 @@ jobs:
- 'msp430'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -52,13 +52,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml
index 6eb042d72..d212708f7 100644
--- a/.github/workflows/build_renesas.yml
+++ b/.github/workflows/build_renesas.yml
@@ -18,16 +18,18 @@ jobs:
- 'rx'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -53,13 +55,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml
index 0c7b2d154..96b8c676b 100644
--- a/.github/workflows/build_riscv.yml
+++ b/.github/workflows/build_riscv.yml
@@ -19,16 +19,18 @@ jobs:
- 'gd32vf103'
steps:
- name: Setup Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
- name: Checkout TinyUSB
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Checkout common submodules in lib
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
- name: Checkout hathach/linkermap
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: hathach/linkermap
path: linkermap
@@ -53,13 +55,17 @@ jobs:
- name: Set Toolchain Path
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
+ - name: Get Dependencies
+ run: python3 tools/get_dependencies.py ${{ matrix.family }}
+
- name: Build
run: python3 tools/build_family.py ${{ matrix.family }}
- name: Linker Map
run: |
pip install linkermap/
- for ex in `ls -d examples/device/*/`; do \
- find ${ex} -name *.map -print -quit | \
- xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
+ # find -quit to only print linkermap of 1 board per example
+ for ex in `ls -d examples/device/*/`
+ do
+ find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
done
diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml
index 40750a2f9..e434ca238 100644
--- a/.github/workflows/trigger.yml
+++ b/.github/workflows/trigger.yml
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Push to tinyusb_src
run: |
@@ -55,4 +55,6 @@ jobs:
git push origin ${{ github.event.release.tag_name }}
# Send POST reqwuest to release https://docs.github.com/en/rest/reference/repos#create-a-release
- curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "${{ github.event.release.body }}", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases
+ bb={{ github.event.release.body }}
+ bb=${bb//\n/\\\n}
+ curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "$bb", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases