mirror of https://github.com/Desuuuu/klipper.git
flash_usb: Change dfu-util to reset the board after a flash on stm32f4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4b4e309e1b
commit
c694da3753
|
@ -201,16 +201,14 @@ If attempting to flash via 3.3V serial, then use:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def flash_stm32f4(options, binfile):
|
def flash_stm32f4(options, binfile):
|
||||||
|
start = "0x%x:leave" % (options.start,)
|
||||||
try:
|
try:
|
||||||
flash_dfuutil(options.device, binfile,
|
flash_dfuutil(options.device, binfile,
|
||||||
["-R", "-a", "0", "-s", str(options.start)], options.sudo)
|
["-R", "-a", "0", "-s", start], options.sudo)
|
||||||
except error as e:
|
except error as e:
|
||||||
sys.stderr.write(STM32F4_HELP % (
|
sys.stderr.write(STM32F4_HELP % (
|
||||||
options.device, str(e), options.device))
|
options.device, str(e), options.device))
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
sys.stdout.write("\n\nFlash appears successful.\n"
|
|
||||||
"Device must be manually reset for new code to run.\n"
|
|
||||||
"\n")
|
|
||||||
|
|
||||||
MCUTYPES = {
|
MCUTYPES = {
|
||||||
'atsam3': flash_atsam3, 'atsam4': flash_atsam4, 'atsamd': flash_atsamd,
|
'atsam3': flash_atsam3, 'atsam4': flash_atsam4, 'atsamd': flash_atsamd,
|
||||||
|
|
Loading…
Reference in New Issue