Mercurial > lcfOS
annotate 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 |
rev | line source |
---|---|
113 | 1 #!/usr/bin/python |
2 | |
3 import argparse | |
4 from stlink import STLink | |
5 | |
6 def hex2int(s): | |
7 return int(s, 16) | |
8 | |
9 parser = argparse.ArgumentParser(description='ST-link flash utility') | |
10 #parser.add_argument('filename', type=str) | |
11 #parser.add_argument('address', type=hex2int) | |
12 | |
13 args = parser.parse_args() | |
14 print(args) | |
15 | |
16 stl = STLink() | |
17 print(stl) | |
18 stl.open() | |
19 if stl.CurrentMode == STLink.DFU_MODE: | |
20 pass | |
21 | |
22 |