[Gnuk-users] [PATCH] BUG/MINOR: stlinkv2.py: Use modern python concatenation
Bertrand Jacquin
bertrand at jacquin.bzh
Sun Jan 18 00:36:18 UTC 2015
The following error can be observed when VERIFY is in progress:
$ python2.7 ./tool/stlinkv2.py ./src/build/gnuk.bin
ST-Link/V2 version info: 2 17 4
Change ST-Link/V2 mode 0001 -> 0001
CORE: 1ba01477, CHIP_ID: 20036410
Flash ROM read protection: off
Option bytes: ffff5aa5
SPI Flash ROM ID: bf254a
WRITE
VERIFY
TypeError('can only concatenate tuple (not "array.array") to tuple',)
Signed-off-by: Bertrand Jacquin <bertrand at jacquin.bzh>
---
tool/stlinkv2.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tool/stlinkv2.py b/tool/stlinkv2.py
index 2a2e0d3..772f5ad 100755
--- a/tool/stlinkv2.py
+++ b/tool/stlinkv2.py
@@ -633,7 +633,7 @@ def main(show_help, erase_only, no_protect, spi_flash_check,
stl.flash_write(0x08000000, data)
print "VERIFY"
- data_received = ()
+ data_received = []
size = len(data)
off = 0
while size > 0:
@@ -641,7 +641,7 @@ def main(show_help, erase_only, no_protect, spi_flash_check,
blk_size = 1024
else:
blk_size = size
- data_received = data_received + stl.read_memory(0x08000000+off, 1024)
+ data_received += stl.read_memory(0x08000000+off, 1024)
size = size - blk_size
off = off + blk_size
compare(data, data_received)
More information about the gnuk-users
mailing list