mirror of
https://github.com/rene-dev/stmbl.git
synced 2026-02-06 02:02:34 +08:00
use bootloader python script
This commit is contained in:
10
Makefile
10
Makefile
@@ -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
|
||||
#
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user