Skip to content

Commit 9554a35

Browse files
authored
Merge branch 'hathach:master' into blackf407VE
2 parents 7d45a43 + f5d0510 commit 9554a35

File tree

208 files changed

+2741
-3877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+2741
-3877
lines changed

.github/workflows/build_arm.yml

Lines changed: 68 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,18 @@ jobs:
3434
family:
3535
# Alphabetical order
3636
- 'broadcom_32bit'
37-
- 'kinetis_k32l kinetis_kl'
37+
- 'kinetis_k32l2'
3838
- 'lpc11 lpc13 lpc15 lpc17'
39-
- 'lpc51 lpc54 lpc55'
39+
- 'lpc51 lpc54'
4040
- 'mm32 msp432e4'
4141
- 'nrf'
4242
- 'ra'
4343
- 'samd11 samd21'
4444
- 'samd51 same5x'
4545
- 'saml2x'
46-
- 'stm32f0 stm32f1 stm32f2 stm32f3'
46+
- 'stm32f2 stm32f3'
4747
- 'stm32f4'
48-
- 'stm32f7'
49-
- 'stm32h7'
50-
- 'stm32l0 stm32l4 stm32u5 stm32wb'
48+
- 'stm32l0 stm32u5 stm32wb'
5149
- 'tm4c123 xmc4000'
5250
steps:
5351
- name: Setup Python
@@ -103,67 +101,67 @@ jobs:
103101
path: |
104102
*.elf
105103
106-
# ---------------------------------------
107-
# Hardware in the loop (HIL)
108-
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
109-
# - STM32L412 Nucleo with on-board jlink as ttyACM0
110-
# ---------------------------------------
111-
hw-stm32l412nucleo-test:
112-
needs: build-arm
113-
runs-on: [self-hosted, Linux, X64, hifiphile]
114-
115-
steps:
116-
- name: Clean workspace
117-
run: |
118-
echo "Cleaning up previous run"
119-
rm -rf "${{ github.workspace }}"
120-
mkdir -p "${{ github.workspace }}"
121-
122-
- name: Download stm32l4 Artifacts
123-
uses: actions/download-artifact@v3
124-
with:
125-
name: stm32l4
126-
127-
- name: Create flash.sh
128-
run: |
129-
echo > flash.sh 'echo halt > flash.jlink'
130-
echo >> flash.sh 'echo r >> flash.jlink'
131-
echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
132-
echo >> flash.sh 'echo r >> flash.jlink'
133-
echo >> flash.sh 'echo go >> flash.jlink'
134-
echo >> flash.sh 'echo exit >> flash.jlink'
135-
echo >> flash.sh 'cmdout=$(JLinkExe -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
136-
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
137-
chmod +x flash.sh
138-
139-
- name: Test cdc_dual_ports
140-
run: |
141-
./flash.sh cdc_dual_ports.elf
142-
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
143-
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
144-
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
145-
146-
# Debian does not auto mount usb drive. skip this test for now
147-
- name: Test cdc_msc
148-
if: false
149-
run: |
150-
./flash.sh cdc_msc.elf
151-
readme='/media/pi/TinyUSB MSC/README.TXT'
152-
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
153-
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
154-
test -f "$readme" && echo "$readme exists"
155-
cat "$readme"
156-
157-
- name: Test dfu
158-
run: |
159-
./flash.sh dfu.elf
160-
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
161-
dfu-util -d cafe -a 0 -U dfu0
162-
dfu-util -d cafe -a 1 -U dfu1
163-
grep "TinyUSB DFU! - Partition 0" dfu0
164-
grep "TinyUSB DFU! - Partition 1" dfu1
165-
166-
- name: Test dfu_runtime
167-
run: |
168-
./flash.sh dfu_runtime.elf
169-
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
104+
# # ---------------------------------------
105+
# # Hardware in the loop (HIL)
106+
# # Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
107+
# # - STM32L412 Nucleo with on-board jlink as ttyACM0
108+
# # ---------------------------------------
109+
# hw-stm32l412nucleo-test:
110+
# needs: build-arm
111+
# runs-on: [self-hosted, Linux, X64, hifiphile]
112+
#
113+
# steps:
114+
# - name: Clean workspace
115+
# run: |
116+
# echo "Cleaning up previous run"
117+
# rm -rf "${{ github.workspace }}"
118+
# mkdir -p "${{ github.workspace }}"
119+
#
120+
# - name: Download stm32l4 Artifacts
121+
# uses: actions/download-artifact@v3
122+
# with:
123+
# name: stm32l4
124+
#
125+
# - name: Create flash.sh
126+
# run: |
127+
# echo > flash.sh 'echo halt > flash.jlink'
128+
# echo >> flash.sh 'echo r >> flash.jlink'
129+
# echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
130+
# echo >> flash.sh 'echo r >> flash.jlink'
131+
# echo >> flash.sh 'echo go >> flash.jlink'
132+
# echo >> flash.sh 'echo exit >> flash.jlink'
133+
# echo >> flash.sh 'cmdout=$(JLinkExe -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
134+
# echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
135+
# chmod +x flash.sh
136+
#
137+
# - name: Test cdc_dual_ports
138+
# run: |
139+
# ./flash.sh cdc_dual_ports.elf
140+
# while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
141+
# test -e /dev/ttyACM1 && echo "ttyACM1 exists"
142+
# test -e /dev/ttyACM2 && echo "ttyACM2 exists"
143+
#
144+
# # Debian does not auto mount usb drive. skip this test for now
145+
# - name: Test cdc_msc
146+
# if: false
147+
# run: |
148+
# ./flash.sh cdc_msc.elf
149+
# readme='/media/pi/TinyUSB MSC/README.TXT'
150+
# while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
151+
# test -e /dev/ttyACM1 && echo "ttyACM1 exists"
152+
# test -f "$readme" && echo "$readme exists"
153+
# cat "$readme"
154+
#
155+
# - name: Test dfu
156+
# run: |
157+
# ./flash.sh dfu.elf
158+
# while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
159+
# dfu-util -d cafe -a 0 -U dfu0
160+
# dfu-util -d cafe -a 1 -U dfu1
161+
# grep "TinyUSB DFU! - Partition 0" dfu0
162+
# grep "TinyUSB DFU! - Partition 1" dfu1
163+
#
164+
# - name: Test dfu_runtime
165+
# run: |
166+
# ./flash.sh dfu_runtime.elf
167+
# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

.github/workflows/build_iar.yml

Lines changed: 82 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,6 @@ concurrency:
2323
cancel-in-progress: true
2424

2525
jobs:
26-
makefile:
27-
runs-on: [self-hosted, Linux, X64, hifiphile]
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
family:
32-
# Alphabetical order
33-
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
34-
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
35-
- 'stm32f0 stm32f1 stm32f7 stm32l4'
36-
steps:
37-
- name: Clean workspace
38-
run: |
39-
echo "Cleaning up previous run"
40-
rm -rf "${{ github.workspace }}"
41-
mkdir -p "${{ github.workspace }}"
42-
43-
- name: Checkout TinyUSB
44-
uses: actions/checkout@v3
45-
46-
- name: Get Dependencies
47-
run: python3 tools/get_deps.py ${{ matrix.family }}
48-
49-
- name: Build
50-
run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm
51-
5226
cmake:
5327
runs-on: [self-hosted, Linux, X64, hifiphile]
5428
strategy:
@@ -58,7 +32,7 @@ jobs:
5832
# Alphabetical order
5933
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
6034
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
61-
- 'stm32g0 stm32g4 stm32h7'
35+
- 'stm32f0 stm32f1 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
6236
steps:
6337
- name: Clean workspace
6438
run: |
@@ -73,4 +47,84 @@ jobs:
7347
run: python3 tools/get_deps.py ${{ matrix.family }}
7448

7549
- name: Build
76-
run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar
50+
run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar -DCMAKE_BUILD_TYPE=MinSizeRel
51+
52+
# Upload binaries for hardware test with self-hosted
53+
- name: Prepare stm32l412nucleo Artifacts
54+
if: contains(matrix.family, 'stm32l4')
55+
working-directory: ${{github.workspace}}/cmake-build/cmake-build-stm32l412nucleo
56+
run: |
57+
find device/ -name "*.elf" -exec mv {} ../../ \;
58+
59+
- name: Upload Artifacts for stm32l412nucleo
60+
if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
61+
uses: actions/upload-artifact@v3
62+
with:
63+
name: stm32l4
64+
path: |
65+
*.elf
66+
67+
# ---------------------------------------
68+
# Hardware in the loop (HIL)
69+
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
70+
# - STM32L412 Nucleo with on-board jlink as ttyACM0
71+
# ---------------------------------------
72+
hw-stm32l412nucleo-test:
73+
needs: cmake
74+
runs-on: [self-hosted, Linux, X64, hifiphile]
75+
76+
steps:
77+
- name: Clean workspace
78+
run: |
79+
echo "Cleaning up previous run"
80+
rm -rf "${{ github.workspace }}"
81+
mkdir -p "${{ github.workspace }}"
82+
83+
- name: Download stm32l4 Artifacts
84+
uses: actions/download-artifact@v3
85+
with:
86+
name: stm32l4
87+
88+
- name: Create flash.sh
89+
run: |
90+
echo > flash.sh 'echo halt > flash.jlink'
91+
echo >> flash.sh 'echo r >> flash.jlink'
92+
echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
93+
echo >> flash.sh 'echo r >> flash.jlink'
94+
echo >> flash.sh 'echo go >> flash.jlink'
95+
echo >> flash.sh 'echo exit >> flash.jlink'
96+
echo >> flash.sh 'cmdout=$(JLinkExe -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
97+
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
98+
chmod +x flash.sh
99+
100+
- name: Test cdc_dual_ports
101+
run: |
102+
./flash.sh cdc_dual_ports.elf
103+
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
104+
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
105+
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
106+
107+
# Debian does not auto mount usb drive. skip this test for now
108+
- name: Test cdc_msc
109+
if: false
110+
run: |
111+
./flash.sh cdc_msc.elf
112+
readme='/media/pi/TinyUSB MSC/README.TXT'
113+
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
114+
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
115+
test -f "$readme" && echo "$readme exists"
116+
cat "$readme"
117+
118+
- name: Test dfu
119+
run: |
120+
./flash.sh dfu.elf
121+
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
122+
dfu-util -d cafe -a 0 -U dfu0
123+
dfu-util -d cafe -a 1 -U dfu1
124+
grep "TinyUSB DFU! - Partition 0" dfu0
125+
grep "TinyUSB DFU! - Partition 1" dfu1
126+
127+
- name: Test dfu_runtime
128+
run: |
129+
./flash.sh dfu_runtime.elf
130+
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

.github/workflows/cmake_arm.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ jobs:
3333
matrix:
3434
family:
3535
# Alphabetical order
36+
- 'imxrt'
37+
- 'kinetis_kl'
3638
- 'lpc18'
39+
- 'lpc55'
3740
- 'mcx'
38-
- 'imxrt'
3941
- 'rp2040'
42+
- 'stm32f0'
43+
- 'stm32f1'
44+
- 'stm32f7'
4045
- 'stm32g0'
4146
- 'stm32g4'
47+
- 'stm32h7'
48+
- 'stm32l4'
4249
steps:
4350
- name: Setup Python
4451
uses: actions/setup-python@v4
@@ -68,7 +75,7 @@ jobs:
6875
run: python3 tools/get_deps.py ${{ matrix.family }}
6976

7077
- name: Build
71-
run: python tools/build_cmake.py ${{ matrix.family }}
78+
run: python tools/build_cmake.py ${{ matrix.family }} -DCMAKE_BUILD_TYPE=MinSizeRel
7279
env:
7380
# for rp2040, there is no harm if defined for other families
7481
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk

.gitmodules

Whitespace-only changes.

.idea/cmake.xml

Lines changed: 23 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Please make sure you understand all the license term for files you use
138138
in your project.
139139

140140

141-
.. |Build Status| image:: https://github.com/hathach/tinyusb/workflows/Build/badge.svg
141+
.. |Build Status| image:: https://github.com/hathach/tinyusb/actions/workflows/cmake_arm.yml/badge.svg
142142
:target: https://github.com/hathach/tinyusb/actions
143143
.. |Documentation Status| image:: https://readthedocs.org/projects/tinyusb/badge/?version=latest
144144
:target: https://docs.tinyusb.org/en/latest/?badge=latest

examples/device/audio_4_channel_mic/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

0 commit comments

Comments
 (0)