2023-07-04 06:49:16 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
HW_SCRIPT=$1
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# for instance
|
|
|
|
#
|
2023-07-04 07:04:03 -07:00
|
|
|
# .github/workflows/hw-ci/openocd_wipe_and_flash.sh ../.github/workflows/openocd_ci_f4_discovery.cfg
|
2023-07-23 09:25:37 -07:00
|
|
|
# .github/workflows/hw-ci/openocd_wipe_and_flash.sh ../.github/workflows/openocd_ci_proteus_f4.cfg
|
|
|
|
# .github/workflows/hw-ci/openocd_wipe_and_flash.sh ../.github/workflows/openocd_ci_proteus_f7.cfg
|
2023-07-04 07:04:03 -07:00
|
|
|
|
|
|
|
cd firmware
|
2023-07-04 06:49:16 -07:00
|
|
|
|
2023-07-23 18:42:46 -07:00
|
|
|
# works on F4 with ST-LINK/V3 does not seem to work using V2 :(
|
2023-07-25 09:42:14 -07:00
|
|
|
openocd -f "$HW_SCRIPT" -c init -c targets -c "reset halt" -c "flash erase_sector 0 0 last" -c "flash write_image "deliver/rusefi.bin" 0x08000000" -c "reset run" -c "shutdown"
|