aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-10-02 13:44:27 +0200
committerAyke van Laethem <[email protected]>2018-10-02 14:22:28 +0200
commit2ca4540f2a7c2bbb70100c8ca99409214e51bc93 (patch)
treec16c675325b081f108a59aa8cac63eb312d9da2e /tools
parentbdcac9ae4299ac53eadd7cd5a478495aa8531b92 (diff)
downloadtinygo-2ca4540f2a7c2bbb70100c8ca99409214e51bc93.tar.gz
tinygo-2ca4540f2a7c2bbb70100c8ca99409214e51bc93.zip
tools/gen-device-svd: support old Python version
Travis-CI runs Ubuntu Trusty with Python 3.4, so we have to support that.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gen-device-svd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gen-device-svd.py b/tools/gen-device-svd.py
index 70831aa2a..167d4e2aa 100755
--- a/tools/gen-device-svd.py
+++ b/tools/gen-device-svd.py
@@ -301,7 +301,7 @@ const (
subaddress += subregister['elementsize'] * subregister['array']
else:
subaddress += subregister['elementsize']
- regType += '\t\t{name} {subregType}\n'.format(**subregister, subregType=subregType)
+ regType += '\t\t{name} {subregType}\n'.format(name=subregister['name'], subregType=subregType)
if register['array'] is not None:
if subaddress != register['address'] + register['elementsize']:
numSkip = ((register['address'] + register['elementsize']) - subaddress) // 4
@@ -312,7 +312,7 @@ const (
regType += '\t}'
if register['array'] is not None:
regType = '[{}]{}'.format(register['array'], regType)
- out.write('\t{name} {regType}\n'.format(**register, regType=regType))
+ out.write('\t{name} {regType}\n'.format(name=register['name'], regType=regType))
# next address
if register['array'] is not None: