Jegeva / ads2svd

turns cores form arm develloper studio to cmsis svds
3 stars 4 forks source link

the generated SVDs name tags does not comply with the ANSI C identifier naming restrictions #4

Closed tarek-bochkati closed 4 years ago

tarek-bochkati commented 4 years ago

Hi,

according to SVD File Conventions

All name tags must comp ly with the ANSI C identifier naming restrictions. In particular, they must not contain any spaces or special characters. This is necessary to support the generation of device header files thus providing consistency between the names being shown by the debugger and the symbols being used in the CMSIS compliant target software.

for example in this generated Cortex_M3.svd:

<?xml version="1.0" encoding="UTF-8"?>
<device xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
        schemaVersion="1.3"
        xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd">
   <vendor>ARM Ltd.</vendor>
   <vendorID>ARM</vendorID>
   <name>Cortex-M3</name>

the name.text() "Cortex-M3" does not comply with ANSI C identifier naming restrictions and is reported by the XSD validator.

is there a way to transform this automatically, like using underscore instead of '-'

Thanks, Tarek

Jegeva commented 4 years ago

fixed in master, can you check if its ok on your side ?

tarek-bochkati commented 4 years ago

Thanks @Jegeva sneaking into https://github.com/Jegeva/ads2svd/commit/4d7de1fa9c7d47c8bd474f72e9519a9ac02b13fe it seems to fix the issue.