# HG changeset patch # User Windel Bouwman # Date 1403275009 -7200 # Node ID a7c444404df98b4ad7338859b78f154d2cdbb441 # Parent c0d9837acde8867680f15f61abfd53da3631be89 Fix hexwrite diff -r c0d9837acde8 -r a7c444404df9 python/utils/st-flash.py --- 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)