aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gen-device-svd/gen-device-svd.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gen-device-svd/gen-device-svd.go b/tools/gen-device-svd/gen-device-svd.go
index e527be0e4..4bb9e291b 100755
--- a/tools/gen-device-svd/gen-device-svd.go
+++ b/tools/gen-device-svd/gen-device-svd.go
@@ -428,11 +428,14 @@ func readSVD(path, sourceURL string) (*Device, error) {
licenseBlock = regexp.MustCompile(`\s+\n`).ReplaceAllString(licenseBlock, "\n")
}
+ // Remove "-" characters from the device name because such characters cannot
+ // be used in build tags. Necessary for the ESP32-C3 for example.
+ nameLower := strings.ReplaceAll(strings.ToLower(device.Name), "-", "")
metadata := &Metadata{
File: filepath.Base(path),
DescriptorSource: sourceURL,
Name: device.Name,
- NameLower: strings.ToLower(device.Name),
+ NameLower: nameLower,
Description: strings.TrimSpace(device.Description),
LicenseBlock: licenseBlock,
}