rusefi/firmware/flash_openocd407.sh

14 lines
399 B
Bash
Raw Permalink Normal View History

#!/bin/bash
2023-08-04 09:34:24 -07:00
echo "I am flash_openocd407.sh"
2023-08-04 09:34:24 -07:00
STLINK=$(lsusb | grep 'ST-LINK\|STLINK')
if [ "$STLINK" ]; then
echo "I see $STLINK make sure your board file accepts this specific kind of ST-LINK"
else
2023-08-04 09:39:01 -07:00
echo "Do not see any ST-LINK. If you are on WSL make sure you have bound USB"
2023-08-04 09:34:24 -07:00
exit -1
fi
2023-08-04 09:34:24 -07:00
sudo openocd -f board/stm32f4discovery.cfg -c "program build/rusefi.bin verify reset exit 0x08000000"