summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-08-01 13:00:38 +0700
committerhathach <[email protected]>2024-08-01 13:00:38 +0700
commit5fa03dd906574e775ec025b12ee6c1bc490d87b9 (patch)
treebb7fa87b6ba8304ecb1c050170b3d7491022dcf6
parentc60934eedcc363f320cb66695f0034312094bfd8 (diff)
add stm32g0 (fsdev 2k) to hil pool
remove esp32s3 since cp210x cause usb bus issue in the long run
-rw-r--r--.github/workflows/build.yml4
-rw-r--r--.github/workflows/hil_test.yml14
-rw-r--r--test/hil/hil_test.py10
-rw-r--r--test/hil/rpi.json53
4 files changed, 48 insertions, 33 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 712c7dd43..fda7f0294 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -120,10 +120,8 @@ jobs:
fail-fast: false
matrix:
board:
- # ESP32-S2
- 'espressif_kaluga_1'
- # ESP32-S3 skip since devkitm is also compiled in hil-test workflow
- #- 'espressif_s3_devkitm'
+ - 'espressif_s3_devkitm'
with:
build-system: 'cmake'
toolchain: 'esp-idf'
diff --git a/.github/workflows/hil_test.yml b/.github/workflows/hil_test.yml
index 51227d408..a95bd9bb8 100644
--- a/.github/workflows/hil_test.yml
+++ b/.github/workflows/hil_test.yml
@@ -66,9 +66,11 @@ jobs:
cmake-build/cmake-build-*/*/*/*.bin
# ---------------------------------------
- # Build Espressif
+ # Build Espressif (skipped since CP210x cause USB bus issue)
+ # cp210x ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb status: -71
# ---------------------------------------
build-esp:
+ if: false
runs-on: ubuntu-latest
outputs:
BOARDS_LIST: ${{ steps.parse_hil_json.outputs.BOARDS_LIST }}
@@ -121,10 +123,10 @@ jobs:
if: github.repository_owner == 'hathach'
needs:
- build
- - build-esp
+ #- build-esp
runs-on: [self-hosted, ARM64, rpi, hardware-in-the-loop]
env:
- BOARDS_LIST: "${{ needs.build.outputs.BOARDS_LIST }} ${{ needs.build-esp.outputs.BOARDS_LIST }}"
+ BOARDS_LIST: "${{ needs.build-esp.outputs.BOARDS_LIST }} ${{ needs.build.outputs.BOARDS_LIST }}"
steps:
- name: Clean workspace
run: |
@@ -135,9 +137,9 @@ jobs:
# USB bus on rpi is not stable, reset it before testing
# - name: Reset USB bus
# run: |
-# # reset VIA Labs 2.0 hub
-# sudo usbreset 001/002
-# lsusb -t
+# echo "1-2" | sudo tee /sys/bus/usb/drivers/usb/unbind
+# sleep 5
+# echo "1-2" | sudo tee /sys/bus/usb/drivers/usb/bind
- name: Checkout TinyUSB
uses: actions/checkout@v4
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index e2a2f01a0..bda66a2b5 100644
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -138,10 +138,15 @@ def flash_jlink(board, firmware):
def flash_stlink(board, firmware):
- #ret = run_cmd(f'st-flash --serial {board["flasher_sn"]} write {firmware}.bin 0x08000000')
ret = run_cmd(f'STM32_Programmer_CLI --connect port=swd sn={board["flasher_sn"]} --write {firmware}.elf --go')
return ret
+
+def flash_stflash(board, firmware):
+ ret = run_cmd(f'st-flash --serial {board["flasher_sn"]} write {firmware}.bin 0x8000000')
+ return ret
+
+
def flash_openocd(board, firmware):
ret = run_cmd(f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware}.elf reset exit"')
return ret
@@ -378,7 +383,8 @@ def main():
if not os.path.exists(fw_dir):
fw_dir = f'examples/cmake-build-{name}/device/{test}'
fw_name = f'{fw_dir}/{test}'
- print(f' {test} ...', end='')
+ print(f' {test} ... ', end='')
+ sys.stdout.flush()
if not os.path.exists(fw_dir):
print('Skip')
diff --git a/test/hil/rpi.json b/test/hil/rpi.json
index dae3094b5..4d9b0f216 100644
--- a/test/hil/rpi.json
+++ b/test/hil/rpi.json
@@ -1,13 +1,6 @@
{
"boards": [
{
- "name": "raspberry_pi_pico",
- "uid": "E6614C311B764A37",
- "flasher": "openocd",
- "flasher_sn": "E6614103E72C1D2F",
- "flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\""
- },
- {
"name": "feather_nrf52840_express",
"uid": "1F0479CD0F764471",
"flasher": "jlink",
@@ -22,16 +15,6 @@
"flasher_args": "-f interface/cmsis-dap.cfg -f target/atsame5x.cfg -c \"adapter speed 5000\""
},
{
- "name": "espressif_s3_devkitm",
- "uid": "84F703C084E4",
- "tests": [
- "cdc_msc_freertos", "hid_composite_freertos"
- ],
- "flasher": "esptool",
- "flasher_sn": "3ea619acd1cdeb11a0a0b806e93fd3f1",
- "flasher_args": "-b 921600"
- },
- {
"name": "metro_m7_1011",
"uid": "9CE8715DD71137363E00005002004200",
"flasher": "jlink",
@@ -39,6 +22,13 @@
"flasher_args": "-device MIMXRT1011xxx5A"
},
{
+ "name": "lpcxpresso11u37",
+ "uid": "17121919",
+ "flasher": "jlink",
+ "flasher_sn": "000724441579",
+ "flasher_args": "-device LPC11U37/401"
+ },
+ {
"name": "ra4m1_ek",
"uid": "152E163038303131393346E46F26574B",
"tests_skip": ["cdc_msc", "cdc_msc_freertos"],
@@ -48,11 +38,30 @@
"flasher_args": "-device R7FA4M1AB"
},
{
- "name": "lpcxpresso11u37",
- "uid": "17121919",
- "flasher": "jlink",
- "flasher_sn": "000724441579",
- "flasher_args": "-device LPC11U37/401"
+ "name": "raspberry_pi_pico",
+ "uid": "E6614C311B764A37",
+ "flasher": "openocd",
+ "flasher_sn": "E6614103E72C1D2F",
+ "flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\""
+ },
+ {
+ "name": "stm32g0b1nucleo",
+ "uid": "4D0038000450434E37343120",
+ "flasher": "openocd",
+ "flasher_sn": "066FFF495087534867063844",
+ "flasher_args": "-f interface/stlink.cfg -f target/stm32g0x.cfg"
+ }
+ ],
+ "boards-skip": [
+ {
+ "name": "espressif_s3_devkitm",
+ "uid": "84F703C084E4",
+ "tests": [
+ "cdc_msc_freertos", "hid_composite_freertos"
+ ],
+ "flasher": "esptool",
+ "flasher_sn": "3ea619acd1cdeb11a0a0b806e93fd3f1",
+ "flasher_args": "-b 921600"
}
]
}