Add Python flasher
authorSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 28 Feb 2014 17:40:49 +0000 (09:40 -0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 28 Feb 2014 17:40:49 +0000 (09:40 -0800)
flash_extra.py [new file with mode: 0755]
software/videomixer/Makefile

diff --git a/flash_extra.py b/flash_extra.py
new file mode 100755 (executable)
index 0000000..6acb6ec
--- /dev/null
@@ -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)
index b5deb32f9740ff3d45985633b0db5e6fd923ac35..5927448547f002cfcbfc27bf22dcbfb9e1487f60 100644 (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