use bootloader python script

This commit is contained in:
Rene Hopf
2016-08-26 12:13:33 +02:00
parent 5723d790a4
commit f7aaf26727
2 changed files with 5 additions and 7 deletions

View File

@@ -220,11 +220,9 @@ showsize: build
# Flash the device
#
btburn: build showsize $(TARGET).dfu
#change this to your device
printf "bootloader\n" > `ls /dev/cu.usbmodem*` || true
printf "bootloader\n" > `ls /dev/ttyACM*` || true
sleep 1
dfu-util -a 0 -s 0x08010000:leave -D $(TARGET).dfu
@tools/bootloader.py
@sleep 1
@dfu-util -a 0 -s 0x08010000:leave -D $(TARGET).dfu
flash: $(TARGET).bin
st-flash --reset write $(TARGET).bin 0x08010000
@@ -232,7 +230,7 @@ flash: $(TARGET).bin
# Create a DFU file from bin file
%.dfu: %.bin
@cp $< $@
dfu-suffix -v 0483 -p df11 -a $@
@dfu-suffix -v 0483 -p df11 -a $@
# Target: clean project
#

View File

@@ -11,7 +11,7 @@ import serial.tools.list_ports
done = False
for port in serial.tools.list_ports.comports():
if "USB VID:PID=483:5740" in port[2]:
if "483:5740" in port[2]:
print "Reseting stmbl at " + port[2]
stmbl = serial.Serial(port[0])
stmbl.write('bootloader\n')