Skip to content

Commit 069e1ef

Browse files
authored
Merge pull request hathach#2084 from hathach/more-build2
More build2
2 parents 23c8670 + 59ad5c5 commit 069e1ef

File tree

36 files changed

+600
-205
lines changed

36 files changed

+600
-205
lines changed

.github/workflows/build_aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
7171

7272
- name: Get Dependencies
73-
run: python3 tools/get_family_deps.py ${{ matrix.family }}
73+
run: python3 tools/get_deps.py ${{ matrix.family }}
7474

7575
- name: Build
7676
run: python3 tools/build_family.py ${{ matrix.family }}

.github/workflows/build_arm.yml

Lines changed: 4 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ jobs:
3434
family:
3535
# Alphabetical order
3636
- 'broadcom_32bit'
37-
- 'kinetis_k32 kinetis_kl'
38-
- 'lpc11 lpc13 lpc15 lpc17 lpc18'
37+
- 'kinetis_k32l kinetis_kl'
38+
- 'lpc11 lpc13 lpc15 lpc17'
3939
- 'lpc51 lpc54 lpc55'
4040
- 'mm32 msp432e4'
4141
- 'nrf'
4242
- 'ra'
43-
- 'rp2040'
4443
- 'samd11 samd21'
4544
- 'samd51 same5x'
4645
- 'saml2x'
@@ -77,7 +76,7 @@ jobs:
7776
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
7877
7978
- name: Get Dependencies
80-
run: python3 tools/get_family_deps.py ${{ matrix.family }}
79+
run: python3 tools/get_deps.py ${{ matrix.family }}
8180

8281
- name: Build
8382
run: python3 tools/build_family.py ${{ matrix.family }}
@@ -91,24 +90,11 @@ jobs:
9190
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
9291
done
9392
94-
# Upload binaries for rp2040/stm32l412nucleo hardware test with self-hosted
95-
96-
- name: Prepare rp2040 Artifacts
97-
if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
98-
run: find examples/ -name "*.elf" -exec mv {} . \;
99-
93+
# Upload binaries for hardware test with self-hosted
10094
- name: Prepare stm32l412nucleo Artifacts
10195
if: contains(matrix.family, 'stm32l4')
10296
run: find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} . \;
10397

104-
- name: Upload Artifacts for rp2040
105-
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
106-
uses: actions/upload-artifact@v3
107-
with:
108-
name: rp2040
109-
path: |
110-
*.elf
111-
11298
- name: Upload Artifacts for stm32l412nucleo
11399
if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
114100
uses: actions/upload-artifact@v3
@@ -117,66 +103,6 @@ jobs:
117103
path: |
118104
*.elf
119105
120-
# ---------------------------------------
121-
# Hardware in the loop (HIL)
122-
# Current self-hosted instance is running on an RPI4 with
123-
# - pico + pico-probe connected via USB
124-
# - pico-probe is /dev/ttyACM0
125-
# ---------------------------------------
126-
hw-rp2040-test:
127-
# run only with hathach's commit due to limited resource on RPI4
128-
if: github.repository_owner == 'hathach'
129-
needs: build-arm
130-
runs-on: [self-hosted, Linux, ARM64, rp2040]
131-
132-
steps:
133-
- name: Clean workspace
134-
run: |
135-
echo "Cleaning up previous run"
136-
rm -rf "${{ github.workspace }}"
137-
mkdir -p "${{ github.workspace }}"
138-
139-
- name: Download rp2040 Artifacts
140-
uses: actions/download-artifact@v3
141-
with:
142-
name: rp2040
143-
144-
- name: Create flash.sh
145-
run: |
146-
echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
147-
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
148-
chmod +x flash.sh
149-
150-
- name: Test cdc_dual_ports
151-
run: |
152-
./flash.sh cdc_dual_ports.elf
153-
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
154-
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
155-
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
156-
157-
- name: Test cdc_msc
158-
run: |
159-
./flash.sh cdc_msc.elf
160-
readme='/media/pi/TinyUSB MSC/README.TXT'
161-
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
162-
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
163-
test -f "$readme" && echo "$readme exists"
164-
cat "$readme"
165-
166-
- name: Test dfu
167-
run: |
168-
./flash.sh dfu.elf
169-
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
170-
dfu-util -d cafe -a 0 -U dfu0
171-
dfu-util -d cafe -a 1 -U dfu1
172-
grep "TinyUSB DFU! - Partition 0" dfu0
173-
grep "TinyUSB DFU! - Partition 1" dfu1
174-
175-
- name: Test dfu_runtime
176-
run: |
177-
./flash.sh dfu_runtime.elf
178-
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
179-
180106
# ---------------------------------------
181107
# Hardware in the loop (HIL)
182108
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user

.github/workflows/build_iar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@v3
4545

4646
- name: Get Dependencies
47-
run: python3 tools/get_family_deps.py ${{ matrix.family }}
47+
run: python3 tools/get_deps.py ${{ matrix.family }}
4848

4949
- name: Build
5050
run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm

.github/workflows/build_msp430.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
6969

7070
- name: Get Dependencies
71-
run: python3 tools/get_family_deps.py ${{ matrix.family }}
71+
run: python3 tools/get_deps.py ${{ matrix.family }}
7272

7373
- name: Build
7474
run: python3 tools/build_family.py ${{ matrix.family }}

.github/workflows/build_renesas.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
6969

7070
- name: Get Dependencies
71-
run: python3 tools/get_family_deps.py ${{ matrix.family }}
71+
run: python3 tools/get_deps.py ${{ matrix.family }}
7272

7373
- name: Build
7474
run: python3 tools/build_family.py ${{ matrix.family }}

.github/workflows/build_riscv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
7070

7171
- name: Get Dependencies
72-
run: python3 tools/get_family_deps.py ${{ matrix.family }}
72+
run: python3 tools/get_deps.py ${{ matrix.family }}
7373

7474
- name: Build
7575
run: python3 tools/build_family.py ${{ matrix.family }}

.github/workflows/cmake_arm.yml

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
family:
35-
# Alphabetical order
36-
- 'mcx'
37-
- 'imxrt'
35+
# Alphabetical order
36+
- 'lpc18'
37+
- 'mcx'
38+
- 'imxrt'
39+
- 'rp2040'
3840
steps:
3941
- name: Setup Python
4042
uses: actions/setup-python@v4
@@ -52,8 +54,96 @@ jobs:
5254
- name: Checkout TinyUSB
5355
uses: actions/checkout@v3
5456

57+
- name: Checkout pico-sdk for rp2040
58+
if: matrix.family == 'rp2040'
59+
uses: actions/checkout@v3
60+
with:
61+
repository: raspberrypi/pico-sdk
62+
ref: develop
63+
path: pico-sdk
64+
5565
- name: Get Dependencies
5666
run: python3 tools/get_deps.py ${{ matrix.family }}
5767

5868
- name: Build
5969
run: python tools/build_cmake.py ${{ matrix.family }}
70+
env:
71+
# for rp2040, there is no harm if defined for other families
72+
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
73+
74+
# Upload binaries for hardware test with self-hosted
75+
- name: Prepare rp2040 Artifacts
76+
if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
77+
working-directory: ${{github.workspace}}/cmake-build-ci-raspberry_pi_pico
78+
run: |
79+
find device/ -name "*.elf" -exec mv {} ../ \;
80+
# find host/ -name "*.elf" -exec mv {} ../ \;
81+
# find dual/ -name "*.elf" -exec mv {} ../ \;
82+
83+
- name: Upload Artifacts for rp2040
84+
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
85+
uses: actions/upload-artifact@v3
86+
with:
87+
name: rp2040
88+
path: |
89+
*.elf
90+
91+
# ---------------------------------------
92+
# Hardware in the loop (HIL)
93+
# Current self-hosted instance is running on an RPI4 with
94+
# - pico + pico-probe connected via USB
95+
# - pico-probe is /dev/ttyACM0
96+
# ---------------------------------------
97+
hw-rp2040-test:
98+
# run only with hathach's commit due to limited resource on RPI4
99+
if: github.repository_owner == 'hathach'
100+
needs: build-arm
101+
runs-on: [self-hosted, Linux, ARM64, rp2040]
102+
103+
steps:
104+
- name: Clean workspace
105+
run: |
106+
echo "Cleaning up previous run"
107+
rm -rf "${{ github.workspace }}"
108+
mkdir -p "${{ github.workspace }}"
109+
110+
- name: Download rp2040 Artifacts
111+
uses: actions/download-artifact@v3
112+
with:
113+
name: rp2040
114+
115+
- name: Create flash.sh
116+
run: |
117+
echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
118+
echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
119+
chmod +x flash.sh
120+
121+
- name: Test cdc_dual_ports
122+
run: |
123+
./flash.sh cdc_dual_ports.elf
124+
while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
125+
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
126+
test -e /dev/ttyACM2 && echo "ttyACM2 exists"
127+
128+
- name: Test cdc_msc
129+
run: |
130+
./flash.sh cdc_msc.elf
131+
readme='/media/pi/TinyUSB MSC/README.TXT'
132+
while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
133+
test -e /dev/ttyACM1 && echo "ttyACM1 exists"
134+
test -f "$readme" && echo "$readme exists"
135+
cat "$readme"
136+
137+
- name: Test dfu
138+
run: |
139+
./flash.sh dfu.elf
140+
while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
141+
dfu-util -d cafe -a 0 -U dfu0
142+
dfu-util -d cafe -a 1 -U dfu1
143+
grep "TinyUSB DFU! - Partition 0" dfu0
144+
grep "TinyUSB DFU! - Partition 1" dfu1
145+
146+
- name: Test dfu_runtime
147+
run: |
148+
./flash.sh dfu_runtime.elf
149+
while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

examples/device/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ family_add_subdirectory(hid_generic_inout)
2222
family_add_subdirectory(hid_multiple_interface)
2323
family_add_subdirectory(midi_test)
2424
family_add_subdirectory(msc_dual_lun)
25-
26-
# FIXME temp skip net_lwip_webserver for imxrt for now
27-
if (NOT ${FAMILY} STREQUAL "imxrt" AND NOT ${FAMILY} STREQUAL "mcx")
28-
family_add_subdirectory(net_lwip_webserver)
29-
endif()
30-
25+
family_add_subdirectory(net_lwip_webserver)
3126
family_add_subdirectory(uac2_headset)
3227
family_add_subdirectory(usbtmc)
3328
family_add_subdirectory(video_capture)

0 commit comments

Comments
 (0)