view 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 source

#!/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