only:extracting reusable script

This commit is contained in:
Andrey 2023-07-04 09:49:16 -04:00
parent 4f7666b079
commit 22fe75745a
2 changed files with 13 additions and 2 deletions

View File

@ -68,8 +68,7 @@ jobs:
run: lsusb | grep 'ST-LINK\|STLINK'
- name: OpenOCD wipe & flash STM32
working-directory: ./firmware
run: openocd -f "${{matrix.openocd-script}}" -c init -c targets -c "reset halt" -c "flash erase_sector 0 0 11" -c "flash write_image "deliver/rusefi.bin" 0x08000000" -c "reset run" -c "shutdown"
run: .github/workflows/hw-ci/openocd_wipe_and_flash.sh ${{matrix.openocd-script}}
- name: Generate Autotest Jar
working-directory: ./java_tools

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
HW_SCRIPT=$1
set -e
# for instance
#
# .github/workflows/hw-ci/ ../.github/workflows/openocd_ci_f4_discovery.cfg
# .github/workflows/hw-ci/ ../.github/workflows/openocd_ci_proteus.cfg
openocd -f "$HW_SCRIPT" -c init -c targets -c "reset halt" -c "flash erase_sector 0 0 11" -c "flash write_image "deliver/rusefi.bin" 0x08000000" -c "reset run" -c "shutdown"