CMSIS-SVD
Version 1.3.6
CMSIS System View Description
|
SVDConv is a command-line utility to validate CMSIS-SVD files and to generate CMSIS-compliant device header files. SVDConv is distributed with the ARM::CMSIS Pack (in the CMSIS\Utilities directory) together with the CMSIS-SVD.xsd schema file. SVDConv is available for Windows and Linux operating systems.
SVDConv performs the following operations:
SVDConv is invoked form the command line. The general command format is:
<options> | Short Name | Description |
---|---|---|
none | Validation | Perform a validation check of the SVD file. Errors and warnings are printed on screen. |
-b | Log File | Specify the log file name for writing messages. Default: screen. |
-o | Output Path | Specify an output path for the generated device header file or log file. Default: current directory. |
--generate=header | Generate Device Header File | Generates the device header file. The name of the generated file is derived from the value of the tag <devicename> in the CMSIS-SVD file. Refer to device. |
--generate=partition | Generate Partition file for Cortex-M Security Extensions (Armv8-M) | Generates the device partition file. The name of the generated file is composed of partition_ and the value of the device <name> (for example, partition_CMSDK_ARMv8MBL.h). Refer to /device element. The content of the file uses Configuration Wizard annotations and is derived from the SAU-specific information of the /device/cpu/sauRegionsConfig element and the interrupts specified in the /device/peripherals element. |
--fields=enum | Bit-field Enums | Generates enum lists for each field value description contained in the CMSIS-SVD input file. Must be used in combination with --generate=header. |
--fields=macro | Bit-field Macros | Generates position and mask C-Macros for each field description contained in the CMSIS-SVD input file. Must be used in combination with --generate=header. |
--fields=struct | Bit-field Structs | Generates bit fields for each field description contained in the CMSIS-SVD input file. Must be used in combination with --generate=header. |
--fields=struct-ansic | ANSI Bit-field Structs | Generates MISRA-compliant structures for each bitfield. The generated code is not CMSIS-compliant! Must be used in combination with --generate=header. |
--strict | Strict error checking | RECOMMENDED! Applies strict error checking and generates a lot more messages. |
SVDConv returns the following codes:
Code | Description | Action |
---|---|---|
0 | OK | No action required. Validation and conversion performed without errors. |
1 | WARNINGS | Warnings should be checked an possibly removed. The header file is created and could be used. |
2 | ERRORS | Errors in the SVD description file. Important elements are missing and must be corrected. |
3 | Error in command line | Check and correct the command line arguments. |
Examples
MVCM3110.svd(1688) : info <description> missing for value '2 : MODE2' MVCM3110.svd(1692) : info <description> missing for value '3 : MODE3' MVCM3110.svd(1696) : info <description> missing for value '4 : MODE4' Area of improvements: * Description contains 267 <fields> defined without associated <enumeratedValues> Found 0 Errors and 1 Warnings Return Code: 1 (WARNINGS)
The following table shows the errors and warnings issued by svdconv.
Message Number | Type | Description | Action |
---|---|---|---|
M020 | Text | SVD_STRING_OPTIONS | Displays programm help. |
M021 | Text | "\n%DESCR% V%VER%\n%COPYRIGHT%\n" | Displays module name, version, date. |
M022 | Text | "Found %ERR% Error(s) and %WARN% Warning(s)." | Displays the number of errors/warnings found. |
M023 | Text | "\nPhase%CHECK%" | Information about the check pahse. |
M024 | Text | "Arguments: %OPTS%" | Specify arguments. |
Message Number | Type | Description | Action |
---|---|---|---|
M040 | Info | "%NAME%: %TIME%ms. Passed" | |
M041 | Info | "Overall time: %TIME%ms." | |
M050 | Info | "Current Working Directory: '%PATH%'" | |
M051 | Info | "Reading SVD File: '%PATH%'" | |
M061 | Info | "Checking SVD Description" |
Message Number | Type | Description | Action |
---|---|---|---|
M101 | Error | "Unknown error!" | Please contact support. |
M102 | Error | "MFC initialization failed" | Please contact support. |
M103 | Error | "Internal Error: %REF%" | Please contact support. |
M104 | Critical | "%MSG%" | Please contact support. |
M105 | Error | "Cannot add Register to group sorter: '%NAME%'" | |
M106 | Error | "Command '%NAME%' failed: %NUM%: %MSG%" | |
M107 | Error | "Lost xml file stream." | Check SVD file. |
M108 | Error | "SfrDis not supported."Disassembly not supported. | |
M109 | Error | "Cannot find '%NAME%'" | Check specified file. |
M111 | Progress | "%NAME% failed!" | Check specified file. |
M120 | Error | "Invalid arguments!" | Provide a list of valid arguments. |
M121 | Error | "File not found %NAME%"Check specified file. | |
M122 | Error | "Name of command file should follow '@'" | Check specified command. |
M123 | Error | "File not found: '%PATH%'!" | Check speficied path. |
M124 | Error | "Cannot execute SfrCC2: '%PATH%'!" | Check path to SfrCC2. |
M125 | Warning | "SfrCC2 report:\n%MSG%\nSfrCC2 report end.\n" | |
M126 | Warning | "SfrDis: %MSG%" | |
M127 | Error | "SfrCC2 reports errors!" | Check SVD file. |
M128 | Warning | "SfrCC2 reports warnings!" | Check SVD file. |
M129 | Error | "Option unknown: %OPT%'" | Check given option. |
M130 | Error | "Cannot create file '%NAME%'" | Check user rights. |
M132 | Error | "SfrCC2 report:\n%MSG%\nSfrCC2 report end.\n" |
Message Number | Type | Description | Action |
---|---|---|---|
M201 | Error | "Tag <%TAG%> unknown or not allowed on this level." | Check tag |
M202 | Error | "Parse error: <%TAG%> = '%VALUE%'" | Check tag/value. |
M203 | Error | "Value already set: <%TAG%> = '%VALUE%'" | Check tag/value. |
M204 | Error | "Parse Error: '%VALUE%'" | Check value. |
M205 | Warning | "Tag <%TAG%> empty" | Assign value to tag. |
M206 | Error | "DerivedFrom not found: '%NAME%'" | Check derivate. |
M207 | Error | "Expression marker found but no <dim> specified: '%NAME%'" | Specify dimension. |
M208 | Error | "Ignoring <dimIndex> because specified <name> requires Array generation." | Generate an array. |
M209 | Warning | "CPU section not set. This is required for CMSIS Headerfile generation and debug support." | Add CPU section. |
M210 | Warning | "Use new Format CMSIS-SVD >= V1.1 and add \<CPU\> Section." | Update schema and add CPU section. |
M211 | Error | "Ignoring %LEVEL% %NAME% (see previous message)" | |
M212 | Error | "Address Block <usage> parse error: '%NAME%'" | Correct address block. |
M213 | Error | "Expression for '%NAME%' incomplete, <%TAG%> missing." | Add tag. |
M214 | Error | "Peripheral '%NAME%' <dim> single-instantiation is not supported (use Array instead)." | Correct Regs to Reg[s]. |
M215 | Warning | "Size of <dim> is only one element for '%NAME%', is this intended?" | Check single element. |
M216 | Warning | "Unsupported character found in '%NAME%' : %HEX%." | Correct name. |
M217 | Warning | "Forbidden Trigraph '??%CHAR%' found in '%NAME%'." | |
M218 | Warning | "Unsupported ESC sequence found in '%NAME%' : %CHAR%." | Correct escape sequence. |
M219 | Error | "C Code generation error: %MSG%" | |
M220 | Warning | "C Code generation warning: %MSG%" | |
M221 | Warning | "Input filename must end with .svd: '%NAME%" | Correct input filename extension. |
M222 | Warning | "Input filename has no extension: '%NAME%" | Correct input filename extension. |
M223 | Error | "Input File Name '%INFILE%' does not match the tag <name> in the <device> section: '%NAME%'" | Correct the MCU name. |
M224 | Warning | "Deprecated: '%NAME%' Use '%NAME2%' instead" | Update SVD file. |
M225 | Error | "Upper/lower case error: '%NAME%', should be '%NAME2%'" | Update SVD file. |
M226 | Error | "SFD Code generation error: %MSG%" | |
M227 | Warning | "SFD Code generation warning: %MSG%" | |
M228 | Error | "Enumerated Value Container: Only one Item allowed on this Level!" | Remove additional items. |
M229 | Error | "Register '%NAME%' is not an array, <dimArrayIndex> is not applicable" | Correct SVD. |
M230 | Error | "Value '%NAME%:%NUM%' out of Range for %LEVEL% '%NAME2%[%NUM2%]'." | Correct SVD. |
M231 | Error | "Value <isDefault> not allowed for %LEVEL%." | Correct SVD. |
M232 | Error | "Tag <%TAG%> name '%NAME%' must not have specifier '%CHAR%'. Ignoring entry." | Correct SVD. |
M233 | Error | "Parse error: <%TAG%> = '%VALUE%'" | Correct SVD. |
M234 | Error | "No valid items found for %LEVEL% '%NAME%'" | Correct SVD. |
M235 | Error | "%LEVEL% '%NAME%' cannot be an array." | Correct SVD. |
M236 | Error | "Expression for <%TAG%> '%NAME%' not allowed." | Correct SVD. |
M237 | Error | "Nameless %LEVEL% must have <%TAG%>." | Correct SVD. |
M238 | Error | "%LEVEL% must not have <%TAG%>." | Correct SVD. |
M239 | Error | "Dimed %LEVEL% '%NAME%' must have an expression." | Correct SVD. |
M240 | Error | "Tag <%TAG%> unknown or not allowed on %LEVEL2%:%LEVEL%." | Correct SVD. |
M241 | Error | "Parse Error: '%VALUE%' invalid for Array generation" | Correct SVD. |
M242 | Warning | "%LEVEL% '%NAME%' <dimArrayIndex> found, but no <dim>" | Correct SVD. |
M243 | Warning | "%LEVEL% '%NAME%' <dimArrayIndex> found, but <dim> does not describe an array" | Correct SVD. |
Message Number | Type | Description | Action |
---|---|---|---|
M301 | Error | "Interrupt number '%NUM% : %NAME%' already defined: %NAME2% %LINE%" | |
M302 | Error | "Size of Register '%NAME%:%NUM%' must be 8, 16 or 32 Bits" | |
M303 | Warning | "Register name '%NAME%' is prefixed with Peripheral name '%NAME2%'" | RegName = USART_CR ==> USART->USART_CR |
M304 | Warning | "Interrupt number overwrite: '%NUM% : %NAME%' %LINE%" | |
M305 | Error | "Name not C compliant: '%NAME%' : %HEX%, replaced by '_'" | |
M306 | Error | "Schema Version not set for <device>." | |
M307 | Error | "Name is equal to Value: '%NAME%'" | |
M308 | Error | "Number of <dimIndex> Elements '%NUM%' is different to number of <dim> instances '%NUM2%'" | |
M309 | Error | "Field '%NAME%': Offset error: %NUM%" | |
M310 | Error | "Field '%NAME%': BitWidth error: %NUM%" | |
M311 | Error | "Field '%NAME%': Calculation: MSB or LSB == -1" | |
M312 | Error | "Address Block missing for Peripheral '%NAME%'" | |
M313 | Error | "Field '%NAME%': LSB > MSB: BitWith calculates to %NUM%" | |
M314 | Error | "Address Block: <offset> or <size> not set." | |
M315 | Error | "Address Block: <size> is zero." | |
M316 | Error | "%LEVEL% <name> not set." | |
M317 | Warning | "%LEVEL% <description> not set." | |
M318 | Warning | "%LEVEL% '%NAME%' <%TAG%> is equal to <name>" | |
M319 | Warning | "%LEVEL% <%TAG%> '%NAME%' ends with newline, is this intended?" | |
M320 | Warning | "%LEVEL% <description> '%NAME%' is not very descriptive" | |
M321 | Warning | "%LEVEL% <%ITEM%> '%NAME%' starts with '_', is this intended?" | |
M322 | Error | "%LEVEL% %ITEM% '%NAME%' is meaningless text. Deleted." | |
M323 | Warning | "%LEVEL% <%ITEM%> '%NAME%' contains text '%TEXT%'" | |
M324 | Error | "Field '%NAME%' %BITRANGE% does not fit into Register '%NAME2%:%NUM%' %LINE%" | |
M325 | Error | "CPU Revision is not set" | |
M326 | Error | "Endianess is not set, using default (little)" | |
M327 | Error | "NVIC Prio Bits not set or wrong value, must be 2..8. Using default (4)" | |
M328 | Warning | "%LEVEL% '%NAME%' has no Registers, ignoring %LEVEL%." | |
M329 | Error | "CPU Type is not set, using default (Cortex-M3)" | |
M330 | Error | "Interrupt '%NAME%' Number not set." | |
M331 | Error | "Interrupt '%NAME%' Number '%NUM%' greater 239." | |
M332 | Warning | "%LEVEL% '%NAME%' has only one Register." | |
M333 | Error | "Duplicate <enumeratedValue> %NUM%: '%NAME%' (%USAGE%), already used by '%NAME2%' (%USAGE2%) %LINE%" | |
M334 | Warning | "%LEVEL% <%ITEM%> '%NAME%' is very long, use <description> and a shorter <name>" | |
M335 | Error | "Value '%NAME%:%NUM%' does not fit into field '%NAME2%' %BITRANGE%." | |
M336 | Error | "%LEVEL% '%NAME%' already defined %LINE%" | |
M337 | Error | "%LEVEL% '%NAME%' already defined %LINE%" | |
M338 | Error | "Field '%NAME%' %BITRANGE% (%ACCESS%) overlaps '%NAME2%' %BITRANGE2% (%ACCESS2%) %LINE%" | |
M339 | Error | "Register '%NAME%' (%ACCESS%) (@%ADDRSIZE%) has same address or overlaps '%NAME2%' (%ACCESS2%) (@%ADDRSIZE2%) %LINE%" | |
M340 | Error | "No Devices found." | |
M341 | Error | "More than one devices found, only one is allowed per SVD File." | |
M342 | Error | "Dim-extended %LEVEL% '%NAME%' must not have <headerStructName>" | |
M343 | Error | "%LEVEL% '%NAME%' (@%ADDR%) has same address as '%NAME2%' %LINE%" | |
M344 | Error | "Register '%NAME%' (@%ADDRSIZE%) is outside or does not fit any <addressBlock> specified for Peripheral '%NAME2%'\n%TEXT%" | |
M345 | Error | "Field '%NAME%' %BITRANGE% does not fit into Register '%NAME2%:%NUM%'" | |
M346 | Warning | "Register '%NAME%' (@%ADDR%) offset is equal or is greater than it's Peripheral base address '%NAME2%' (@%ADDR2%), is this intended?" | |
M347 | Warning | "Field '%NAME%' (width < 6Bit) without any <enumeratedValue> found." | |
M348 | Error | "Alternate %LEVEL% '%NAME%' does not exist at %LEVEL% address (@%ADDR%)" | |
M349 | Error | "Alternate %LEVEL% '%NAME%' is equal to %LEVEL% name '%NAME2%'" | |
M350 | Warning | "Peripheral '%NAME%' (@%ADDR%) is not 4Byte-aligned." | |
M351 | Warning | "Peripheral %TYPE% '%NAME%' is equal to Peripheral name." | |
M352 | Warning | "AddressBlock of Peripheral '%NAME%' (@%ADDR%) %TEXT% overlaps '%NAME2%' (@%ADDR2%) %TEXT2% %LINE%" | |
M353 | Warning | "Peripheral group name '%NAME%' should not end with '_'" | |
M354 | Error | "Interrupt '%NUM%:%NAME%' specifies a Core Interrupt. Core Interrupts must not be defined, they are set through \<cpu><name>." | |
M355 | Error | "No Interrupts found on pos. 0..15. External (Vendor-)Interrupts possibly defined on position 16+. External Interrupts must start on position 0" | |
M356 | Warning | "No Interrupt definitions found." | |
M357 | Error | "Core Interrupts found. Interrupt Numbers are wrong. Internal Interrupts must not be described, External Interrupts must start at 0." | |
M358 | Error | "AddressBlock of Peripheral '%NAME%' %TEXT% overlaps AddressBlock %TEXT2% in same peripheral %LINE%" | |
M359 | Error | "Address Block: <usage> not set." | |
M360 | Error | "Address Block: found <%TAG%> (%HEXNUM%) > %HEXNUM2%." | |
M361 | Error | "%LEVEL% %ITEM% '%NAME%': 'RESERVED' items must not be defined." | |
M362 | Warning | "%LEVEL% %ITEM% '%NAME%': 'RESERVED' items must not be defined." | |
M363 | Error | "CPU: <sauNumRegions> not set." | |
M364 | Error | "CPU: <sauNumRegions> value '%NUM%' greater than SAU max num (%NUM2%)" | |
M365 | Warning | "Register '%NAME%' (%ACCESS%) (@%ADDRSIZE%) has same address or overlaps '%NAME2%' (%ACCESS2%) (@%ADDRSIZE2%) %LINE%" | |
M366 | Error | "Register '%NAME%' size (%NUM%Bit) is greater than <dimIncrement> * <addressBitsUnits> (%NUM2%Bit)." | |
M367 | Warning | "Access Type: Field '%NAME%' (%ACCESS%) does not match Register '%NAME2%' (%ACCESS2%)" | |
M368 | Warning | "%LEVEL% '%NAME%' (@%ADDR%) has same address as '%NAME2%' %LINE%" | |
M369 | Error | "Enumerated Value '%NAME%': <value> not set." | |
M370 | Error | "%LEVEL% '%NAME%': <offset> not set." | |
M371 | Error | "%LEVEL% '%NAME%' <headerStructName> is equal to hirachical name" | |
M372 | Error | "%LEVEL% <%TAG%> '%NAME%' already defined %LINE%" | |
M373 | Error | "%LEVEL% <%TAG%> '%NAME%' already defined %LINE%" | |
M374 | Warning | "\<enumeratedValues\> can be one <enumeratedValues> container for all \<enumeratedValue\>s, where <usage> can be read, write, or read-write or two <enumeratedValues> containers, where one is set to <usage>read and the other is set to <usage>write" | |
M375 | Error | "%LEVEL% '%NAME%' (\<enumeratedValues\> '%NAME2%'): Too many <enumeratedValues> container specified." | |
M376 | Error | "%LEVEL% '%NAME%' (\<enumeratedValues\> '%NAME2%'): '%USAGE%' container already defined in %LINE%." | |
M377 | Error | "%LEVEL% '%NAME%' (\<enumeratedValues\> '%NAME2%'): '%USAGE%' container conflicts with '%NAME3%' %LINE%." | |
M378 | Error | "Register Array: Register '%NAME%' size (%NUM%Bit) does not match \<dimIncrement\> (%NUM2%Bit)." | |
M379 | Error | "XBin Number '%NAME%' too large, skipping evaluation." | |
M380 | Error | "AddressBlock of Peripheral '%NAME%' (@%ADDR%) %TEXT% does not fit into 32Bit Address Space." | |
M381 | Error | "Interrupt '%NAME%' Number '%NUM%' greater or equal deviceNumInterrupts (%NUM2%)." | |
M382 | Error | "%LEVEL% '%NAME%': %NAME2% '%HEXNUM%' does not fit into %LEVEL% width: %NUM% Bit." |
Message Number | Type | Description | Action |
---|---|---|---|
M517 | Warning | "SFD Code generation: Forbidden Trigraph '??%CHAR%' found in '%NAME%'." | |
M516 | Warning | "SFD Code generation: Unsupported character found in '%NAME%' : %HEX%." | |
M518 | Warning | "SFD Code generation: Unsupported ESC sequence found in '%NAME%' : %CHAR%." |