From 2d4b9ff544a631daf11460f4279d34b9d7a733bf Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Thu, 18 Apr 2024 09:33:12 -0500 Subject: [PATCH 01/38] replaced legacy flash and lock operations --- .github/workflows/BLE_Examples_Test.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index b9e246f541e..d13be366889 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -636,7 +636,8 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | - python3 /home/$USER/Workspace/Resource_Share/Resource_Share_multiboard.py -l -t 3600 -b max32655_board1 -b max32655_board2 -b max32665_board1 -b max32690_board_w1 + resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 + #---------------------------------------------------------------------------------------------- #------------------------------| Erase all required boards at once |----------------------------- @@ -645,16 +646,11 @@ jobs: if: steps.lock_boards.outcome == 'success' id: erase_boards run: | - # start with boards in known state - cd .github/workflows/scripts - echo "Erasing Main MAX32655 B1" - ./mass_erase_board.sh max32655 max32655_board1 - echo "Erasing Main MAX32655 B2" - ./mass_erase_board.sh max32655 max32655_board2 - echo "Erasing Main MAX32665 B1" - ./mass_erase_board.sh max32665 max32665_board1 - echo "Erasing Main MAX32690" - ./mass_erase_board.sh max32690 max32690_board_w1 + ocderase max32655_board1 + ocderase max32655_board2 + ocderase max32665_board1 + ocderase max32690_board_w1 + #---------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------- @@ -972,7 +968,7 @@ jobs: - name: Unlock Boards if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | - python3 /home/$USER/Workspace/Resource_Share/Resource_Share_multiboard.py -b max32655_board1 -b max32655_board2 -b max32665_board1 -b max32690_board_w1 + resource_manager.py -u max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 #---------------------------------------------------------------------------------------------- # Save test reports - uses: actions/upload-artifact@v3 From fed08d8591e1081b4527ab5756b28aab16c1b9b7 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:21:16 -0500 Subject: [PATCH 02/38] added test action --- .github/workflows/BLE_Examples_Test.yml | 267 +++++++----------- .../targets/maxim/max32655/sources/pal_uart.c | 46 +-- 2 files changed, 134 insertions(+), 179 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index d13be366889..a8461d61e28 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -657,87 +657,65 @@ jobs: #---------------------------------------------------------------------------------------------- #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- + - name: Test OTAS MAX32655 + uses: btm-ci-scripts/otas-test@main + with: + board_client: 'max32655_board1' + board_server: 'max32655_board2' - name: Test MAX32655 #name used for display purposes on github webpage if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32655_B2 == 'true' id: Test_MAX32655 #id used to reference this step in other parts of the yml run: | - FILE=/home/$USER/Workspace/Resource_Share/boards_config.json - dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32655_board2']['uart0'])") - dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32655_board2']['daplink'])") - examples_to_test=(${MAX32655_EXAMPLES_TO_TEST[@]}) - echo - echo - echo "Examples to be tested : ${examples_to_test[@]}" - echo "MAX32655_RUN_ALL_TEST : $MAX32655_RUN_ALL_TEST" - echo "MAX32655_DATS_CONNECTED_TEST : $MAX32655_DATS_CONNECTED_TEST " - echo "MAX32655_OTAS_CONNECTED_TEST : $MAX32655_OTAS_CONNECTED_TEST" - echo "MAX32655_BLE_FILES_CHANGED : $MAX32655_BLE_FILES_CHANGED " - echo "LOCK_MAX32655_B2 : $LOCK_MAX32655_B2 " + - cd .github/workflows/scripts + + echo + echo + echo "Examples to be tested : ${examples_to_test[@]}" + echo "MAX32655_RUN_ALL_TEST : $MAX32655_RUN_ALL_TEST" + echo "MAX32655_DATS_CONNECTED_TEST : $MAX32655_DATS_CONNECTED_TEST " + echo "MAX32655_OTAS_CONNECTED_TEST : $MAX32655_OTAS_CONNECTED_TEST" + echo "MAX32655_BLE_FILES_CHANGED : $MAX32655_BLE_FILES_CHANGED " + echo "LOCK_MAX32655_B2 : $LOCK_MAX32655_B2 " + + BOARD_SERVER="max32690_board_w1" + BOARD_CLIENT="max32690_b1" + DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc + DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats + OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas + OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac + make -C $DATC_DIR + make -C $DATS_DIR + make -C $OTAS_DIR + make -C $OTAC_DIR + + DATS_FILE=$DATS_DIR/build/max32690.elf + DATC_FILE=$DATC_DIR/build/max32690.elf + OTAS_FILE=$OTAS_DIR/build/max32690.elf + OTAC_FILE=$OTAC_DIR/build/max32690.elf + + echo "Testing all examples" + set +e + + connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi + + otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) + + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi + set -e - if [[ $MAX32655_RUN_ALL_TEST == 'true' ]]; then - echo "Testing all examples" - set +e - ./test_launcher.sh max32655 $dut_uart $dut_serial "all" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - set -e - else - if [[ $MAX32655_BLE_FILES_CHANGED == 'true' ]]; then - #------non connected tests--------- - for example in "${examples_to_test[@]}"; do - # launch single tests - echo "Running $example test on MAX32655" - set +e - ./test_launcher.sh max32655 $dut_uart $dut_serial $example - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - failedTestList+="| $example" - fi - set -e - done - #------connected tests--------- - if [[ $MAX32655_DATS_CONNECTED_TEST == 'true' ]]; then - #conencted test launcher - echo "Testing MAX32655_DATS_CONNECTED_TEST" - set +e - ./test_launcher.sh max32655 $dut_uart $dut_serial "dats" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed_test count - let "numOfFailedTests+=$testResult" - failedTestList+="| MAX32655 Dats/c" - fi - set -e - fi - #------connected tests--------- - if [[ $MAX32655_OTAS_CONNECTED_TEST == 'true' ]]; then - #conencted test launcher - echo "Testing MAX32655_OTAS_CONNECTED_TEST" - set +e - #call test here - #***************** uncomment actual test here ************* - ./test_launcher.sh max32655 $dut_uart $dut_serial "ota" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - failedTestList+="| MAX32655 OTAS/C" - fi - set -e - fi - else - echo "Skipping all tests" - fi echo "==============================================================================" echo "==============================================================================" @@ -750,9 +728,9 @@ jobs: echo "==============================================================================" echo "==============================================================================" echo - fi + - exit $numOfFailedTests + exit $numOfFailedTests #---------------------------------------------------------------------------------------------- - name: Test MAX32665 #name used for display purposes on github webpage if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32665_B1 == 'true' @@ -853,82 +831,51 @@ jobs: if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32690_B1 == 'true' id: Test_MAX32690 #id used to reference this step in other parts of the yml run: | - FILE=/home/$USER/Workspace/Resource_Share/boards_config.json - dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32690_board_w1']['uart2'])") - dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32690_board_w1']['daplink'])") - examples_to_test=(${MAX32690_EXAMPLES_TO_TEST[@]}) - echo - echo - echo "Examples to be tested : ${examples_to_test[@]}" - echo "MAX32690_RUN_ALL_TEST : $MAX32690_RUN_ALL_TEST" - echo "MAX32690_DATS_CONNECTED_TEST : $MAX32690_DATS_CONNECTED_TEST " - echo "MAX32690_OTAS_CONNECTED_TEST : $MAX32690_OTAS_CONNECTED_TEST" - echo "MAX32690_BLE_FILES_CHANGED : $MAX32690_BLE_FILES_CHANGED " - echo "LOCK_MAX32690_B1 : $LOCK_MAX32690_B1 " - - cd .github/workflows/scripts - - if [[ $MAX32690_RUN_ALL_TEST == 'true' ]]; then - echo "Testing all examples" - set +e - ./test_launcher.sh max32690 $dut_uart $dut_serial "all" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - set -e - else - if [[ $MAX32690_BLE_FILES_CHANGED == 'true' ]]; then - #------non connected tests--------- - for example in "${examples_to_test[@]}"; do - # launch single tests - echo "Running $example test on MAX32690" - set +e - ./test_launcher.sh max32690 $dut_uart $dut_serial $example - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - failedTestList+="| $example" - fi - set -e - done - - #------connected tests--------- - if [[ $MAX32690_DATS_CONNECTED_TEST == 'true' ]]; then - #conencted test launcher - echo "Testing MAX32690_DATS_CONNECTED_TEST" - set +e - ./test_launcher.sh max32690 $dut_uart $dut_serial "dats" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed_test count - let "numOfFailedTests+=$testResult" - failedTestList+="| MAX32690 Dats/c" - fi - set -e + + + echo "Examples to be tested : ${examples_to_test[@]}" + echo "MAX32690_RUN_ALL_TEST : $MAX32690_RUN_ALL_TEST" + echo "MAX32690_DATS_CONNECTED_TEST : $MAX32690_DATS_CONNECTED_TEST " + echo "MAX32690_OTAS_CONNECTED_TEST : $MAX32690_OTAS_CONNECTED_TEST" + echo "MAX32690_BLE_FILES_CHANGED : $MAX32690_BLE_FILES_CHANGED " + echo "LOCK_MAX32690_B1 : $LOCK_MAX32690_B1 " + + + BOARD_SERVER="max32690_board_w1" + BOARD_CLIENT="max32690_b1" + DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc + DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats + OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas + OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac + make -C $DATC_DIR + make -C $DATS_DIR + make -C $OTAS_DIR + make -C $OTAC_DIR + + DATS_FILE=$DATS_DIR/build/max32690.elf + DATC_FILE=$DATC_DIR/build/max32690.elf + OTAS_FILE=$OTAS_DIR/build/max32690.elf + OTAC_FILE=$OTAC_DIR/build/max32690.elf + + echo "Testing all examples" + set +e + + connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi - fi - #------connected tests--------- - if [[ $MAX32690_OTAS_CONNECTED_TEST == 'true' ]]; then - #conencted test launcher - echo "Testing MAX32690_OTAS_CONNECTED_TEST" - set +e - #call test here - #***************** uncomment actual test here ************* - ./test_launcher.sh max32690 $dut_uart $dut_serial "ota" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - failedTestList+="| MAX32690 OTAS/C" - fi - set -e - fi - else - echo "Skipping all tests" - fi + otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) + + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi + set -e + echo "==============================================================================" echo "==============================================================================" @@ -941,9 +888,9 @@ jobs: echo "==============================================================================" echo "==============================================================================" echo - fi + fi - exit $numOfFailedTests + exit $numOfFailedTests #---------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------- #------------------------------| Erase & Unlock all required boards at once |----------------------------- @@ -951,18 +898,12 @@ jobs: - name: Clean up if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | - git clean -ffdx - git reset --hard - # leave board in known state if workflow should end early - cd .github/workflows/scripts - echo "Erasing Main MAX32655 B1" - ./mass_erase_board.sh max32655 max32655_board1 - echo "Erasing Main MAX32655 B2" - ./mass_erase_board.sh max32655 max32655_board2 - echo "Erasing Main MAX32665 B1" - ./mass_erase_board.sh max32665 max32665_board1 - echo "Erasing Main MAX32690" - ./mass_erase_board.sh max32690 max32690_board_w1 + git clean -ffdx + git reset --hard + ocderase max32655_board1 + ocderase max32655_board2 + ocderase max32665_board1 + ocderase max32690_board_w1 - name: Unlock Boards diff --git a/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c b/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c index 1335481b843..68a404b8cd3 100644 --- a/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c +++ b/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c @@ -82,37 +82,49 @@ static struct { * \return None. */ /*************************************************************************************************/ +void UART_CommonHandler(mxc_uart_regs_t *uart) +{ + int32_t err = MXC_UART_AsyncHandler(uart); + + if(err == E_INVALID) + { + // If the uart is the console, we can try to recover since it is not critical + uint8_t uartIdx = MXC_UART_GET_IDX(uart); + if(uartIdx == CONSOLE_UART) + { + MXC_UART_ClearRXFIFO(uart); + } + else + { + PAL_SYS_ASSERT(err == E_NO_ERROR); + } + } +} void UART0_IRQHandler(void) { - int result0; PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result0 = MXC_UART_AsyncHandler(MXC_UART0); - (void)result0; - PAL_SYS_ASSERT(result0 == 0); + UART_CommonHandler(MXC_UART0); } void UART1_IRQHandler(void) { - int result1; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result1 = MXC_UART_AsyncHandler(MXC_UART1); - (void)result1; - PAL_SYS_ASSERT(result1 == 0); + UART_CommonHandler(MXC_UART1); + } void UART2_IRQHandler(void) { - int result2; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result2 = MXC_UART_AsyncHandler(MXC_UART2); - (void)result2; - PAL_SYS_ASSERT(result2 == 0); + UART_CommonHandler(MXC_UART2); + } void UART3_IRQHandler(void) { - int result3; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result3 = MXC_UART_AsyncHandler(MXC_UART3); - (void)result3; - PAL_SYS_ASSERT(result3 == 0); + UART_CommonHandler(MXC_UART3); + } /*************************************************************************************************/ @@ -159,6 +171,8 @@ void RISCV_IRQHandler(void) /*************************************************************************************************/ void palUartCallback(mxc_uart_req_t* req, int error) { + + int i; for(i = 0; i < PAL_UARTS; i++) { /* Find the corresponding rqeuest and call the callback */ From 4b2dba013dafe0f438571f59bc763516f356d56c Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:29:16 -0500 Subject: [PATCH 03/38] workflow path --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index a8461d61e28..9f56f2e9064 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -658,7 +658,7 @@ jobs: #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Test OTAS MAX32655 - uses: btm-ci-scripts/otas-test@main + uses: Analog-Devices-MSDK/btm-ci-scripts/otas-test@main with: board_client: 'max32655_board1' board_server: 'max32655_board2' From c88b44ee680760c72a1bb083096a7ccf37b4c04f Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:33:23 -0500 Subject: [PATCH 04/38] path resolved? --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 9f56f2e9064..d2287f6639d 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -658,7 +658,7 @@ jobs: #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Test OTAS MAX32655 - uses: Analog-Devices-MSDK/btm-ci-scripts/otas-test@main + uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test.yml@main with: board_client: 'max32655_board1' board_server: 'max32655_board2' From f4b12d3fc8aa9df96906cb8000bc213251311999 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:47:21 -0500 Subject: [PATCH 05/38] path issue --- .github/workflows/BLE_Examples_Test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index d2287f6639d..1cb77189b1c 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -658,7 +658,8 @@ jobs: #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Test OTAS MAX32655 - uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test.yml@main + if: ${{MAX32655_OTAS_CONNECTED_TEST}} + uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main with: board_client: 'max32655_board1' board_server: 'max32655_board2' From ea2888fb3864844e15399e5abeec113cde18dd56 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:48:40 -0500 Subject: [PATCH 06/38] take out if for now --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 1cb77189b1c..5adfabaa585 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -658,7 +658,7 @@ jobs: #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Test OTAS MAX32655 - if: ${{MAX32655_OTAS_CONNECTED_TEST}} + # if: ${{env.MAX32655_OTAS_CONNECTED_TEST}} uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main with: board_client: 'max32655_board1' From e93a38ff94ffc6d9c2abda8d1404fc65f9fbc3c5 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:22:19 -0500 Subject: [PATCH 07/38] debug --- .github/workflows/BLE_Examples_Test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 5adfabaa585..d1026ac907e 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -636,7 +636,8 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | - resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 + printm + resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 #---------------------------------------------------------------------------------------------- @@ -658,7 +659,7 @@ jobs: #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Test OTAS MAX32655 - # if: ${{env.MAX32655_OTAS_CONNECTED_TEST}} + # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main with: board_client: 'max32655_board1' From a6bad0f5f5ae664eee141e09016b0750ee2dd0d7 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:25:06 -0500 Subject: [PATCH 08/38] debug --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index d1026ac907e..0e59d7d43ed 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -636,7 +636,7 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | - printm + printenv resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 From 46bdea34183dce01995280847781d8879fed17ba Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:26:21 -0500 Subject: [PATCH 09/38] source direct --- .github/workflows/BLE_Examples_Test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 0e59d7d43ed..d201211228a 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -636,6 +636,7 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | + source ~/.bashrc printenv resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 From f3b696a9fb127333ac09dc7ecba863e6da32fdf3 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:51:39 -0500 Subject: [PATCH 10/38] debug --- .github/workflows/BLE_Examples_Test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index d201211228a..011f55d8ad6 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -636,8 +636,8 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | - source ~/.bashrc - printenv + + echo $BOARD_CONFIG_PATH resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 From 0869809be79cbecdd6c08af816d47c41d6037e4d Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:56:20 -0500 Subject: [PATCH 11/38] debug --- .github/workflows/BLE_Examples_Test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 011f55d8ad6..64fa8f5c8c5 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -635,9 +635,9 @@ jobs: - name: Lock Boards if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards + shell: bash -leo pipefail {0} run: | - - echo $BOARD_CONFIG_PATH + resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 From 32da64e2e638314a4771c0277fcb30d932723d61 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:22:17 -0500 Subject: [PATCH 12/38] debug --- .github/workflows/BLE_Examples_Test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 64fa8f5c8c5..b1558e28c0d 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -59,10 +59,12 @@ jobs: # The type of runner that the job will run on runs-on: [self-hosted] if: github.event.pull_request.draft == false + #---------------------------------------------------------------------------------------------- # De inits submodules and cleans repo steps: + # Clean and remove any local modifications - name: Clean continue-on-error: true @@ -645,6 +647,7 @@ jobs: #------------------------------| Erase all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Erase Boards + shell: bash if: steps.lock_boards.outcome == 'success' id: erase_boards run: | From f54e3e144bffa76d111389a2e4d8c0ca5f68b765 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:35:16 -0500 Subject: [PATCH 13/38] debug --- .github/workflows/BLE_Examples_Test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index b1558e28c0d..f94dc005b1e 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -904,6 +904,8 @@ jobs: - name: Clean up if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | + ls /usr/bin | grep resource + git clean -ffdx git reset --hard ocderase max32655_board1 From f55fd80697165565555bc8d35b95dd15d601912e Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:36:42 -0500 Subject: [PATCH 14/38] debg --- .github/workflows/BLE_Examples_Test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index f94dc005b1e..13120b4de59 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -904,7 +904,7 @@ jobs: - name: Clean up if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | - ls /usr/bin | grep resource + git clean -ffdx git reset --hard @@ -917,7 +917,9 @@ jobs: - name: Unlock Boards if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | - resource_manager.py -u max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 + ls /usr/bin | grep resource + which resource_manager.py + resource_manager.py -u max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 #---------------------------------------------------------------------------------------------- # Save test reports - uses: actions/upload-artifact@v3 From 5768052b5a5c95ac2d8aa167bf99ad7ca8c6c43c Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:40:17 -0500 Subject: [PATCH 15/38] debug --- .github/workflows/BLE_Examples_Test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 13120b4de59..55e761210b0 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -917,6 +917,8 @@ jobs: - name: Unlock Boards if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | + + echo $SHELL ls /usr/bin | grep resource which resource_manager.py resource_manager.py -u max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 From 68d0804e9b2440668fad7061fd9266d92a400098 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:14:10 -0500 Subject: [PATCH 16/38] debug --- .github/workflows/BLE_Examples_Test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 55e761210b0..68526e16cba 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,6 +52,9 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false +defaults: + run: + shell: bash -leo pipefail {0} #---------------------------------------------------------------------------------------------- # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -668,6 +671,20 @@ jobs: with: board_client: 'max32655_board1' board_server: 'max32655_board2' + + - name: Test OTAS MAX32665 + # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' + uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main + with: + board_client: 'max32665_board1' + board_server: 'max32655_board2' + + - name: Test OTAS MAX32690 + # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' + uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main + with: + board_client: 'max32690_board_w1' + board_server: 'max32655_board2' - name: Test MAX32655 #name used for display purposes on github webpage if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32655_B2 == 'true' From 454779466c03ef6f2c69d32fc0159169c4f30c75 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:22:28 -0500 Subject: [PATCH 17/38] debug --- .github/workflows/BLE_Examples_Test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 68526e16cba..90268487b19 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -640,7 +640,6 @@ jobs: - name: Lock Boards if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards - shell: bash -leo pipefail {0} run: | resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 From e77bdfffccce4232ee262c83aa5b8155d8b5d7cd Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:25:25 -0500 Subject: [PATCH 18/38] source' --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 90268487b19..e51cb58f4ef 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -72,6 +72,7 @@ jobs: - name: Clean continue-on-error: true run: | + source ~/.bashrc # Remove local modifications set +e @@ -649,7 +650,6 @@ jobs: #------------------------------| Erase all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - name: Erase Boards - shell: bash if: steps.lock_boards.outcome == 'success' id: erase_boards run: | From 1f2fa08161c9cf26e7ba493ade909eff370181dc Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:35:02 -0500 Subject: [PATCH 19/38] debug --- .github/workflows/BLE_Examples_Test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index e51cb58f4ef..3500014c018 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -653,6 +653,7 @@ jobs: if: steps.lock_boards.outcome == 'success' id: erase_boards run: | + echo $OPENOCD_PATH ocderase max32655_board1 ocderase max32655_board2 ocderase max32665_board1 From 6e5d91cde0728d0ef4a42b7fa1b1306e84fd9cb1 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:09:41 -0500 Subject: [PATCH 20/38] debug --- .github/workflows/BLE_Examples_Test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 3500014c018..817225f2ddc 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,9 +52,9 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false -defaults: - run: - shell: bash -leo pipefail {0} +# defaults: +# run: +# shell: bash -leo pipefail {0} #---------------------------------------------------------------------------------------------- # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -642,6 +642,7 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | + printenv resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 From ddcdf857c2bea1708ae0647cc10035c64b190a7c Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:11:58 -0500 Subject: [PATCH 21/38] dbg --- .github/workflows/BLE_Examples_Test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 817225f2ddc..61114eff139 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,9 +52,9 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false -# defaults: -# run: -# shell: bash -leo pipefail {0} +defaults: + run: + shell: bash -leo pipefail {0} #---------------------------------------------------------------------------------------------- # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: From 50fb84ada7424b5554af3517bb884bec64c4293c Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 11:00:22 -0500 Subject: [PATCH 22/38] disable old test for now --- .github/workflows/BLE_Examples_Test.yml | 312 ++++++++++++------------ 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 61114eff139..ce94a7e5daf 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -687,171 +687,171 @@ jobs: board_client: 'max32690_board_w1' board_server: 'max32655_board2' - - name: Test MAX32655 #name used for display purposes on github webpage - if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32655_B2 == 'true' - id: Test_MAX32655 #id used to reference this step in other parts of the yml - run: | + # - name: Test MAX32655 #name used for display purposes on github webpage + # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32655_B2 == 'true' + # id: Test_MAX32655 #id used to reference this step in other parts of the yml + # run: | - echo - echo - echo "Examples to be tested : ${examples_to_test[@]}" - echo "MAX32655_RUN_ALL_TEST : $MAX32655_RUN_ALL_TEST" - echo "MAX32655_DATS_CONNECTED_TEST : $MAX32655_DATS_CONNECTED_TEST " - echo "MAX32655_OTAS_CONNECTED_TEST : $MAX32655_OTAS_CONNECTED_TEST" - echo "MAX32655_BLE_FILES_CHANGED : $MAX32655_BLE_FILES_CHANGED " - echo "LOCK_MAX32655_B2 : $LOCK_MAX32655_B2 " - - BOARD_SERVER="max32690_board_w1" - BOARD_CLIENT="max32690_b1" - DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc - DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats - OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas - OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac - make -C $DATC_DIR - make -C $DATS_DIR - make -C $OTAS_DIR - make -C $OTAC_DIR + # echo + # echo + # echo "Examples to be tested : ${examples_to_test[@]}" + # echo "MAX32655_RUN_ALL_TEST : $MAX32655_RUN_ALL_TEST" + # echo "MAX32655_DATS_CONNECTED_TEST : $MAX32655_DATS_CONNECTED_TEST " + # echo "MAX32655_OTAS_CONNECTED_TEST : $MAX32655_OTAS_CONNECTED_TEST" + # echo "MAX32655_BLE_FILES_CHANGED : $MAX32655_BLE_FILES_CHANGED " + # echo "LOCK_MAX32655_B2 : $LOCK_MAX32655_B2 " + + # BOARD_SERVER="max32690_board_w1" + # BOARD_CLIENT="max32690_b1" + # DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc + # DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats + # OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas + # OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac + # make -C $DATC_DIR + # make -C $DATS_DIR + # make -C $OTAS_DIR + # make -C $OTAC_DIR - DATS_FILE=$DATS_DIR/build/max32690.elf - DATC_FILE=$DATC_DIR/build/max32690.elf - OTAS_FILE=$OTAS_DIR/build/max32690.elf - OTAC_FILE=$OTAC_DIR/build/max32690.elf + # DATS_FILE=$DATS_DIR/build/max32690.elf + # DATC_FILE=$DATC_DIR/build/max32690.elf + # OTAS_FILE=$OTAS_DIR/build/max32690.elf + # OTAC_FILE=$OTAC_DIR/build/max32690.elf - echo "Testing all examples" - set +e + # echo "Testing all examples" + # set +e - connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - - otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) + # connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # fi + + # otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - set -e - - - - echo "==============================================================================" - echo "==============================================================================" - - if [[ $numOfFailedTests -ne 0 ]]; then - printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" - else - echo "Relax! ALL TESTS PASSED" - fi - echo - echo "==============================================================================" - echo "==============================================================================" - echo + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # fi + # set -e + + + + # echo "==============================================================================" + # echo "==============================================================================" + + # if [[ $numOfFailedTests -ne 0 ]]; then + # printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" + # else + # echo "Relax! ALL TESTS PASSED" + # fi + # echo + # echo "==============================================================================" + # echo "==============================================================================" + # echo - exit $numOfFailedTests - #---------------------------------------------------------------------------------------------- - - name: Test MAX32665 #name used for display purposes on github webpage - if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32665_B1 == 'true' - id: Test_MAX32665 #id used to reference this step in other parts of the yml - run: | - FILE=/home/$USER/Workspace/Resource_Share/boards_config.json - dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['uart1'])") - dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['daplink'])") - examples_to_test=(${MAX32665_EXAMPLES_TO_TEST[@]}) - echo - echo - echo "Examples to be tested : ${examples_to_test[@]}" - echo "MAX32665_RUN_ALL_TEST : $MAX32665_RUN_ALL_TEST" - echo "MAX32665_DATS_CONNECTED_TEST : $MAX32665_DATS_CONNECTED_TEST " - echo "MAX32665_OTAS_CONNECTED_TEST : $MAX32665_OTAS_CONNECTED_TEST" - echo "MAX32665_BLE_FILES_CHANGED : $MAX32665_BLE_FILES_CHANGED " - echo "LOCK_MAX32665_B1 : $LOCK_MAX32665_B1 " - - cd .github/workflows/scripts - - if [[ $MAX32665_RUN_ALL_TEST == 'true' ]]; then - echo "Testing all examples" - set +e - ./test_launcher.sh max32665 $dut_uart $dut_serial "all" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - set -e - else - if [[ $MAX32665_BLE_FILES_CHANGED == 'true' ]]; then - #------non connected tests--------- - for example in "${examples_to_test[@]}"; do - # launch single tests - echo "Running $example test on MAX32665" - set +e - ./test_launcher.sh max32665 $dut_uart $dut_serial $example - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - failedTestList+="| $example" - fi - set -e - done - - #------connected tests--------- - if [[ $MAX32665_DATS_CONNECTED_TEST == 'true' ]]; then - #conencted test launcher - echo "Testing MAX32665_DATS_CONNECTED_TEST" - set +e - ./test_launcher.sh max32665 $dut_uart $dut_serial "dats" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed_test count - let "numOfFailedTests+=$testResult" - failedTestList+="| MAX32665 Dats/c" - fi - set -e - - fi - #------connected tests--------- - if [[ $MAX32665_OTAS_CONNECTED_TEST == 'true' ]]; then - #conencted test launcher - echo "Testing MAX32665_OTAS_CONNECTED_TEST" - set +e - #call test here - #***************** uncomment actual test here ************* - ./test_launcher.sh max32665 $dut_uart $dut_serial "ota" - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - failedTestList+="| MAX32665 OTAS/C" - fi - set -e - fi - else - echo "Skipping all tests" - fi - echo "==============================================================================" - echo "==============================================================================" - - if [[ $numOfFailedTests -ne 0 ]]; then - printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" - else - echo "Relax! ALL TESTS PASSED" - fi - echo - echo "==============================================================================" - echo "==============================================================================" - echo - fi - exit $numOfFailedTests - #---------------------------------------------------------------------------------------------- - - name: Test MAX32690 #name used for display purposes on github webpage + # exit $numOfFailedTests + # #---------------------------------------------------------------------------------------------- + # - name: Test MAX32665 #name used for display purposes on github webpage + # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32665_B1 == 'true' + # id: Test_MAX32665 #id used to reference this step in other parts of the yml + # run: | + # FILE=/home/$USER/Workspace/Resource_Share/boards_config.json + # dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['uart1'])") + # dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['daplink'])") + # examples_to_test=(${MAX32665_EXAMPLES_TO_TEST[@]}) + # echo + # echo + # echo "Examples to be tested : ${examples_to_test[@]}" + # echo "MAX32665_RUN_ALL_TEST : $MAX32665_RUN_ALL_TEST" + # echo "MAX32665_DATS_CONNECTED_TEST : $MAX32665_DATS_CONNECTED_TEST " + # echo "MAX32665_OTAS_CONNECTED_TEST : $MAX32665_OTAS_CONNECTED_TEST" + # echo "MAX32665_BLE_FILES_CHANGED : $MAX32665_BLE_FILES_CHANGED " + # echo "LOCK_MAX32665_B1 : $LOCK_MAX32665_B1 " + + # cd .github/workflows/scripts + + # if [[ $MAX32665_RUN_ALL_TEST == 'true' ]]; then + # echo "Testing all examples" + # set +e + # ./test_launcher.sh max32665 $dut_uart $dut_serial "all" + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # fi + # set -e + # else + # if [[ $MAX32665_BLE_FILES_CHANGED == 'true' ]]; then + # #------non connected tests--------- + # for example in "${examples_to_test[@]}"; do + # # launch single tests + # echo "Running $example test on MAX32665" + # set +e + # ./test_launcher.sh max32665 $dut_uart $dut_serial $example + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # failedTestList+="| $example" + # fi + # set -e + # done + + # #------connected tests--------- + # if [[ $MAX32665_DATS_CONNECTED_TEST == 'true' ]]; then + # #conencted test launcher + # echo "Testing MAX32665_DATS_CONNECTED_TEST" + # set +e + # ./test_launcher.sh max32665 $dut_uart $dut_serial "dats" + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed_test count + # let "numOfFailedTests+=$testResult" + # failedTestList+="| MAX32665 Dats/c" + # fi + # set -e + + # fi + # #------connected tests--------- + # if [[ $MAX32665_OTAS_CONNECTED_TEST == 'true' ]]; then + # #conencted test launcher + # echo "Testing MAX32665_OTAS_CONNECTED_TEST" + # set +e + # #call test here + # #***************** uncomment actual test here ************* + # ./test_launcher.sh max32665 $dut_uart $dut_serial "ota" + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # failedTestList+="| MAX32665 OTAS/C" + # fi + # set -e + # fi + # else + # echo "Skipping all tests" + # fi + # echo "==============================================================================" + # echo "==============================================================================" + + # if [[ $numOfFailedTests -ne 0 ]]; then + # printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" + # else + # echo "Relax! ALL TESTS PASSED" + # fi + # echo + # echo "==============================================================================" + # echo "==============================================================================" + # echo + # fi + # exit $numOfFailedTests + # #---------------------------------------------------------------------------------------------- + # - name: Test MAX32690 #name used for display purposes on github webpage if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32690_B1 == 'true' id: Test_MAX32690 #id used to reference this step in other parts of the yml run: | From b7458893743756abb35c6e395240123f86bdacbc Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 11:01:44 -0500 Subject: [PATCH 23/38] comment out --- .github/workflows/BLE_Examples_Test.yml | 112 ++++++++++++------------ 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index ce94a7e5daf..2eb9f4ca1c3 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -755,7 +755,7 @@ jobs: # exit $numOfFailedTests - # #---------------------------------------------------------------------------------------------- + #---------------------------------------------------------------------------------------------- # - name: Test MAX32665 #name used for display purposes on github webpage # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32665_B1 == 'true' # id: Test_MAX32665 #id used to reference this step in other parts of the yml @@ -850,71 +850,71 @@ jobs: # echo # fi # exit $numOfFailedTests - # #---------------------------------------------------------------------------------------------- + #---------------------------------------------------------------------------------------------- # - name: Test MAX32690 #name used for display purposes on github webpage - if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32690_B1 == 'true' - id: Test_MAX32690 #id used to reference this step in other parts of the yml - run: | + # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32690_B1 == 'true' + # id: Test_MAX32690 #id used to reference this step in other parts of the yml + # run: | - echo "Examples to be tested : ${examples_to_test[@]}" - echo "MAX32690_RUN_ALL_TEST : $MAX32690_RUN_ALL_TEST" - echo "MAX32690_DATS_CONNECTED_TEST : $MAX32690_DATS_CONNECTED_TEST " - echo "MAX32690_OTAS_CONNECTED_TEST : $MAX32690_OTAS_CONNECTED_TEST" - echo "MAX32690_BLE_FILES_CHANGED : $MAX32690_BLE_FILES_CHANGED " - echo "LOCK_MAX32690_B1 : $LOCK_MAX32690_B1 " + # echo "Examples to be tested : ${examples_to_test[@]}" + # echo "MAX32690_RUN_ALL_TEST : $MAX32690_RUN_ALL_TEST" + # echo "MAX32690_DATS_CONNECTED_TEST : $MAX32690_DATS_CONNECTED_TEST " + # echo "MAX32690_OTAS_CONNECTED_TEST : $MAX32690_OTAS_CONNECTED_TEST" + # echo "MAX32690_BLE_FILES_CHANGED : $MAX32690_BLE_FILES_CHANGED " + # echo "LOCK_MAX32690_B1 : $LOCK_MAX32690_B1 " - BOARD_SERVER="max32690_board_w1" - BOARD_CLIENT="max32690_b1" - DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc - DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats - OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas - OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac - make -C $DATC_DIR - make -C $DATS_DIR - make -C $OTAS_DIR - make -C $OTAC_DIR + # BOARD_SERVER="max32690_board_w1" + # BOARD_CLIENT="max32690_b1" + # DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc + # DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats + # OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas + # OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac + # make -C $DATC_DIR + # make -C $DATS_DIR + # make -C $OTAS_DIR + # make -C $OTAC_DIR - DATS_FILE=$DATS_DIR/build/max32690.elf - DATC_FILE=$DATC_DIR/build/max32690.elf - OTAS_FILE=$OTAS_DIR/build/max32690.elf - OTAC_FILE=$OTAC_DIR/build/max32690.elf + # DATS_FILE=$DATS_DIR/build/max32690.elf + # DATC_FILE=$DATC_DIR/build/max32690.elf + # OTAS_FILE=$OTAS_DIR/build/max32690.elf + # OTAC_FILE=$OTAC_DIR/build/max32690.elf - echo "Testing all examples" - set +e + # echo "Testing all examples" + # set +e - connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - - otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) + # connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # fi + + # otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) - let "testResult=$?" - if [ "$testResult" -ne "0" ]; then - # update failed test count - let "numOfFailedTests+=$testResult" - fi - set -e + # let "testResult=$?" + # if [ "$testResult" -ne "0" ]; then + # # update failed test count + # let "numOfFailedTests+=$testResult" + # fi + # set -e - echo "==============================================================================" - echo "==============================================================================" - - if [[ $numOfFailedTests -ne 0 ]]; then - printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" - else - echo "Relax! ALL TESTS PASSED" - fi - echo - echo "==============================================================================" - echo "==============================================================================" - echo - fi - - exit $numOfFailedTests + # echo "==============================================================================" + # echo "==============================================================================" + + # if [[ $numOfFailedTests -ne 0 ]]; then + # printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" + # else + # echo "Relax! ALL TESTS PASSED" + # fi + # echo + # echo "==============================================================================" + # echo "==============================================================================" + # echo + # fi + + # exit $numOfFailedTests #---------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------- #------------------------------| Erase & Unlock all required boards at once |----------------------------- From 14cf7cb159fe1e025d8399afad03eca74aafb41c Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:59:23 -0500 Subject: [PATCH 24/38] updated action path --- .github/workflows/BLE_Examples_Test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 2eb9f4ca1c3..e152deae984 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -668,21 +668,21 @@ jobs: #---------------------------------------------------------------------------------------------- - name: Test OTAS MAX32655 # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' - uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main + uses: Analog-Devices-MSDK/btm-ci-scripts/actions/otas-test@main with: board_client: 'max32655_board1' board_server: 'max32655_board2' - name: Test OTAS MAX32665 # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' - uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main + uses: Analog-Devices-MSDK/btm-ci-scripts/actions/otas-test@main with: board_client: 'max32665_board1' board_server: 'max32655_board2' - name: Test OTAS MAX32690 # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' - uses: Analog-Devices-MSDK/btm-ci-scripts/.github/actions/otas-test@main + uses: Analog-Devices-MSDK/btm-ci-scripts/actions/otas-test@main with: board_client: 'max32690_board_w1' board_server: 'max32655_board2' From f9a45198aaa612bb9b3142e2983bbd2f74a8418d Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:17:37 -0500 Subject: [PATCH 25/38] try to pull env variables --- .github/workflows/BLE_Examples_Test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index e152deae984..03c3a2ca9f7 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,6 +52,7 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false + CI_BOARD_CONFIG: ${{env.CI_BOARD_CONFIG}} defaults: run: shell: bash -leo pipefail {0} From d56da6c44b8ee8c264b2bdfefa054bda346047ae Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:19:25 -0500 Subject: [PATCH 26/38] env maybe??? --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 03c3a2ca9f7..85501eb119a 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,7 +52,7 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false - CI_BOARD_CONFIG: ${{env.CI_BOARD_CONFIG}} + CI_BOARD_CONFIG: ${{ vars.CI_BOARD_CONFIG }} defaults: run: shell: bash -leo pipefail {0} From 1e4d5ed57af1fd71ca4b6edd263d5e58ca57f234 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:10:23 -0500 Subject: [PATCH 27/38] playing around with env variables --- .github/workflows/BLE_Examples_Test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 85501eb119a..00847c4162a 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,7 +52,9 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false - CI_BOARD_CONFIG: ${{ vars.CI_BOARD_CONFIG }} +# CI_BOARD_CONFIG: ${{ vars.CI_BOARD_CONFIG }} +# RESOURCE_LOCK_DIR: ${{ vars.RESOURCE_LOCK_DIR }} + defaults: run: shell: bash -leo pipefail {0} @@ -68,12 +70,15 @@ jobs: #---------------------------------------------------------------------------------------------- # De inits submodules and cleans repo steps: - + - name: test1 + run: | + printenv + # Clean and remove any local modifications - name: Clean continue-on-error: true run: | - source ~/.bashrc + # Remove local modifications set +e From c02947233dd36b16d228607510c0a20990ea4a9f Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:19:56 -0500 Subject: [PATCH 28/38] run default --- .github/workflows/BLE_Examples_Test.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 00847c4162a..f3e6b3a6b2c 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,12 +52,11 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false -# CI_BOARD_CONFIG: ${{ vars.CI_BOARD_CONFIG }} -# RESOURCE_LOCK_DIR: ${{ vars.RESOURCE_LOCK_DIR }} -defaults: - run: - shell: bash -leo pipefail {0} + +# defaults: +# run: +# shell: bash -leo pipefail {0} #---------------------------------------------------------------------------------------------- # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -70,10 +69,8 @@ jobs: #---------------------------------------------------------------------------------------------- # De inits submodules and cleans repo steps: - - name: test1 - run: | - printenv - + + # Clean and remove any local modifications - name: Clean continue-on-error: true From 632cc10e202f828b1e25a244394b990e79eb03ee Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:20:35 -0500 Subject: [PATCH 29/38] debug global --- .github/workflows/BLE_Examples_Test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index f3e6b3a6b2c..5c004f64f35 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -69,7 +69,9 @@ jobs: #---------------------------------------------------------------------------------------------- # De inits submodules and cleans repo steps: - + - name: Test1 + run: | + printenv # Clean and remove any local modifications - name: Clean From 615c5414b372f497395bc3a0c3a38e0f0dc0758f Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:41:22 -0500 Subject: [PATCH 30/38] debug --- .github/workflows/BLE_Examples_Test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 5c004f64f35..6503e23ecec 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -71,7 +71,9 @@ jobs: steps: - name: Test1 run: | - printenv + echo $CI_BOARD_CONFIG + + # printenv # Clean and remove any local modifications - name: Clean From 8fadc3a0e0a8abc5d31007b30b11819bdedd29af Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:43:06 -0500 Subject: [PATCH 31/38] Debug --- .github/workflows/BLE_Examples_Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 6503e23ecec..8dfd3e6bb10 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -73,7 +73,7 @@ jobs: run: | echo $CI_BOARD_CONFIG - # printenv + printenv # Clean and remove any local modifications - name: Clean From 1afab8fec2a951fed545b9e5b9ab9c7a333f6dab Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Fri, 26 Apr 2024 09:31:50 -0500 Subject: [PATCH 32/38] wf update --- .github/workflows/BLE_Examples_Test.yml | 5 ----- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index 8dfd3e6bb10..cf01c2db842 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -69,11 +69,6 @@ jobs: #---------------------------------------------------------------------------------------------- # De inits submodules and cleans repo steps: - - name: Test1 - run: | - echo $CI_BOARD_CONFIG - - printenv # Clean and remove any local modifications - name: Clean diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index da82f678825..cfacb8ad466 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -755,12 +755,14 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) /* Unexpected interrupt */ if (!AsyncTxRequests[uart_num] && !AsyncRxRequests[uart_num]) { MXC_UART_ClearFlags((mxc_uart_regs_t *)uart, uart->int_fl); + return E_INVALID; } if (flags & MXC_UART_REVB_ERRINT_FL & uart->int_en) { MXC_UART_AsyncStop((mxc_uart_regs_t *)uart); MXC_UART_AsyncCallback((mxc_uart_regs_t *)uart, E_COMM_ERR); + return E_INVALID; } From 1cdad7c1191593afa195594db93448ced361b537 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Thu, 9 May 2024 13:47:38 -0500 Subject: [PATCH 33/38] Update BLE_Examples_Test.yml --- .github/workflows/BLE_Examples_Test.yml | 585 +++++++++++++----------- 1 file changed, 308 insertions(+), 277 deletions(-) diff --git a/.github/workflows/BLE_Examples_Test.yml b/.github/workflows/BLE_Examples_Test.yml index cf01c2db842..b9e246f541e 100644 --- a/.github/workflows/BLE_Examples_Test.yml +++ b/.github/workflows/BLE_Examples_Test.yml @@ -52,11 +52,6 @@ env: LOCK_MAX32655_B2: false LOCK_MAX32655_B1: false LOCK_MAX32665_B1: false - - -# defaults: -# run: -# shell: bash -leo pipefail {0} #---------------------------------------------------------------------------------------------- # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -64,17 +59,14 @@ jobs: # The type of runner that the job will run on runs-on: [self-hosted] if: github.event.pull_request.draft == false - #---------------------------------------------------------------------------------------------- # De inits submodules and cleans repo steps: - # Clean and remove any local modifications - name: Clean continue-on-error: true run: | - # Remove local modifications set +e @@ -644,10 +636,7 @@ jobs: if: env.LOCK_MAX32655_B1 == 'true' || env.LOCK_MAX32655_B2 == 'true' || env.LOCK_MAX32665_B1 == 'true' || env.LOCK_MAX32690_B1 == 'true' id: lock_boards run: | - printenv - - resource_manager.py -l max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 -t 3600 - + python3 /home/$USER/Workspace/Resource_Share/Resource_Share_multiboard.py -l -t 3600 -b max32655_board1 -b max32655_board2 -b max32665_board1 -b max32690_board_w1 #---------------------------------------------------------------------------------------------- #------------------------------| Erase all required boards at once |----------------------------- @@ -656,267 +645,309 @@ jobs: if: steps.lock_boards.outcome == 'success' id: erase_boards run: | - echo $OPENOCD_PATH - ocderase max32655_board1 - ocderase max32655_board2 - ocderase max32665_board1 - ocderase max32690_board_w1 - + # start with boards in known state + cd .github/workflows/scripts + echo "Erasing Main MAX32655 B1" + ./mass_erase_board.sh max32655 max32655_board1 + echo "Erasing Main MAX32655 B2" + ./mass_erase_board.sh max32655 max32655_board2 + echo "Erasing Main MAX32665 B1" + ./mass_erase_board.sh max32665 max32665_board1 + echo "Erasing Main MAX32690" + ./mass_erase_board.sh max32690 max32690_board_w1 #---------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------- #------------------------------| Test all required boards at once |----------------------------- #---------------------------------------------------------------------------------------------- - - name: Test OTAS MAX32655 - # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' - uses: Analog-Devices-MSDK/btm-ci-scripts/actions/otas-test@main - with: - board_client: 'max32655_board1' - board_server: 'max32655_board2' - - - name: Test OTAS MAX32665 - # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' - uses: Analog-Devices-MSDK/btm-ci-scripts/actions/otas-test@main - with: - board_client: 'max32665_board1' - board_server: 'max32655_board2' - - - name: Test OTAS MAX32690 - # if: env.MAX32655_OTAS_CONNECTED_TEST = 'true' - uses: Analog-Devices-MSDK/btm-ci-scripts/actions/otas-test@main - with: - board_client: 'max32690_board_w1' - board_server: 'max32655_board2' - # - name: Test MAX32655 #name used for display purposes on github webpage - # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32655_B2 == 'true' - # id: Test_MAX32655 #id used to reference this step in other parts of the yml - # run: | - - - - # echo - # echo - # echo "Examples to be tested : ${examples_to_test[@]}" - # echo "MAX32655_RUN_ALL_TEST : $MAX32655_RUN_ALL_TEST" - # echo "MAX32655_DATS_CONNECTED_TEST : $MAX32655_DATS_CONNECTED_TEST " - # echo "MAX32655_OTAS_CONNECTED_TEST : $MAX32655_OTAS_CONNECTED_TEST" - # echo "MAX32655_BLE_FILES_CHANGED : $MAX32655_BLE_FILES_CHANGED " - # echo "LOCK_MAX32655_B2 : $LOCK_MAX32655_B2 " - - # BOARD_SERVER="max32690_board_w1" - # BOARD_CLIENT="max32690_b1" - # DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc - # DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats - # OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas - # OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac - # make -C $DATC_DIR - # make -C $DATS_DIR - # make -C $OTAS_DIR - # make -C $OTAC_DIR - - # DATS_FILE=$DATS_DIR/build/max32690.elf - # DATC_FILE=$DATC_DIR/build/max32690.elf - # OTAS_FILE=$OTAS_DIR/build/max32690.elf - # OTAC_FILE=$OTAC_DIR/build/max32690.elf - - # echo "Testing all examples" - # set +e - - # connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # fi - - # otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) - - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # fi - # set -e - - - - # echo "==============================================================================" - # echo "==============================================================================" - - # if [[ $numOfFailedTests -ne 0 ]]; then - # printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" - # else - # echo "Relax! ALL TESTS PASSED" - # fi - # echo - # echo "==============================================================================" - # echo "==============================================================================" - # echo - - - # exit $numOfFailedTests + - name: Test MAX32655 #name used for display purposes on github webpage + if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32655_B2 == 'true' + id: Test_MAX32655 #id used to reference this step in other parts of the yml + run: | + FILE=/home/$USER/Workspace/Resource_Share/boards_config.json + dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32655_board2']['uart0'])") + dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32655_board2']['daplink'])") + examples_to_test=(${MAX32655_EXAMPLES_TO_TEST[@]}) + echo + echo + echo "Examples to be tested : ${examples_to_test[@]}" + echo "MAX32655_RUN_ALL_TEST : $MAX32655_RUN_ALL_TEST" + echo "MAX32655_DATS_CONNECTED_TEST : $MAX32655_DATS_CONNECTED_TEST " + echo "MAX32655_OTAS_CONNECTED_TEST : $MAX32655_OTAS_CONNECTED_TEST" + echo "MAX32655_BLE_FILES_CHANGED : $MAX32655_BLE_FILES_CHANGED " + echo "LOCK_MAX32655_B2 : $LOCK_MAX32655_B2 " + + cd .github/workflows/scripts + + if [[ $MAX32655_RUN_ALL_TEST == 'true' ]]; then + echo "Testing all examples" + set +e + ./test_launcher.sh max32655 $dut_uart $dut_serial "all" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi + set -e + else + if [[ $MAX32655_BLE_FILES_CHANGED == 'true' ]]; then + #------non connected tests--------- + for example in "${examples_to_test[@]}"; do + # launch single tests + echo "Running $example test on MAX32655" + set +e + ./test_launcher.sh max32655 $dut_uart $dut_serial $example + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + failedTestList+="| $example" + fi + set -e + done + + #------connected tests--------- + if [[ $MAX32655_DATS_CONNECTED_TEST == 'true' ]]; then + #conencted test launcher + echo "Testing MAX32655_DATS_CONNECTED_TEST" + set +e + ./test_launcher.sh max32655 $dut_uart $dut_serial "dats" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed_test count + let "numOfFailedTests+=$testResult" + failedTestList+="| MAX32655 Dats/c" + fi + set -e + + fi + #------connected tests--------- + if [[ $MAX32655_OTAS_CONNECTED_TEST == 'true' ]]; then + #conencted test launcher + echo "Testing MAX32655_OTAS_CONNECTED_TEST" + set +e + #call test here + #***************** uncomment actual test here ************* + ./test_launcher.sh max32655 $dut_uart $dut_serial "ota" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + failedTestList+="| MAX32655 OTAS/C" + fi + set -e + fi + else + echo "Skipping all tests" + fi + echo "==============================================================================" + echo "==============================================================================" + + if [[ $numOfFailedTests -ne 0 ]]; then + printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" + else + echo "Relax! ALL TESTS PASSED" + fi + echo + echo "==============================================================================" + echo "==============================================================================" + echo + fi + + exit $numOfFailedTests #---------------------------------------------------------------------------------------------- - # - name: Test MAX32665 #name used for display purposes on github webpage - # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32665_B1 == 'true' - # id: Test_MAX32665 #id used to reference this step in other parts of the yml - # run: | - # FILE=/home/$USER/Workspace/Resource_Share/boards_config.json - # dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['uart1'])") - # dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['daplink'])") - # examples_to_test=(${MAX32665_EXAMPLES_TO_TEST[@]}) - # echo - # echo - # echo "Examples to be tested : ${examples_to_test[@]}" - # echo "MAX32665_RUN_ALL_TEST : $MAX32665_RUN_ALL_TEST" - # echo "MAX32665_DATS_CONNECTED_TEST : $MAX32665_DATS_CONNECTED_TEST " - # echo "MAX32665_OTAS_CONNECTED_TEST : $MAX32665_OTAS_CONNECTED_TEST" - # echo "MAX32665_BLE_FILES_CHANGED : $MAX32665_BLE_FILES_CHANGED " - # echo "LOCK_MAX32665_B1 : $LOCK_MAX32665_B1 " - - # cd .github/workflows/scripts - - # if [[ $MAX32665_RUN_ALL_TEST == 'true' ]]; then - # echo "Testing all examples" - # set +e - # ./test_launcher.sh max32665 $dut_uart $dut_serial "all" - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # fi - # set -e - # else - # if [[ $MAX32665_BLE_FILES_CHANGED == 'true' ]]; then - # #------non connected tests--------- - # for example in "${examples_to_test[@]}"; do - # # launch single tests - # echo "Running $example test on MAX32665" - # set +e - # ./test_launcher.sh max32665 $dut_uart $dut_serial $example - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # failedTestList+="| $example" - # fi - # set -e - # done - - # #------connected tests--------- - # if [[ $MAX32665_DATS_CONNECTED_TEST == 'true' ]]; then - # #conencted test launcher - # echo "Testing MAX32665_DATS_CONNECTED_TEST" - # set +e - # ./test_launcher.sh max32665 $dut_uart $dut_serial "dats" - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed_test count - # let "numOfFailedTests+=$testResult" - # failedTestList+="| MAX32665 Dats/c" - # fi - # set -e - - # fi - # #------connected tests--------- - # if [[ $MAX32665_OTAS_CONNECTED_TEST == 'true' ]]; then - # #conencted test launcher - # echo "Testing MAX32665_OTAS_CONNECTED_TEST" - # set +e - # #call test here - # #***************** uncomment actual test here ************* - # ./test_launcher.sh max32665 $dut_uart $dut_serial "ota" - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # failedTestList+="| MAX32665 OTAS/C" - # fi - # set -e - # fi - # else - # echo "Skipping all tests" - # fi - # echo "==============================================================================" - # echo "==============================================================================" - - # if [[ $numOfFailedTests -ne 0 ]]; then - # printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" - # else - # echo "Relax! ALL TESTS PASSED" - # fi - # echo - # echo "==============================================================================" - # echo "==============================================================================" - # echo - # fi - # exit $numOfFailedTests + - name: Test MAX32665 #name used for display purposes on github webpage + if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32665_B1 == 'true' + id: Test_MAX32665 #id used to reference this step in other parts of the yml + run: | + FILE=/home/$USER/Workspace/Resource_Share/boards_config.json + dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['uart1'])") + dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32665_board1']['daplink'])") + examples_to_test=(${MAX32665_EXAMPLES_TO_TEST[@]}) + echo + echo + echo "Examples to be tested : ${examples_to_test[@]}" + echo "MAX32665_RUN_ALL_TEST : $MAX32665_RUN_ALL_TEST" + echo "MAX32665_DATS_CONNECTED_TEST : $MAX32665_DATS_CONNECTED_TEST " + echo "MAX32665_OTAS_CONNECTED_TEST : $MAX32665_OTAS_CONNECTED_TEST" + echo "MAX32665_BLE_FILES_CHANGED : $MAX32665_BLE_FILES_CHANGED " + echo "LOCK_MAX32665_B1 : $LOCK_MAX32665_B1 " + + cd .github/workflows/scripts + + if [[ $MAX32665_RUN_ALL_TEST == 'true' ]]; then + echo "Testing all examples" + set +e + ./test_launcher.sh max32665 $dut_uart $dut_serial "all" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi + set -e + else + if [[ $MAX32665_BLE_FILES_CHANGED == 'true' ]]; then + #------non connected tests--------- + for example in "${examples_to_test[@]}"; do + # launch single tests + echo "Running $example test on MAX32665" + set +e + ./test_launcher.sh max32665 $dut_uart $dut_serial $example + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + failedTestList+="| $example" + fi + set -e + done + + #------connected tests--------- + if [[ $MAX32665_DATS_CONNECTED_TEST == 'true' ]]; then + #conencted test launcher + echo "Testing MAX32665_DATS_CONNECTED_TEST" + set +e + ./test_launcher.sh max32665 $dut_uart $dut_serial "dats" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed_test count + let "numOfFailedTests+=$testResult" + failedTestList+="| MAX32665 Dats/c" + fi + set -e + + fi + #------connected tests--------- + if [[ $MAX32665_OTAS_CONNECTED_TEST == 'true' ]]; then + #conencted test launcher + echo "Testing MAX32665_OTAS_CONNECTED_TEST" + set +e + #call test here + #***************** uncomment actual test here ************* + ./test_launcher.sh max32665 $dut_uart $dut_serial "ota" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + failedTestList+="| MAX32665 OTAS/C" + fi + set -e + fi + else + echo "Skipping all tests" + fi + echo "==============================================================================" + echo "==============================================================================" + + if [[ $numOfFailedTests -ne 0 ]]; then + printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" + else + echo "Relax! ALL TESTS PASSED" + fi + echo + echo "==============================================================================" + echo "==============================================================================" + echo + fi + exit $numOfFailedTests #---------------------------------------------------------------------------------------------- - # - name: Test MAX32690 #name used for display purposes on github webpage - # if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32690_B1 == 'true' - # id: Test_MAX32690 #id used to reference this step in other parts of the yml - # run: | - - - # echo "Examples to be tested : ${examples_to_test[@]}" - # echo "MAX32690_RUN_ALL_TEST : $MAX32690_RUN_ALL_TEST" - # echo "MAX32690_DATS_CONNECTED_TEST : $MAX32690_DATS_CONNECTED_TEST " - # echo "MAX32690_OTAS_CONNECTED_TEST : $MAX32690_OTAS_CONNECTED_TEST" - # echo "MAX32690_BLE_FILES_CHANGED : $MAX32690_BLE_FILES_CHANGED " - # echo "LOCK_MAX32690_B1 : $LOCK_MAX32690_B1 " - - - # BOARD_SERVER="max32690_board_w1" - # BOARD_CLIENT="max32690_b1" - # DATC_DIR=Examples/MAX32690/Bluetooth/BLE_datc - # DATS_DIR=Examples/MAX32690/Bluetooth/BLE_dats - # OTAS_DIR=Examples/MAX32690/Bluetooth/BLE_otas - # OTAC_DIR=Examples/MAX32690/Bluetooth/BLE_otac - # make -C $DATC_DIR - # make -C $DATS_DIR - # make -C $OTAS_DIR - # make -C $OTAC_DIR - - # DATS_FILE=$DATS_DIR/build/max32690.elf - # DATC_FILE=$DATC_DIR/build/max32690.elf - # OTAS_FILE=$OTAS_DIR/build/max32690.elf - # OTAC_FILE=$OTAC_DIR/build/max32690.elf - - # echo "Testing all examples" - # set +e - - # connectedTests=$(datsc_connected.py $BOARD_SERVER $BOARD_CLIENT $DATS_DIR $DATC_DIR) - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # fi - - # otasTest=$(otas_connected.py $BOARD_SERVER $BOARD_CLIENT $OTAS_DIR $OTAC_DIR) - - # let "testResult=$?" - # if [ "$testResult" -ne "0" ]; then - # # update failed test count - # let "numOfFailedTests+=$testResult" - # fi - # set -e - - # echo "==============================================================================" - # echo "==============================================================================" - - # if [[ $numOfFailedTests -ne 0 ]]; then - # printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" - # else - # echo "Relax! ALL TESTS PASSED" - # fi - # echo - # echo "==============================================================================" - # echo "==============================================================================" - # echo - # fi - - # exit $numOfFailedTests + - name: Test MAX32690 #name used for display purposes on github webpage + if: steps.lock_boards.outcome == 'success' && env.LOCK_MAX32690_B1 == 'true' + id: Test_MAX32690 #id used to reference this step in other parts of the yml + run: | + FILE=/home/$USER/Workspace/Resource_Share/boards_config.json + dut_uart=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32690_board_w1']['uart2'])") + dut_serial=$(/usr/bin/python3 -c "import sys, json; print(json.load(open('$FILE'))['max32690_board_w1']['daplink'])") + examples_to_test=(${MAX32690_EXAMPLES_TO_TEST[@]}) + echo + echo + echo "Examples to be tested : ${examples_to_test[@]}" + echo "MAX32690_RUN_ALL_TEST : $MAX32690_RUN_ALL_TEST" + echo "MAX32690_DATS_CONNECTED_TEST : $MAX32690_DATS_CONNECTED_TEST " + echo "MAX32690_OTAS_CONNECTED_TEST : $MAX32690_OTAS_CONNECTED_TEST" + echo "MAX32690_BLE_FILES_CHANGED : $MAX32690_BLE_FILES_CHANGED " + echo "LOCK_MAX32690_B1 : $LOCK_MAX32690_B1 " + + cd .github/workflows/scripts + + if [[ $MAX32690_RUN_ALL_TEST == 'true' ]]; then + echo "Testing all examples" + set +e + ./test_launcher.sh max32690 $dut_uart $dut_serial "all" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + fi + set -e + else + if [[ $MAX32690_BLE_FILES_CHANGED == 'true' ]]; then + #------non connected tests--------- + for example in "${examples_to_test[@]}"; do + # launch single tests + echo "Running $example test on MAX32690" + set +e + ./test_launcher.sh max32690 $dut_uart $dut_serial $example + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + failedTestList+="| $example" + fi + set -e + done + + #------connected tests--------- + if [[ $MAX32690_DATS_CONNECTED_TEST == 'true' ]]; then + #conencted test launcher + echo "Testing MAX32690_DATS_CONNECTED_TEST" + set +e + ./test_launcher.sh max32690 $dut_uart $dut_serial "dats" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed_test count + let "numOfFailedTests+=$testResult" + failedTestList+="| MAX32690 Dats/c" + fi + set -e + + fi + #------connected tests--------- + if [[ $MAX32690_OTAS_CONNECTED_TEST == 'true' ]]; then + #conencted test launcher + echo "Testing MAX32690_OTAS_CONNECTED_TEST" + set +e + #call test here + #***************** uncomment actual test here ************* + ./test_launcher.sh max32690 $dut_uart $dut_serial "ota" + let "testResult=$?" + if [ "$testResult" -ne "0" ]; then + # update failed test count + let "numOfFailedTests+=$testResult" + failedTestList+="| MAX32690 OTAS/C" + fi + set -e + fi + else + echo "Skipping all tests" + fi + echo "==============================================================================" + echo "==============================================================================" + + if [[ $numOfFailedTests -ne 0 ]]; then + printf "Test completed with $numOfFailedTests failed tests located in: \r\n $failedTestList" + else + echo "Relax! ALL TESTS PASSED" + fi + echo + echo "==============================================================================" + echo "==============================================================================" + echo + fi + + exit $numOfFailedTests #---------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------- #------------------------------| Erase & Unlock all required boards at once |----------------------------- @@ -924,24 +955,24 @@ jobs: - name: Clean up if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | - - - git clean -ffdx - git reset --hard - ocderase max32655_board1 - ocderase max32655_board2 - ocderase max32665_board1 - ocderase max32690_board_w1 + git clean -ffdx + git reset --hard + # leave board in known state if workflow should end early + cd .github/workflows/scripts + echo "Erasing Main MAX32655 B1" + ./mass_erase_board.sh max32655 max32655_board1 + echo "Erasing Main MAX32655 B2" + ./mass_erase_board.sh max32655 max32655_board2 + echo "Erasing Main MAX32665 B1" + ./mass_erase_board.sh max32665 max32665_board1 + echo "Erasing Main MAX32690" + ./mass_erase_board.sh max32690 max32690_board_w1 - name: Unlock Boards if: ${{ always() && steps.lock_boards.outcome == 'success'}} run: | - - echo $SHELL - ls /usr/bin | grep resource - which resource_manager.py - resource_manager.py -u max32655_board1 max32655_board2 max32665_board1 max32690_board_w1 + python3 /home/$USER/Workspace/Resource_Share/Resource_Share_multiboard.py -b max32655_board1 -b max32655_board2 -b max32665_board1 -b max32690_board_w1 #---------------------------------------------------------------------------------------------- # Save test reports - uses: actions/upload-artifact@v3 From 1d810125408a13bcad4d25f7d185960aff9d6ef2 Mon Sep 17 00:00:00 2001 From: EricB-ADI Date: Thu, 9 May 2024 18:52:58 +0000 Subject: [PATCH 34/38] clang-format bot reformatting. --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index cfacb8ad466..aa97df77afd 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -755,14 +755,14 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) /* Unexpected interrupt */ if (!AsyncTxRequests[uart_num] && !AsyncRxRequests[uart_num]) { MXC_UART_ClearFlags((mxc_uart_regs_t *)uart, uart->int_fl); - + return E_INVALID; } if (flags & MXC_UART_REVB_ERRINT_FL & uart->int_en) { MXC_UART_AsyncStop((mxc_uart_regs_t *)uart); MXC_UART_AsyncCallback((mxc_uart_regs_t *)uart, E_COMM_ERR); - + return E_INVALID; } From 713a45c4b67989f9800ee4502edc25c257ecfe8d Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Fri, 10 May 2024 08:35:03 -0500 Subject: [PATCH 35/38] removed extra newline from revb driver --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index aa97df77afd..44dd6eb5543 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -755,18 +755,12 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) /* Unexpected interrupt */ if (!AsyncTxRequests[uart_num] && !AsyncRxRequests[uart_num]) { MXC_UART_ClearFlags((mxc_uart_regs_t *)uart, uart->int_fl); - return E_INVALID; } if (flags & MXC_UART_REVB_ERRINT_FL & uart->int_en) { MXC_UART_AsyncStop((mxc_uart_regs_t *)uart); MXC_UART_AsyncCallback((mxc_uart_regs_t *)uart, E_COMM_ERR); - - return E_INVALID; - } - - req = (mxc_uart_req_t *)AsyncTxRequests[uart_num]; if ((req != NULL) && (req->txLen)) { numToWrite = MXC_UART_GetTXFIFOAvailable((mxc_uart_regs_t *)(req->uart)); numToWrite = numToWrite > (req->txLen - req->txCnt) ? req->txLen - req->txCnt : numToWrite; From 7c961fe0adf082633e49dbd641d2f44293475e13 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Fri, 10 May 2024 08:37:21 -0500 Subject: [PATCH 36/38] fixed deleted code --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index 44dd6eb5543..46a0044e3ef 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -761,6 +761,10 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) if (flags & MXC_UART_REVB_ERRINT_FL & uart->int_en) { MXC_UART_AsyncStop((mxc_uart_regs_t *)uart); MXC_UART_AsyncCallback((mxc_uart_regs_t *)uart, E_COMM_ERR); + return E_INVALID; + } + + req = (mxc_uart_req_t *)AsyncTxRequests[uart_num]; if ((req != NULL) && (req->txLen)) { numToWrite = MXC_UART_GetTXFIFOAvailable((mxc_uart_regs_t *)(req->uart)); numToWrite = numToWrite > (req->txLen - req->txCnt) ? req->txLen - req->txCnt : numToWrite; From f9e5cfb4274b6b5ca18db75dd41c3b108bceef5a Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Fri, 10 May 2024 08:38:03 -0500 Subject: [PATCH 37/38] restore complete --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index 46a0044e3ef..da82f678825 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -761,7 +761,7 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) if (flags & MXC_UART_REVB_ERRINT_FL & uart->int_en) { MXC_UART_AsyncStop((mxc_uart_regs_t *)uart); MXC_UART_AsyncCallback((mxc_uart_regs_t *)uart, E_COMM_ERR); - return E_INVALID; + return E_INVALID; } req = (mxc_uart_req_t *)AsyncTxRequests[uart_num]; From e372fac168c22f8f065c93eb41c09e3587fb20c5 Mon Sep 17 00:00:00 2001 From: EricB-ADI <122300463+EricB-ADI@users.noreply.github.com> Date: Fri, 10 May 2024 08:50:06 -0500 Subject: [PATCH 38/38] added update to 690 --- .../targets/maxim/max32655/sources/pal_uart.c | 12 +++-- .../targets/maxim/max32690/sources/pal_uart.c | 46 ++++++++++++------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c b/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c index 68a404b8cd3..61b0c723aab 100644 --- a/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c +++ b/Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c @@ -84,13 +84,12 @@ static struct { /*************************************************************************************************/ void UART_CommonHandler(mxc_uart_regs_t *uart) { - int32_t err = MXC_UART_AsyncHandler(uart); + const int32_t err = MXC_UART_AsyncHandler(uart); if(err == E_INVALID) { // If the uart is the console, we can try to recover since it is not critical - uint8_t uartIdx = MXC_UART_GET_IDX(uart); - if(uartIdx == CONSOLE_UART) + if(MXC_UART_GET_IDX(uart) == CONSOLE_UART) { MXC_UART_ClearRXFIFO(uart); } @@ -99,11 +98,14 @@ void UART_CommonHandler(mxc_uart_regs_t *uart) PAL_SYS_ASSERT(err == E_NO_ERROR); } } + } void UART0_IRQHandler(void) { + PalLedOn(PAL_LED_ID_CPU_ACTIVE); UART_CommonHandler(MXC_UART0); + } void UART1_IRQHandler(void) { @@ -113,7 +115,7 @@ void UART1_IRQHandler(void) } void UART2_IRQHandler(void) -{ +{ PalLedOn(PAL_LED_ID_CPU_ACTIVE); UART_CommonHandler(MXC_UART2); @@ -121,7 +123,7 @@ void UART2_IRQHandler(void) } void UART3_IRQHandler(void) { - + PalLedOn(PAL_LED_ID_CPU_ACTIVE); UART_CommonHandler(MXC_UART3); diff --git a/Libraries/Cordio/platform/targets/maxim/max32690/sources/pal_uart.c b/Libraries/Cordio/platform/targets/maxim/max32690/sources/pal_uart.c index 1335481b843..139a4262fb3 100644 --- a/Libraries/Cordio/platform/targets/maxim/max32690/sources/pal_uart.c +++ b/Libraries/Cordio/platform/targets/maxim/max32690/sources/pal_uart.c @@ -82,37 +82,51 @@ static struct { * \return None. */ /*************************************************************************************************/ +void UART_CommonHandler(mxc_uart_regs_t *uart) +{ + const int32_t err = MXC_UART_AsyncHandler(uart); + + if(err == E_INVALID) + { + // If the uart is the console, we can try to recover since it is not critical + if(MXC_UART_GET_IDX(uart) == CONSOLE_UART) + { + MXC_UART_ClearRXFIFO(uart); + } + else + { + PAL_SYS_ASSERT(err == E_NO_ERROR); + } + } + +} void UART0_IRQHandler(void) { - int result0; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result0 = MXC_UART_AsyncHandler(MXC_UART0); - (void)result0; - PAL_SYS_ASSERT(result0 == 0); + UART_CommonHandler(MXC_UART0); + } void UART1_IRQHandler(void) { - int result1; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result1 = MXC_UART_AsyncHandler(MXC_UART1); - (void)result1; - PAL_SYS_ASSERT(result1 == 0); + UART_CommonHandler(MXC_UART1); + } void UART2_IRQHandler(void) { - int result2; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result2 = MXC_UART_AsyncHandler(MXC_UART2); - (void)result2; - PAL_SYS_ASSERT(result2 == 0); + UART_CommonHandler(MXC_UART2); + } void UART3_IRQHandler(void) { - int result3; + PalLedOn(PAL_LED_ID_CPU_ACTIVE); - result3 = MXC_UART_AsyncHandler(MXC_UART3); - (void)result3; - PAL_SYS_ASSERT(result3 == 0); + UART_CommonHandler(MXC_UART3); + } /*************************************************************************************************/