diff python/st-flash.py @ 113:1f40be088ee8

Added first start stlink
author Windel Bouwman
date Sat, 05 Jan 2013 00:06:27 +0100
parents
children 92b2bf0da1ec
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/st-flash.py	Sat Jan 05 00:06:27 2013 +0100
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+import argparse
+from stlink import STLink
+
+def hex2int(s):
+   return int(s, 16)
+
+parser = argparse.ArgumentParser(description='ST-link flash utility')
+#parser.add_argument('filename', type=str)
+#parser.add_argument('address', type=hex2int)
+
+args = parser.parse_args()
+print(args)
+
+stl = STLink()
+print(stl)
+stl.open()
+if stl.CurrentMode == STLink.DFU_MODE:
+   pass
+
+