diff options
Diffstat (limited to 'support/stm32loader.py')
-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: |