Skip to content

Commit 1268d1a

Browse files
committed
update hil test and json (remove troublesome lpc54608), run hil test on ci with IAR build
1 parent 1abfa9a commit 1268d1a

File tree

6 files changed

+147
-176
lines changed

6 files changed

+147
-176
lines changed

.github/workflows/build_iar.yml

+77-74
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# Alphabetical order
3333
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
3434
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
35-
- 'stm32f0 stm32f1 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
35+
- 'stm32f0 stm32f1 stm32f4 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
3636
steps:
3737
- name: Clean workspace
3838
run: |
@@ -49,82 +49,85 @@ jobs:
4949
- name: Build
5050
run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar -DCMAKE_BUILD_TYPE=MinSizeRel
5151

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
52+
- name: Test on actual hardware (hardware in the loop)
5653
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
54+
python3 tools/hitl_test.py hitl_hfp.json
55+
56+
# # Upload binaries for hardware test with self-hosted
57+
# - name: Prepare stm32l412nucleo Artifacts
58+
# if: contains(matrix.family, 'stm32l4')
59+
# working-directory: ${{github.workspace}}/cmake-build/cmake-build-stm32l412nucleo
60+
# run: |
61+
# find device/ -name "*.elf" -exec mv {} ../../ \;
62+
#
63+
# - name: Upload Artifacts for stm32l412nucleo
64+
# if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
65+
# uses: actions/upload-artifact@v3
66+
# with:
67+
# name: stm32l4
68+
# path: |
69+
# *.elf
6670

6771
# ---------------------------------------
6872
# Hardware in the loop (HIL)
6973
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
70-
# - STM32L412 Nucleo with on-board jlink as ttyACM0
7174
# ---------------------------------------
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 -USB 774470029 -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
75+
# hw-stm32l412nucleo-test:
76+
# needs: cmake
77+
# runs-on: [self-hosted, Linux, X64, hifiphile]
78+
#
79+
# steps:
80+
# - name: Clean workspace
81+
# run: |
82+
# echo "Cleaning up previous run"
83+
# rm -rf "${{ github.workspace }}"
84+
# mkdir -p "${{ github.workspace }}"
85+
#
86+
# - name: Download stm32l4 Artifacts
87+
# uses: actions/download-artifact@v3
88+
# with:
89+
# name: stm32l4
90+
#
91+
# - name: Create flash.sh
92+
# run: |
93+
# echo > flash.sh 'echo halt > flash.jlink'
94+
# echo >> flash.sh 'echo r >> flash.jlink'
95+
# echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
96+
# echo >> flash.sh 'echo r >> flash.jlink'
97+
# echo >> flash.sh 'echo go >> flash.jlink'
98+
# echo >> flash.sh 'echo exit >> flash.jlink'
99+
# echo >> flash.sh 'cmdout=$(JLinkExe -USB 774470029 -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
100+
# echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
101+
# chmod +x flash.sh
102+
#
103+
# - name: Test cdc_dual_ports
104+
# run: |
105+
# ./flash.sh cdc_dual_ports.elf
106+
# while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
107+
# test -e /dev/ttyACM1 && echo "ttyACM1 exists"
108+
# test -e /dev/ttyACM2 && echo "ttyACM2 exists"
109+
#
110+
# # Debian does not auto mount usb drive. skip this test for now
111+
# - name: Test cdc_msc
112+
# if: false
113+
# run: |
114+
# ./flash.sh cdc_msc.elf
115+
# readme='/media/pi/TinyUSB MSC/README.TXT'
116+
# while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
117+
# test -e /dev/ttyACM1 && echo "ttyACM1 exists"
118+
# test -f "$readme" && echo "$readme exists"
119+
# cat "$readme"
120+
#
121+
# - name: Test dfu
122+
# run: |
123+
# ./flash.sh dfu.elf
124+
# while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
125+
# dfu-util -d cafe -a 0 -U dfu0
126+
# dfu-util -d cafe -a 1 -U dfu1
127+
# grep "TinyUSB DFU! - Partition 0" dfu0
128+
# grep "TinyUSB DFU! - Partition 1" dfu1
129+
#
130+
# - name: Test dfu_runtime
131+
# run: |
132+
# ./flash.sh dfu_runtime.elf
133+
# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

.idea/cmake.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/device/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ family_add_subdirectory(cdc_uac2)
1717
family_add_subdirectory(dfu)
1818
family_add_subdirectory(dfu_runtime)
1919
family_add_subdirectory(dynamic_configuration)
20+
family_add_subdirectory(hid_boot_interface)
2021
family_add_subdirectory(hid_composite)
2122
family_add_subdirectory(hid_composite_freertos)
2223
family_add_subdirectory(hid_generic_inout)

hw/bsp/lpc55/boards/lpcxpresso55s69/board.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set(MCU_VARIANT LPC55S69)
22
set(MCU_CORE LPC55S69_cm33_core0)
33

4-
set(JLINK_DEVICE LPC55S69)
4+
set(JLINK_DEVICE LPC55S69_M33_0)
55
set(PYOCD_TARGET LPC55S69)
66
set(NXPLINK_DEVICE LPC55S69:LPCXpresso55S69)
77

test/hitl/hitl_hfp.json

+5-79
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,18 @@
11
{
2-
"devices": [
2+
"boards": [
33
{
4+
"name": "stm32l412nucleo",
45
"uid": "41003B000E504E5457323020",
56
"debugger": "jlink",
67
"debugger_sn": "774470029",
7-
"device": "STM32L412KB",
8-
"tests": [
9-
{
10-
"name": "cdc_dual_ports",
11-
"firmware": "examples/device/cdc_dual_ports/_build/stm32l412nucleo/cdc_dual_ports.elf"
12-
},
13-
{
14-
"name": "cdc_msc",
15-
"firmware": "examples/device/cdc_msc/_build/stm32l412nucleo/cdc_msc.elf"
16-
},
17-
{
18-
"name": "dfu",
19-
"firmware": "examples/device/dfu/_build/stm32l412nucleo/dfu.elf"
20-
},
21-
{
22-
"name": "dfu_runtime",
23-
"firmware": "examples/device/dfu_runtime/_build/stm32l412nucleo/dfu_runtime.elf"
24-
},
25-
{
26-
"name": "hid_boot_interface",
27-
"firmware": "examples/device/hid_boot_interface/_build/stm32l412nucleo/hid_boot_interface.elf"
28-
},
29-
{
30-
"name": "board_test",
31-
"firmware": "examples/device/board_test/_build/stm32l412nucleo/board_test.elf"
32-
}
33-
]
8+
"cpu": "STM32L412KB"
349
},
3510
{
11+
"name": "stm32f746disco",
3612
"uid": "210041000C51343237303334",
3713
"debugger": "jlink",
3814
"debugger_sn": "770935966",
39-
"device": "STM32F746NG",
40-
"tests": [
41-
{
42-
"name": "cdc_dual_ports",
43-
"firmware": "examples/device/cdc_dual_ports/_build/stm32f746disco/cdc_dual_ports.elf"
44-
},
45-
{
46-
"name": "cdc_msc",
47-
"firmware": "examples/device/cdc_msc/_build/stm32f746disco/cdc_msc.elf"
48-
},
49-
{
50-
"name": "dfu",
51-
"firmware": "examples/device/dfu/_build/stm32f746disco/dfu.elf"
52-
},
53-
{
54-
"name": "dfu_runtime",
55-
"firmware": "examples/device/dfu_runtime/_build/stm32f746disco/dfu_runtime.elf"
56-
},
57-
{
58-
"name": "hid_boot_interface",
59-
"firmware": "examples/device/hid_boot_interface/_build/stm32f746disco/hid_boot_interface.elf"
60-
},
61-
{
62-
"name": "board_test",
63-
"firmware": "examples/device/board_test/_build/stm32f746disco/board_test.elf"
64-
}
65-
]
66-
},
67-
{
68-
"uid": "0123456789ABCDEF",
69-
"debugger": "jlink",
70-
"debugger_sn": "727600775",
71-
"device": "LPC54608J512",
72-
"tests": [
73-
{
74-
"name": "cdc_dual_ports",
75-
"firmware": "examples/device/cdc_dual_ports/_build/lpcxpresso54628/cdc_dual_ports.elf"
76-
},
77-
{
78-
"name": "dfu",
79-
"firmware": "examples/device/dfu/_build/lpcxpresso54628/dfu.elf"
80-
},
81-
{
82-
"name": "dfu_runtime",
83-
"firmware": "examples/device/dfu_runtime/_build/lpcxpresso54628/dfu_runtime.elf"
84-
},
85-
{
86-
"name": "board_test",
87-
"firmware": "examples/device/board_test/_build/lpcxpresso54628/board_test.elf"
88-
}
89-
]
15+
"cpu": "STM32F746NG"
9016
}
9117
]
9218
}

0 commit comments

Comments
 (0)