diff options
author | Ayke van Laethem <[email protected]> | 2019-03-30 12:54:36 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-07-07 14:03:24 +0200 |
commit | ffa38b183b32331dd247e337a985c4eb5a7d9350 (patch) | |
tree | 2f858af25739909e2da7f6b0b3e59eacc5071d41 /tools | |
parent | f0eb4eef5a842be56288590ef3ba8766432c67ac (diff) | |
download | tinygo-ffa38b183b32331dd247e337a985c4eb5a7d9350.tar.gz tinygo-ffa38b183b32331dd247e337a985c4eb5a7d9350.zip |
all: add HiFive1 rev B board with RISC-V architecture
This page has been a big help in adding support for this new chip:
https://wiki.osdev.org/HiFive-1_Bare_Bones
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gen-device-svd.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/gen-device-svd.py b/tools/gen-device-svd.py index 0f6085fac..fc9e3f16f 100755 --- a/tools/gen-device-svd.py +++ b/tools/gen-device-svd.py @@ -151,7 +151,10 @@ def readSVD(path, sourceURL): dimIncrement = None else: dim = int(getText(cluster.find('dim'))) - dimIncrement = int(getText(cluster.find('dimIncrement')), 0) + if dim == 1: + dimIncrement = None + else: + dimIncrement = int(getText(cluster.find('dimIncrement')), 0) clusterRegisters = [] for regEl in cluster.findall('register'): clusterRegisters.extend(parseRegister(groupName or name, regEl, baseAddress + clusterOffset, clusterPrefix)) @@ -241,7 +244,7 @@ def parseBitfields(groupName, regName, fieldsEls, bitfieldPrefix=''): }) for enumEl in fieldEl.findall('enumeratedValues/enumeratedValue'): enumName = getText(enumEl.find('name')) - enumDescription = getText(enumEl.find('description')) + enumDescription = getText(enumEl.find('description')).replace('\n', ' ') enumValue = int(getText(enumEl.find('value')), 0) fields.append({ 'name': '{}_{}{}_{}_{}'.format(groupName, bitfieldPrefix, regName, fieldName, enumName), |