diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-04-08 18:47:34 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-04-08 18:58:58 -0400 |
commit | 5e094ea3f219df403a67be8a85bf95591990b05e (patch) | |
tree | cc0b0c0341edc3810a9ae9e7e3aa57cd1a029f65 /support | |
parent | fe8fb8a931306a9701a7f7fa96e1880e1c3123bc (diff) | |
download | librambutan-5e094ea3f219df403a67be8a85bf95591990b05e.tar.gz librambutan-5e094ea3f219df403a67be8a85bf95591990b05e.zip |
stm32loader.py prints more information about what it's doing.
Diffstat (limited to 'support')
-rwxr-xr-x | support/stm32loader.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/support/stm32loader.py b/support/stm32loader.py index 874d278..b0df7c0 100755 --- a/support/stm32loader.py +++ b/support/stm32loader.py @@ -294,6 +294,10 @@ class CommandInterface: def writeMemory(self, addr, data): lng = len(data) + + mdebug(5, "Writing %(lng)d bytes to start address 0x%(addr)X" % + { 'lng': lng, 'addr': addr}) + if usepbar: widgets = ['Writing: ', Percentage(),' ', ETA(), ' ', Bar()] pbar = ProgressBar(widgets=widgets, maxval=lng, term_width=79).start() @@ -316,12 +320,6 @@ class CommandInterface: self.cmdWriteMemory(addr, data[offs:offs+lng] + ([0xFF] * (256-lng)) ) - - - def __init__(self) : - pass - - def usage(): print """Usage: %s [-hqVewvr] [-l length] [-p port] [-b baud] [-a addr] [file.bin] -h This help @@ -452,6 +450,7 @@ if __name__ == "__main__": 'baud':conf['baud']}) try: if (conf['write'] or conf['verify']): + mdebug(5, "Reading data from %s" % args[0]) data = read(args[0]) try: |