changeset 399:a7c444404df9

Fix hexwrite
author Windel Bouwman
date Fri, 20 Jun 2014 16:36:49 +0200
parents c0d9837acde8
children 0374c65cb437
files python/utils/st-flash.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/utils/st-flash.py	Thu May 29 12:13:37 2014 +0200
+++ b/python/utils/st-flash.py	Fri Jun 20 16:36:49 2014 +0200
@@ -65,8 +65,9 @@
 elif args.command == 'hexwrite':
     hf = hexfile.HexFile()
     hf.load(args.hexfile)
-    r = hf.regions[0]
-    dev.writeFlash(r.address, r.data)
+    for region in hf.regions:
+        print('flashing {}'.format(region))
+        dev.writeFlash(region.address, region.data)
 elif args.command == 'verify':
    content = args.filename.read()
    dev.verifyFlash(args.address, content)