From 0be6db50f873ccba3781aa3dd4fbc9b0fd46f38e Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 23 Jul 2022 18:39:22 +0700 Subject: [PATCH 01/21] test self-hosted --- .github/workflows/build_arm.yml | 24 ++++++++++++++++++- .github/workflows/test_hardware.yml | 37 +++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test_hardware.yml diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 4297ba895..64322082d 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -99,11 +99,33 @@ jobs: - name: Linker Map run: | pip install linkermap/ - for ex in `ls -d examples/device/*/`; do \ + # find -quit to only print map of 1 board per example + for ex in `ls -d examples/*/*/`; do \ find ${ex} -name *.map -print -quit | \ xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \ done + # Following steps are for Hardware Test with self-hosted + + - name: Prepare Artifacts + if: matrix.family == 'rp2040' + run: find examples/ -name "*.elf" -exec mv {} . \; + + - name: Upload Artifacts for Hardware Test + if: matrix.family == 'rp2040' + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.family }} + path: | + *.elf + + - name: Trigger Hardware Test + if: matrix.family == 'rp2040' + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: Hardware Test + token: ${{ secrets.TRIGGER_SELF_HOSTED }} + # --------------------------------------- # Build all no-family (orphaned) boards # --------------------------------------- diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml new file mode 100644 index 000000000..a39fb6927 --- /dev/null +++ b/.github/workflows/test_hardware.yml @@ -0,0 +1,37 @@ +name: Hardware Test +on: + workflow_dispatch: + +# Hardware in the loop (HIL) +# Current self-hosted instance is running on an RPI4 with +# - pico + pico-probe connected via USB + +jobs: + hw-test: + # Limit the run to only hathach due to limited resource on RPI4 + #if: github.repository_owner == 'hathach' && ${{ github.event.workflow_run.conclusion == 'success' }} + if: github.repository_owner == 'hathach' + runs-on: [self-hosted, Linux, ARM64] + + steps: + - name: Test self-host + run: | + echo "Running on self-hosted" + ls + + - name: Download rp2040 Artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build_arm.yml + name: rp2040 + + - name: List + run: ls + +# - name: Clean workspace +# run: | +# echo "Cleaning up previous run" +# rm -rf "${{ github.workspace }}" +# mkdir -p "${{ github.workspace }}" + + \ No newline at end of file From d15a86bc69a31fd0637661f44b6a7d53b80a5cad Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 26 Jul 2022 16:49:51 +0700 Subject: [PATCH 02/21] test flash and hw test with cdc msc --- .github/workflows/test_hardware.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index a39fb6927..923cd4f0a 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -14,10 +14,11 @@ jobs: runs-on: [self-hosted, Linux, ARM64] steps: - - name: Test self-host + - name: Clean workspace run: | - echo "Running on self-hosted" - ls + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}" + mkdir -p "${{ github.workspace }}" - name: Download rp2040 Artifacts uses: dawidd6/action-download-artifact@v2 @@ -25,13 +26,13 @@ jobs: workflow: build_arm.yml name: rp2040 - - name: List - run: ls - -# - name: Clean workspace -# run: | -# echo "Cleaning up previous run" -# rm -rf "${{ github.workspace }}" -# mkdir -p "${{ github.workspace }}" - - \ No newline at end of file + - name: Flash cdc_msc + run: openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program cdc_msc.elf verify reset exit" + + - name: Test + run: | + test -e /dev/ttyACM1 + test -e /media/pi/TinyUSB\ MSC/README.TXT + cat /media/pi/TinyUSB\ MSC/README.TXT + # failed on purpose + test -e /dev/ttyACM2 From 95c0262cd68edbafeb5b8154cf7693d63c26c07f Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 26 Jul 2022 22:55:47 +0700 Subject: [PATCH 03/21] update test --- .github/workflows/test_hardware.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 923cd4f0a..93440754e 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -5,6 +5,7 @@ on: # Hardware in the loop (HIL) # Current self-hosted instance is running on an RPI4 with # - pico + pico-probe connected via USB +# - pico-probe is /dev/ttyACM0 jobs: hw-test: @@ -26,13 +27,19 @@ jobs: workflow: build_arm.yml name: rp2040 - - name: Flash cdc_msc - run: openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program cdc_msc.elf verify reset exit" - - - name: Test + - name: Test cdc_dual_ports + env: + example: cdc_dual_ports run: | + openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit" + test -e /dev/ttyACM1 + test -e /dev/ttyACM2 + + - name: Test cdc_msc + env: + example: cdc_dual_ports + run: | + openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit" test -e /dev/ttyACM1 test -e /media/pi/TinyUSB\ MSC/README.TXT cat /media/pi/TinyUSB\ MSC/README.TXT - # failed on purpose - test -e /dev/ttyACM2 From f5f2433c5afef3785caeb5251d4cac75e62b77f0 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Jul 2022 11:56:31 +0700 Subject: [PATCH 04/21] wait for enumeration before test --- .github/workflows/test_hardware.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 93440754e..30f9e53e8 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -32,14 +32,20 @@ jobs: example: cdc_dual_ports run: | openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit" + echo "Waiting for enumeration" + while ! lsusb | grep "cafe:" ; do : ; done + # Test test -e /dev/ttyACM1 test -e /dev/ttyACM2 - name: Test cdc_msc env: - example: cdc_dual_ports + example: cdc_msc run: | openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit" + echo "Waiting for enumeration" + while ! lsusb | grep "cafe:" ; do : ; done + # Test test -e /dev/ttyACM1 test -e /media/pi/TinyUSB\ MSC/README.TXT cat /media/pi/TinyUSB\ MSC/README.TXT From 1ff0c7a52b1350e477d75cfc5fd5243cdaedd508 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Jul 2022 15:03:55 +0700 Subject: [PATCH 05/21] sleep 0.2 for new image take affect --- .github/workflows/test_hardware.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 30f9e53e8..68425a645 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -31,21 +31,25 @@ jobs: env: example: cdc_dual_ports run: | - openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit" - echo "Waiting for enumeration" - while ! lsusb | grep "cafe:" ; do : ; done + openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf reset exit" + echo "Waiting for enumeration (200 ms for reset, 5s for enumeration)" + sleep 0.2 + SECONDS=0 + while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done # Test - test -e /dev/ttyACM1 - test -e /dev/ttyACM2 + test -e /dev/ttyACM1 && echo "ttyACM1 exists" + test -e /dev/ttyACM2 && echo "ttyACM2 exists" - name: Test cdc_msc env: example: cdc_msc run: | - openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit" - echo "Waiting for enumeration" - while ! lsusb | grep "cafe:" ; do : ; done + openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf reset exit" + echo "Waiting for enumeration (200 ms for reset, 5s for enumeration)" + sleep 0.2 + SECONDS=0 + while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done # Test - test -e /dev/ttyACM1 - test -e /media/pi/TinyUSB\ MSC/README.TXT + test -e /dev/ttyACM1 && echo "ttyACM1 exists" + test -f /media/pi/TinyUSB\ MSC/README.TXT && echo "MSC README.TXT exist" cat /media/pi/TinyUSB\ MSC/README.TXT From 05ccd6c32b60994634add3b4b867870dab27aca5 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Jul 2022 15:44:21 +0700 Subject: [PATCH 06/21] more hw test update --- .github/workflows/test_hardware.yml | 30 ++++++++++++----------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 68425a645..1470effd4 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -15,12 +15,20 @@ jobs: runs-on: [self-hosted, Linux, ARM64] steps: - - name: Clean workspace + - name: Prepare workspace run: | echo "Cleaning up previous run" rm -rf "${{ github.workspace }}" mkdir -p "${{ github.workspace }}" - + echo "Create flash.sh" + touch flash.sh + chmod +x flash.sh + echo >> flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' + echo >> flash.sh '"Waiting for enumeration (500 ms for reset, 5s for enumeration)"' + echo >> flash.sh 'sleep 0.5' + echo >> flash.sh 'SECONDS=0' + echo >> flash.sh 'while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done' + - name: Download rp2040 Artifacts uses: dawidd6/action-download-artifact@v2 with: @@ -28,28 +36,14 @@ jobs: name: rp2040 - name: Test cdc_dual_ports - env: - example: cdc_dual_ports run: | - openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf reset exit" - echo "Waiting for enumeration (200 ms for reset, 5s for enumeration)" - sleep 0.2 - SECONDS=0 - while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done - # Test + ./flash_sh cdc_dual_ports test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" - name: Test cdc_msc - env: - example: cdc_msc run: | - openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf reset exit" - echo "Waiting for enumeration (200 ms for reset, 5s for enumeration)" - sleep 0.2 - SECONDS=0 - while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done - # Test + ./flash.sh cdc_msc test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -f /media/pi/TinyUSB\ MSC/README.TXT && echo "MSC README.TXT exist" cat /media/pi/TinyUSB\ MSC/README.TXT From 4411579ae099acbcf4559c691a0fb67b2596b52c Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Jul 2022 16:08:08 +0700 Subject: [PATCH 07/21] ci update --- .github/workflows/test_hardware.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 1470effd4..b5e0831d4 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -15,33 +15,38 @@ jobs: runs-on: [self-hosted, Linux, ARM64] steps: - - name: Prepare workspace + - name: Clean workspace run: | echo "Cleaning up previous run" rm -rf "${{ github.workspace }}" mkdir -p "${{ github.workspace }}" - echo "Create flash.sh" - touch flash.sh - chmod +x flash.sh - echo >> flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' - echo >> flash.sh '"Waiting for enumeration (500 ms for reset, 5s for enumeration)"' - echo >> flash.sh 'sleep 0.5' - echo >> flash.sh 'SECONDS=0' - echo >> flash.sh 'while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done' - name: Download rp2040 Artifacts uses: dawidd6/action-download-artifact@v2 with: workflow: build_arm.yml name: rp2040 - + + - name: Create flash.sh + #working-directory: ${{github.workspace}} + run: | + touch flash.sh + chmod +x flash.sh + echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' + echo >> flash.sh '"Waiting for enumeration (500 ms for reset, 5s for enumeration)"' + echo >> flash.sh 'sleep 0.5' + echo >> flash.sh 'SECONDS=0' + echo >> flash.sh 'while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done' + - name: Test cdc_dual_ports + #working-directory: ${{github.workspace}} run: | ./flash_sh cdc_dual_ports test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" - name: Test cdc_msc + #working-directory: ${{github.workspace}} run: | ./flash.sh cdc_msc test -e /dev/ttyACM1 && echo "ttyACM1 exists" From 2d5be437472d2da573bae0c1e64ee8e017391dfe Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Jul 2022 20:31:57 +0700 Subject: [PATCH 08/21] fix typo --- .github/workflows/test_hardware.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index b5e0831d4..77b95bfee 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -41,7 +41,7 @@ jobs: - name: Test cdc_dual_ports #working-directory: ${{github.workspace}} run: | - ./flash_sh cdc_dual_ports + ./flash.sh cdc_dual_ports test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" From e01b437af5581794618ff031b3f8d6614bb46cec Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 28 Jul 2022 11:10:54 +0700 Subject: [PATCH 09/21] more hw test --- .github/workflows/test_hardware.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 77b95bfee..50353474b 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -33,15 +33,16 @@ jobs: touch flash.sh chmod +x flash.sh echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' - echo >> flash.sh '"Waiting for enumeration (500 ms for reset, 5s for enumeration)"' + echo >> flash.sh 'echo "Waiting for 0.5s for reset"' echo >> flash.sh 'sleep 0.5' echo >> flash.sh 'SECONDS=0' - echo >> flash.sh 'while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done' + echo >> flash.sh 'lsusb | grep "cafe:"' - name: Test cdc_dual_ports #working-directory: ${{github.workspace}} run: | ./flash.sh cdc_dual_ports + while ! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ]) && [$SECONDS -le 5]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" @@ -49,6 +50,8 @@ jobs: #working-directory: ${{github.workspace}} run: | ./flash.sh cdc_msc + while ! ([ -e /dev/ttyACM1 ] && [ -e /dev/sda ]) && [$SECONDS -le 5]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" + test -e /dev/sda && echo "sda exists" test -f /media/pi/TinyUSB\ MSC/README.TXT && echo "MSC README.TXT exist" cat /media/pi/TinyUSB\ MSC/README.TXT From 229a1c145801861401392184c818f0c87766d601 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 28 Jul 2022 11:37:09 +0700 Subject: [PATCH 10/21] update hw test --- .github/workflows/test_hardware.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 50353474b..eefdb4c0a 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -42,7 +42,8 @@ jobs: #working-directory: ${{github.workspace}} run: | ./flash.sh cdc_dual_ports - while ! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ]) && [$SECONDS -le 5]; do :; done + echo $SECONDS + while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [$SECONDS -le 5]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" @@ -50,7 +51,8 @@ jobs: #working-directory: ${{github.workspace}} run: | ./flash.sh cdc_msc - while ! ([ -e /dev/ttyACM1 ] && [ -e /dev/sda ]) && [$SECONDS -le 5]; do :; done + echo $SECONDS + while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/sda ])) && [$SECONDS -le 5]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/sda && echo "sda exists" test -f /media/pi/TinyUSB\ MSC/README.TXT && echo "MSC README.TXT exist" From cbb7c9f313f8e8e29ba448ecd3ad07ca36d83309 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 28 Jul 2022 13:31:42 +0700 Subject: [PATCH 11/21] fix hw test --- .github/workflows/test_hardware.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index eefdb4c0a..77d4c2527 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -33,27 +33,29 @@ jobs: touch flash.sh chmod +x flash.sh echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' - echo >> flash.sh 'echo "Waiting for 0.5s for reset"' - echo >> flash.sh 'sleep 0.5' - echo >> flash.sh 'SECONDS=0' - echo >> flash.sh 'lsusb | grep "cafe:"' + # echo >> flash.sh 'echo "Waiting for 0.5s for reset"' + # echo >> flash.sh 'sleep 0.5' + # echo >> flash.sh 'SECONDS=0' + # echo >> flash.sh 'lsusb | grep "cafe:"' - name: Test cdc_dual_ports - #working-directory: ${{github.workspace}} run: | + echo "Second = $SECONDS" ./flash.sh cdc_dual_ports + echo "Second = $SECONDS" + while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done echo $SECONDS - while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [$SECONDS -le 5]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" - name: Test cdc_msc - #working-directory: ${{github.workspace}} run: | + readme='/media/pi/TinyUSB MSC/README.TXT' + echo "Second = $SECONDS" ./flash.sh cdc_msc - echo $SECONDS - while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/sda ])) && [$SECONDS -le 5]; do :; done + echo "Second = $SECONDS" + while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done + echo "Second = $SECONDS" test -e /dev/ttyACM1 && echo "ttyACM1 exists" - test -e /dev/sda && echo "sda exists" - test -f /media/pi/TinyUSB\ MSC/README.TXT && echo "MSC README.TXT exist" - cat /media/pi/TinyUSB\ MSC/README.TXT + test -f "$readme" && echo "$readme exists" + cat "$readme" From 292dea408fe05d9c46ba7ad0b7d317edfb692e11 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 28 Jul 2022 21:27:38 +0700 Subject: [PATCH 12/21] add dfu test --- .github/workflows/test_hardware.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 77d4c2527..5326ca823 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -28,7 +28,6 @@ jobs: name: rp2040 - name: Create flash.sh - #working-directory: ${{github.workspace}} run: | touch flash.sh chmod +x flash.sh @@ -40,22 +39,31 @@ jobs: - name: Test cdc_dual_ports run: | + #SECONDS=0 echo "Second = $SECONDS" ./flash.sh cdc_dual_ports - echo "Second = $SECONDS" while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done - echo $SECONDS test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" - name: Test cdc_msc run: | - readme='/media/pi/TinyUSB MSC/README.TXT' + #SECONDS=0 echo "Second = $SECONDS" ./flash.sh cdc_msc - echo "Second = $SECONDS" + readme='/media/pi/TinyUSB MSC/README.TXT' while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done - echo "Second = $SECONDS" test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -f "$readme" && echo "$readme exists" cat "$readme" + + - name: Test dfu + run: | + #SECONDS=0 + echo "Second = $SECONDS" + ./flash.sh dfu + while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done + dfu-util -d cafe -a 0 -U dfu0 + dfu-util -d cafe -a 1 -U dfu1 + grep "TinyUSB DFU! - Partition 0" dfu0 + grep "TinyUSB DFU! - Partition 1" dfu1 From aa8880c681f8d8549e17028cde41c6457b19c66e Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 28 Jul 2022 22:13:39 +0700 Subject: [PATCH 13/21] clean up --- .github/workflows/test_hardware.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 5326ca823..eb24b5351 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -32,15 +32,9 @@ jobs: touch flash.sh chmod +x flash.sh echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' - # echo >> flash.sh 'echo "Waiting for 0.5s for reset"' - # echo >> flash.sh 'sleep 0.5' - # echo >> flash.sh 'SECONDS=0' - # echo >> flash.sh 'lsusb | grep "cafe:"' - name: Test cdc_dual_ports run: | - #SECONDS=0 - echo "Second = $SECONDS" ./flash.sh cdc_dual_ports while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" @@ -48,8 +42,6 @@ jobs: - name: Test cdc_msc run: | - #SECONDS=0 - echo "Second = $SECONDS" ./flash.sh cdc_msc readme='/media/pi/TinyUSB MSC/README.TXT' while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done @@ -59,8 +51,6 @@ jobs: - name: Test dfu run: | - #SECONDS=0 - echo "Second = $SECONDS" ./flash.sh dfu while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done dfu-util -d cafe -a 0 -U dfu0 From 4a47db97eb36c36319b1b434ac1f577ad77fb68c Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 29 Jul 2022 11:32:17 +0700 Subject: [PATCH 14/21] test hw dfu_runtime --- .github/workflows/build_arm.yml | 6 +++--- .github/workflows/test_hardware.yml | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 64322082d..a321948e3 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -108,11 +108,11 @@ jobs: # Following steps are for Hardware Test with self-hosted - name: Prepare Artifacts - if: matrix.family == 'rp2040' + if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' run: find examples/ -name "*.elf" -exec mv {} . \; - name: Upload Artifacts for Hardware Test - if: matrix.family == 'rp2040' + if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' uses: actions/upload-artifact@v3 with: name: ${{ matrix.family }} @@ -120,7 +120,7 @@ jobs: *.elf - name: Trigger Hardware Test - if: matrix.family == 'rp2040' + if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' uses: benc-uk/workflow-dispatch@v1 with: workflow: Hardware Test diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index eb24b5351..2fbfcb991 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -10,7 +10,6 @@ on: jobs: hw-test: # Limit the run to only hathach due to limited resource on RPI4 - #if: github.repository_owner == 'hathach' && ${{ github.event.workflow_run.conclusion == 'success' }} if: github.repository_owner == 'hathach' runs-on: [self-hosted, Linux, ARM64] @@ -57,3 +56,8 @@ jobs: dfu-util -d cafe -a 1 -U dfu1 grep "TinyUSB DFU! - Partition 0" dfu0 grep "TinyUSB DFU! - Partition 1" dfu1 + + - name: Test dfu + run: | + ./flash.sh dfu_runtime + while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done From fe7fca7abbea02b9f0ac8f53bf4ca1d1019c6e85 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 1 Aug 2022 14:42:58 +0700 Subject: [PATCH 15/21] minor clean up --- .github/workflows/test_hardware.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml index 2fbfcb991..7a6e2a470 100644 --- a/.github/workflows/test_hardware.yml +++ b/.github/workflows/test_hardware.yml @@ -30,18 +30,18 @@ jobs: run: | touch flash.sh chmod +x flash.sh - echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1.elf reset exit"' + echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"' - name: Test cdc_dual_ports run: | - ./flash.sh cdc_dual_ports + ./flash.sh cdc_dual_ports.elf while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" test -e /dev/ttyACM2 && echo "ttyACM2 exists" - name: Test cdc_msc run: | - ./flash.sh cdc_msc + ./flash.sh cdc_msc.elf readme='/media/pi/TinyUSB MSC/README.TXT' while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done test -e /dev/ttyACM1 && echo "ttyACM1 exists" @@ -50,14 +50,20 @@ jobs: - name: Test dfu run: | - ./flash.sh dfu + ./flash.sh dfu.elf while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done dfu-util -d cafe -a 0 -U dfu0 dfu-util -d cafe -a 1 -U dfu1 grep "TinyUSB DFU! - Partition 0" dfu0 grep "TinyUSB DFU! - Partition 1" dfu1 - - name: Test dfu + - name: Test dfu_runtime run: | - ./flash.sh dfu_runtime + ./flash.sh dfu_runtime.elf while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done + +# - name: Test hid_boot_interface +# run: | +# ./flash.sh hid_boot_interface.elf +# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done + \ No newline at end of file From b92015544490ed6fd8891db59c4cb88365f0f137 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 6 Nov 2022 14:56:05 +0700 Subject: [PATCH 16/21] minor clean up --- .github/workflows/build_arm.yml | 8 ++++---- .github/workflows/build_esp.yml | 7 ++++--- .github/workflows/build_msp430.yml | 7 ++++--- .github/workflows/build_renesas.yml | 7 ++++--- .github/workflows/build_riscv.yml | 7 ++++--- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index a321948e3..56804da8a 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -99,10 +99,10 @@ jobs: - name: Linker Map run: | pip install linkermap/ - # find -quit to only print map of 1 board per example - for ex in `ls -d examples/*/*/`; do \ - find ${ex} -name *.map -print -quit | \ - xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \ + # find -quit to only print linkermap of 1 board per example + for ex in `ls -d examples/*/*/` + do + find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"' done # Following steps are for Hardware Test with self-hosted diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml index 6a46773b2..417887172 100644 --- a/.github/workflows/build_esp.yml +++ b/.github/workflows/build_esp.yml @@ -43,7 +43,8 @@ jobs: - name: Linker Map run: | pip install linkermap/ - for ex in `ls -d examples/device/*/`; do \ - find ${ex} -maxdepth 3 -name *.map -print -quit | \ - xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \ + # find -quit to only print linkermap of 1 board per example + for ex in `ls -d examples/device/*/` + do + find ${ex} -maxdepth 3 -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"' done diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml index ea93f09a0..731febb03 100644 --- a/.github/workflows/build_msp430.yml +++ b/.github/workflows/build_msp430.yml @@ -61,7 +61,8 @@ jobs: - name: Linker Map run: | pip install linkermap/ - for ex in `ls -d examples/device/*/`; do \ - find ${ex} -name *.map -print -quit | \ - xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \ + # find -quit to only print linkermap of 1 board per example + for ex in `ls -d examples/device/*/` + do + find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"' done diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index 2563d3549..4de42f935 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -62,7 +62,8 @@ jobs: - name: Linker Map run: | pip install linkermap/ - for ex in `ls -d examples/device/*/`; do \ - find ${ex} -name *.map -print -quit | \ - xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \ + # find -quit to only print linkermap of 1 board per example + for ex in `ls -d examples/device/*/` + do + find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"' done diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml index 90dc35206..9362da893 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -62,7 +62,8 @@ jobs: - name: Linker Map run: | pip install linkermap/ - for ex in `ls -d examples/device/*/`; do \ - find ${ex} -name *.map -print -quit | \ - xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \ + # find -quit to only print linkermap of 1 board per example + for ex in `ls -d examples/device/*/` + do + find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"' done From fee90f353f426d6fafe323534ad7d91918d4b98d Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 6 Nov 2022 15:17:00 +0700 Subject: [PATCH 17/21] bump up setup python action to v4 --- .github/workflows/build_aarch64.yml | 2 +- .github/workflows/build_arm.yml | 2 +- .github/workflows/build_esp.yml | 2 +- .github/workflows/build_msp430.yml | 2 +- .github/workflows/build_renesas.yml | 2 +- .github/workflows/build_riscv.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml index b4ea8a0eb..d610d6eff 100644 --- a/.github/workflows/build_aarch64.yml +++ b/.github/workflows/build_aarch64.yml @@ -21,7 +21,7 @@ jobs: - 'broadcom_64bit' steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 - name: Checkout TinyUSB uses: actions/checkout@v3 diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 56804da8a..4d27ba729 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -65,7 +65,7 @@ jobs: - 'xmc4000' steps: - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 - name: Install ARM GCC uses: carlosperate/arm-none-eabi-gcc-action@v1 diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml index 417887172..162226cc5 100644 --- a/.github/workflows/build_esp.yml +++ b/.github/workflows/build_esp.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 - name: Pull ESP-IDF docker run: docker pull espressif/idf:latest diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml index 731febb03..b43d9e740 100644 --- a/.github/workflows/build_msp430.yml +++ b/.github/workflows/build_msp430.yml @@ -18,7 +18,7 @@ jobs: - 'msp430' steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 - name: Checkout TinyUSB uses: actions/checkout@v3 diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index 4de42f935..c8920c7f7 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -18,7 +18,7 @@ jobs: - 'rx' steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 - name: Checkout TinyUSB uses: actions/checkout@v3 diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml index 9362da893..a0e09190b 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -19,7 +19,7 @@ jobs: - 'gd32vf103' steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 - name: Checkout TinyUSB uses: actions/checkout@v3 From ca4ae61c1ce79f36e540fa4848b9e575a21e71d3 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 6 Nov 2022 22:06:22 +0700 Subject: [PATCH 18/21] use gh cli instead of action for workflow dispatch --- .github/workflows/build_aarch64.yml | 2 ++ .github/workflows/build_arm.yml | 9 +++++---- .github/workflows/build_esp.yml | 2 ++ .github/workflows/build_renesas.yml | 2 ++ .github/workflows/build_riscv.yml | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml index d610d6eff..18989a5e9 100644 --- a/.github/workflows/build_aarch64.yml +++ b/.github/workflows/build_aarch64.yml @@ -22,6 +22,8 @@ jobs: steps: - name: Setup Python uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Checkout TinyUSB uses: actions/checkout@v3 diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 4d27ba729..12853b72b 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -66,6 +66,8 @@ jobs: steps: - name: Setup Python uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Install ARM GCC uses: carlosperate/arm-none-eabi-gcc-action@v1 @@ -121,10 +123,9 @@ jobs: - name: Trigger Hardware Test if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: Hardware Test - token: ${{ secrets.TRIGGER_SELF_HOSTED }} + env: + GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} + run: gh workflow run test_hardware.yml -r $GITHUB_REF # --------------------------------------- # Build all no-family (orphaned) boards diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml index 162226cc5..51d91de49 100644 --- a/.github/workflows/build_esp.yml +++ b/.github/workflows/build_esp.yml @@ -24,6 +24,8 @@ jobs: steps: - name: Setup Python uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Pull ESP-IDF docker run: docker pull espressif/idf:latest diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index c8920c7f7..d212708f7 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -19,6 +19,8 @@ jobs: steps: - name: Setup Python uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Checkout TinyUSB uses: actions/checkout@v3 diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml index a0e09190b..96b8c676b 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -20,6 +20,8 @@ jobs: steps: - name: Setup Python uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Checkout TinyUSB uses: actions/checkout@v3 From 5d13eb8e7a715b3dd02ef485808d82145870b90c Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 6 Nov 2022 22:33:55 +0700 Subject: [PATCH 19/21] move test_hardware into build_arm --- .github/workflows/build_arm.yml | 72 ++++++++++++++++++++++++++++- .github/workflows/test_hardware.yml | 69 --------------------------- 2 files changed, 70 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/test_hardware.yml diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 12853b72b..00de92fa6 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -126,7 +126,7 @@ jobs: env: GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} run: gh workflow run test_hardware.yml -r $GITHUB_REF - + # --------------------------------------- # Build all no-family (orphaned) boards # --------------------------------------- @@ -145,7 +145,9 @@ jobs: steps: - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Install ARM GCC uses: carlosperate/arm-none-eabi-gcc-action@v1 @@ -160,3 +162,69 @@ jobs: - name: Build run: python3 tools/build_board.py ${{ matrix.example }} + + # --------------------------------------- + # Hardware in the loop (HIL) + # Current self-hosted instance is running on an RPI4 with + # - pico + pico-probe connected via USB + # - pico-probe is /dev/ttyACM0 + # --------------------------------------- + hw-test: + # Limit the run to only hathach due to limited resource on RPI4 + if: github.repository_owner == 'hathach' + needs: build-arm + runs-on: [self-hosted, Linux, ARM64] + + steps: + - name: Clean workspace + run: | + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}" + mkdir -p "${{ github.workspace }}" + + - name: Download rp2040 Artifacts + uses: actions/download-artifact@v3 + with: + name: rp2040 + + - name: Create flash.sh + run: | + touch flash.sh + chmod +x flash.sh + echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"' + + - name: Test cdc_dual_ports + run: | + ./flash.sh cdc_dual_ports.elf + while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done + test -e /dev/ttyACM1 && echo "ttyACM1 exists" + test -e /dev/ttyACM2 && echo "ttyACM2 exists" + + - name: Test cdc_msc + run: | + ./flash.sh cdc_msc.elf + readme='/media/pi/TinyUSB MSC/README.TXT' + while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done + test -e /dev/ttyACM1 && echo "ttyACM1 exists" + test -f "$readme" && echo "$readme exists" + cat "$readme" + + - name: Test dfu + run: | + ./flash.sh dfu.elf + while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done + dfu-util -d cafe -a 0 -U dfu0 + dfu-util -d cafe -a 1 -U dfu1 + grep "TinyUSB DFU! - Partition 0" dfu0 + grep "TinyUSB DFU! - Partition 1" dfu1 + + - name: Test dfu_runtime + run: | + ./flash.sh dfu_runtime.elf + while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done + +# - name: Test hid_boot_interface +# run: | +# ./flash.sh hid_boot_interface.elf +# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done + diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml deleted file mode 100644 index 7a6e2a470..000000000 --- a/.github/workflows/test_hardware.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Hardware Test -on: - workflow_dispatch: - -# Hardware in the loop (HIL) -# Current self-hosted instance is running on an RPI4 with -# - pico + pico-probe connected via USB -# - pico-probe is /dev/ttyACM0 - -jobs: - hw-test: - # Limit the run to only hathach due to limited resource on RPI4 - if: github.repository_owner == 'hathach' - runs-on: [self-hosted, Linux, ARM64] - - steps: - - name: Clean workspace - run: | - echo "Cleaning up previous run" - rm -rf "${{ github.workspace }}" - mkdir -p "${{ github.workspace }}" - - - name: Download rp2040 Artifacts - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build_arm.yml - name: rp2040 - - - name: Create flash.sh - run: | - touch flash.sh - chmod +x flash.sh - echo > flash.sh 'openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program $1 reset exit"' - - - name: Test cdc_dual_ports - run: | - ./flash.sh cdc_dual_ports.elf - while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 5 ]; do :; done - test -e /dev/ttyACM1 && echo "ttyACM1 exists" - test -e /dev/ttyACM2 && echo "ttyACM2 exists" - - - name: Test cdc_msc - run: | - ./flash.sh cdc_msc.elf - readme='/media/pi/TinyUSB MSC/README.TXT' - while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 5 ]; do :; done - test -e /dev/ttyACM1 && echo "ttyACM1 exists" - test -f "$readme" && echo "$readme exists" - cat "$readme" - - - name: Test dfu - run: | - ./flash.sh dfu.elf - while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 5 ]; do :; done - dfu-util -d cafe -a 0 -U dfu0 - dfu-util -d cafe -a 1 -U dfu1 - grep "TinyUSB DFU! - Partition 0" dfu0 - grep "TinyUSB DFU! - Partition 1" dfu1 - - - name: Test dfu_runtime - run: | - ./flash.sh dfu_runtime.elf - while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done - -# - name: Test hid_boot_interface -# run: | -# ./flash.sh hid_boot_interface.elf -# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 5 ]; do :; done - \ No newline at end of file From a0dc9008a7c125b3f5e3b0bc565a06cce3d83863 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 6 Nov 2022 22:39:09 +0700 Subject: [PATCH 20/21] remove trigger hardware step --- .github/workflows/build_arm.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 00de92fa6..4d513d7ba 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -121,11 +121,11 @@ jobs: path: | *.elf - - name: Trigger Hardware Test - if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' - env: - GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} - run: gh workflow run test_hardware.yml -r $GITHUB_REF +# - name: Trigger Hardware Test +# if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' +# env: +# GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} +# run: gh workflow run test_hardware.yml -r $GITHUB_REF # --------------------------------------- # Build all no-family (orphaned) boards From 030b50dce3434aa94cb7428c3e752133ac274ce5 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 6 Nov 2022 23:19:34 +0700 Subject: [PATCH 21/21] final clean up --- .github/workflows/build_arm.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 4d513d7ba..53f73a48f 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -121,12 +121,6 @@ jobs: path: | *.elf -# - name: Trigger Hardware Test -# if: matrix.family == 'rp2040' && github.repository_owner == 'hathach' -# env: -# GH_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} -# run: gh workflow run test_hardware.yml -r $GITHUB_REF - # --------------------------------------- # Build all no-family (orphaned) boards # ---------------------------------------