2020-07-09 07:27:20 -07:00
|
|
|
#!/bin/bash
|
2019-11-06 17:32:17 -08:00
|
|
|
# This is a Linux/Unix script to do USB DFU (Device Firmware Update).
|
|
|
|
#
|
|
|
|
# The STM32 has multiple ways to write an application into the MCU. One is
|
|
|
|
# is USB DFU mode.
|
|
|
|
# This can write a blank or overwrite a corrupted ECU, but does require
|
|
|
|
# that the processor be set into DFU mode by holding down the 'Program' (AKA
|
|
|
|
# 'Boot1') button at reset or power up.
|
|
|
|
# Note: The 'Program' button is only checked immediately after reset. The
|
|
|
|
# button may be released after that instant. A reset or power cycle may be
|
|
|
|
# needed to exit DFU mode.
|
|
|
|
#
|
|
|
|
|
2022-11-29 07:25:36 -08:00
|
|
|
dfu-util --alt 0 --download deliver/rusefi.dfu -s :leave
|
2019-11-06 17:32:17 -08:00
|
|
|
|
|
|
|
# For Windows the batch file flash_dfu.bat runs the equivalent command
|
2022-01-17 13:25:37 -08:00
|
|
|
# DfuSeCommand.exe -c -d --fn deliver/rusefi.dfu
|