diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gen-device-svd/gen-device-svd.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/gen-device-svd/gen-device-svd.go b/tools/gen-device-svd/gen-device-svd.go index c32cf9734..e63b026a0 100755 --- a/tools/gen-device-svd/gen-device-svd.go +++ b/tools/gen-device-svd/gen-device-svd.go @@ -342,6 +342,11 @@ func readSVD(path, sourceURL string) (*Device, error) { firstAddress := clusterRegisters[0].address dimIncrement = int(lastAddress - firstAddress) } + + if !unicode.IsUpper(rune(clusterName[0])) && !unicode.IsDigit(rune(clusterName[0])) { + clusterName = strings.ToUpper(clusterName) + } + p.registers = append(p.registers, &PeripheralField{ name: clusterName, address: baseAddress + clusterOffset, |