mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-23 09:41:19 +00:00
Merge pull request #2780 from hathach/bump-pio-usb
bump up pio-usb to 0.6.1
This commit is contained in:
commit
669f341b0b
@ -24,7 +24,7 @@ jobs:
|
|||||||
"make arm-gcc"
|
"make arm-gcc"
|
||||||
"make msp430-gcc"
|
"make msp430-gcc"
|
||||||
"make riscv-gcc"
|
"make riscv-gcc"
|
||||||
# "make rx-gcc" llvm-gcc-renesas.com seems to be down
|
"make rx-gcc"
|
||||||
"cmake esp-idf"
|
"cmake esp-idf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -88,6 +88,13 @@ commands:
|
|||||||
unzip ninja-linux.zip -d ~/bin
|
unzip ninja-linux.zip -d ~/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# rx-gcc is 32-bit binary
|
||||||
|
if [[ << parameters.toolchain >> == rx-gcc ]]; then
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install libc6:i386 libstdc++6:i386 zlib1g:i386
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Pico SDK
|
# Install Pico SDK
|
||||||
if [ << parameters.family >> == "rp2040" ]; then
|
if [ << parameters.family >> == "rp2040" ]; then
|
||||||
git clone --depth 1 https://github.com/raspberrypi/pico-sdk.git ~/pico-sdk
|
git clone --depth 1 https://github.com/raspberrypi/pico-sdk.git ~/pico-sdk
|
||||||
|
58
.github/workflows/hil_test.yml
vendored
58
.github/workflows/hil_test.yml
vendored
@ -21,51 +21,53 @@ env:
|
|||||||
HIL_JSON: test/hil/rpi.json
|
HIL_JSON: test/hil/rpi.json
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ---------------------------------------
|
set-matrix:
|
||||||
# Build Non Espressif
|
|
||||||
# ---------------------------------------
|
|
||||||
build:
|
|
||||||
if: github.repository_owner == 'hathach'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
BOARDS_LIST: ${{ steps.parse_hil_json.outputs.BOARDS_LIST }}
|
json: ${{ steps.set-matrix-json.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout TinyUSB
|
- name: Checkout TinyUSB
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Parse HIL json
|
- name: Generate matrix json
|
||||||
id: parse_hil_json
|
id: set-matrix-json
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y jq
|
MATRIX_JSON=$(jq -c '{ "arm-gcc": [.boards[] | select(.flasher != "esptool" and .flasher != "openocd_wch") | .name] }' ${{ env.HIL_JSON }})
|
||||||
|
echo "matrix=$MATRIX_JSON"
|
||||||
|
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Non-Espresif boards
|
# ---------------------------------------
|
||||||
BOARDS_LIST=$(jq -r '.boards[] | select(.flasher != "esptool") | "-b " + .name' ${{ env.HIL_JSON }} | tr '\n' ' ')
|
# Build arm-gcc
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST"
|
# ---------------------------------------
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_ENV
|
build:
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST" >> $GITHUB_OUTPUT
|
if: github.repository_owner == 'hathach'
|
||||||
|
needs: set-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
board: ${{ fromJSON(needs.set-matrix.outputs.json)['arm-gcc'] }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout TinyUSB
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup arm-gcc toolchain
|
- name: Setup arm-gcc toolchain
|
||||||
uses: ./.github/actions/setup_toolchain
|
uses: ./.github/actions/setup_toolchain
|
||||||
with:
|
with:
|
||||||
toolchain: 'arm-gcc'
|
toolchain: 'arm-gcc'
|
||||||
|
|
||||||
- name: Setup risv-gcc toolchain
|
|
||||||
uses: ./.github/actions/setup_toolchain
|
|
||||||
with:
|
|
||||||
toolchain: 'riscv-gcc'
|
|
||||||
|
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
uses: ./.github/actions/get_deps
|
uses: ./.github/actions/get_deps
|
||||||
with:
|
with:
|
||||||
arg: ${{ env.BOARDS_LIST }}
|
arg: -b${{ matrix.board }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python tools/build.py $BOARDS_LIST
|
run: python tools/build.py -b${{ matrix.board }}
|
||||||
|
|
||||||
- name: Upload Artifacts for Hardware Testing
|
- name: Upload Artifacts for Hardware Testing
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: hil_rpi
|
name: ${{ matrix.board }}
|
||||||
path: |
|
path: |
|
||||||
cmake-build/cmake-build-*/*/*/*.elf
|
cmake-build/cmake-build-*/*/*/*.elf
|
||||||
cmake-build/cmake-build-*/*/*/*.bin
|
cmake-build/cmake-build-*/*/*/*.bin
|
||||||
@ -76,11 +78,8 @@ jobs:
|
|||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
hil-rpi:
|
hil-rpi:
|
||||||
if: github.repository_owner == 'hathach'
|
if: github.repository_owner == 'hathach'
|
||||||
needs:
|
needs: build
|
||||||
- build
|
|
||||||
runs-on: [self-hosted, ARM64, rpi, hardware-in-the-loop]
|
runs-on: [self-hosted, ARM64, rpi, hardware-in-the-loop]
|
||||||
env:
|
|
||||||
BOARDS_LIST: "${{ needs.build-esp.outputs.BOARDS_LIST }} ${{ needs.build.outputs.BOARDS_LIST }}"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean workspace
|
- name: Clean workspace
|
||||||
run: |
|
run: |
|
||||||
@ -107,9 +106,4 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Test on actual hardware
|
- name: Test on actual hardware
|
||||||
run: |
|
run: python3 test/hil/hil_test.py ${{ env.HIL_JSON }}
|
||||||
echo "BOARDS_LIST=$BOARDS_LIST"
|
|
||||||
echo "::group::{cmake-build contents}"
|
|
||||||
tree cmake-build
|
|
||||||
echo "::endgroup::"
|
|
||||||
python3 test/hil/hil_test.py $BOARDS_LIST ${{ env.HIL_JSON }}
|
|
||||||
|
@ -39,6 +39,9 @@ import fs
|
|||||||
|
|
||||||
ENUM_TIMEOUT = 30
|
ENUM_TIMEOUT = 30
|
||||||
|
|
||||||
|
STATUS_OK = "\033[32mOK\033[0m"
|
||||||
|
STATUS_FAILED = "\033[31mFailed\033[0m"
|
||||||
|
STATUS_SKIPPED = "\033[33mSkipped\033[0m"
|
||||||
|
|
||||||
# get usb serial by id
|
# get usb serial by id
|
||||||
def get_serial_dev(id, vendor_str, product_str, ifnum):
|
def get_serial_dev(id, vendor_str, product_str, ifnum):
|
||||||
@ -411,7 +414,7 @@ def test_board(board):
|
|||||||
if not os.path.exists(fw_dir):
|
if not os.path.exists(fw_dir):
|
||||||
fw_dir = f'examples/cmake-build-{name}/{test}'
|
fw_dir = f'examples/cmake-build-{name}/{test}'
|
||||||
fw_name = f'{fw_dir}/{os.path.basename(test)}'
|
fw_name = f'{fw_dir}/{os.path.basename(test)}'
|
||||||
print(f'{name:30} {test:20} ... ', end='')
|
print(f'{name:25} {test:30} ... ', end='')
|
||||||
|
|
||||||
if not os.path.exists(fw_dir):
|
if not os.path.exists(fw_dir):
|
||||||
print('Skip')
|
print('Skip')
|
||||||
@ -432,11 +435,11 @@ def test_board(board):
|
|||||||
print('OK')
|
print('OK')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
err_count += 1
|
err_count += 1
|
||||||
print('Failed')
|
print(STATUS_FAILED)
|
||||||
print(f' {e}')
|
print(f' {e}')
|
||||||
else:
|
else:
|
||||||
err_count += 1
|
err_count += 1
|
||||||
print('Flash failed')
|
print(f'Flash {STATUS_FAILED}')
|
||||||
return err_count
|
return err_count
|
||||||
|
|
||||||
|
|
||||||
@ -463,10 +466,13 @@ def main():
|
|||||||
else:
|
else:
|
||||||
config_boards = [e for e in config['boards'] if e['name'] in boards]
|
config_boards = [e for e in config['boards'] if e['name'] in boards]
|
||||||
|
|
||||||
err_count_list = []
|
|
||||||
with Pool(processes=os.cpu_count()) as pool:
|
with Pool(processes=os.cpu_count()) as pool:
|
||||||
err_count_list = pool.map(test_board, config_boards)
|
err_count = sum(pool.map(test_board, config_boards))
|
||||||
err_count = sum(err_count_list)
|
|
||||||
|
print()
|
||||||
|
print("-" * 30)
|
||||||
|
print(f'Total failed: {err_count}')
|
||||||
|
print("-" * 30)
|
||||||
sys.exit(err_count)
|
sys.exit(err_count)
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
"flasher_sn": "E6614103E72C1D2F",
|
"flasher_sn": "E6614103E72C1D2F",
|
||||||
"flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\"",
|
"flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\"",
|
||||||
"tests": {
|
"tests": {
|
||||||
"skip": ["dual/host_info_to_device_cdc"],
|
|
||||||
"dual_attached": [{"vid_pid": "1a86_55d4", "serial": "52D2002470"}]
|
"dual_attached": [{"vid_pid": "1a86_55d4", "serial": "52D2002470"}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -58,7 +58,7 @@ deps_optional = {
|
|||||||
'144f1eb7ea8c06512e12f12b27383601c0272410',
|
'144f1eb7ea8c06512e12f12b27383601c0272410',
|
||||||
'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'],
|
'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'],
|
||||||
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git',
|
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git',
|
||||||
'7902e9fa8ed4a271d8d1d5e7e50516c2292b7bc2',
|
'fe9133fc513b82cc3dc62c67cb51f2339cf29ef7',
|
||||||
'rp2040'],
|
'rp2040'],
|
||||||
'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git',
|
'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git',
|
||||||
'd52e5a6a59b7c638da860c2bb309b6e78e752ff8',
|
'd52e5a6a59b7c638da860c2bb309b6e78e752ff8',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user