Add Python flasher

This commit is contained in:
Sebastien Bourdeauducq 2014-02-28 09:40:49 -08:00
parent 9e784fc82c
commit 3882a07ae5
2 changed files with 16 additions and 1 deletions

15
flash_extra.py Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import sys, argparse
import programmer
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Program extra data to flash memory.")
parser.add_argument("-f", "--flash-proxy-dir", default=None, help="set search directory for flash proxy bitstreams")
parser.add_argument("platform", help="target platform")
parser.add_argument("file", help="file to flash")
parser.add_argument("address", help="flash address to write")
args = parser.parse_args()
prog = programmer.create_programmer(args.platform, args.flash_proxy_dir)
prog.flash(int(args.address, 0), args.file)

View File

@ -70,7 +70,7 @@ load: videomixer.bin
$(MSCDIR)/tools/flterm --port /dev/ttyUSB0 --kernel videomixer.bin
flash: videomixer.fbi
m1nor-ng videomixer.fbi
$(MSCDIR)/flash_extra.py mixxeo videomixer.fbi 0x001a0000
clean:
$(RM) $(OBJECTS) $(OBJECTS:.o=.d) videomixer.elf videomixer.bin videomixer.fbi