Pack Checking Tool

May 4, 2026 · View on GitHub

The utility packchk assists the validation of a CMSIS-Pack. It operates on the unzipped content of the Software Pack. It distributed as part of the CMSIS-Toolbox.

packchk performs the following operations:

  • Checks the *.pdsc file against the PACK.xsd schema file in the installation path.
  • Reads the content of the specified *.pdsc file. The path to this *.pdsc file is considered as root directory of the Software Pack.
  • Verifies the existence of all files in the Software Pack that are referenced in the *.pdsc file.
  • Checks for presence and correctness of mandatory elements such as <vendor>, <version>, etc. - Optionally, reads other *.pdsc files to resolve dependencies on <apis>, <boards>, and <conditions>.
  • Optionally, verifies the element <url>.
  • Optionally, composes the versioned pack ID from the information contained in the PDSC: package:vendor.package:name.release.latest:version
  • Sets the exit status reflecting the validation result to:
    • 0 : no errors detected
    • 1 : errors during validation detected

Usage

packchk [-V] [--version] [-h] [--help]
         [OPTIONS...] <PDSC file>

packchk options:
 -i, --include arg           PDSC file(s) as dependency reference
 -b, --log arg               Log file
 -x, --diag-suppress arg     Suppress Messages
 -s, --xsd arg               Specify PACK.xsd path.
 -v, --verbose               Verbose mode. Prints extra process information
 -w, --warning arg           Warning level [0|1|2|3|all] (default: all)
 -u, --url arg               Verifies that the specified URL matches with the 
                             <url> element in the *.PDSC file (default: "")
 -n, --name arg              Text file for pack file name (default: "")
 -V, --version               Print version
 -h, --help                  Print usage
     --disable-validation    Disable the pdsc validation against the PACK.xsd.
     --allow-suppress-error  Allow to suppress error messages
     --break                 Debug halt after start
     --ignore-other-pdsc     Ignores other PDSC files in working folder
     --pedantic              Return with error value on warning

Quick Start

This tutorial aims to get you up and running with packchk using CMake. We recommend this tutorial as a starting point. In order to build packchk and run related tests. Please employ the sequence of steps mentioned here.

Note

For the schema check, packchk searches for a PACK.xsd file in ./, ../etc/, ../../etc/ relative to cmsis-toolbox/bin. Alternatively, use --xsd to specify the location of the schema file.

Usage Examples

Run packchk on the package description file called MyVendor.MyPack.pdsc. It runs a schema check and verifies the file against the Software Pack that is located in the same directory.

packchk MyVendor.MyPack.pdsc

Run packchk on the package description file called MyVendor.MyPack.pdsc in the current directory and try to resolve conditions using the RefVendor.RefPack.pdsc file based in another directory.

packchk MyVendor.MyPack.pdsc -i /path/to/reference/pdsc/RefVendor.RefPack.pdsc

Run packchk on the package description file called MyVendor.MVCM3.pdsc, verify the URL to the Pack Server, and generate a ASCII text file with the standardized name of the Software Pack.

packchk "MyVendor.MVCM3.pdsc" -u "http://www.myvendor.com/pack" -n packname.txt

Run packchk on the package description file called MyVendor.MVCM3.pdsc. Suppress validation messages M304 and M331.

packchk MyVendor.MVCM3.pdsc --diag-suppress M304,M331   // messages as a list
packchk MyVendor.MVCM3.pdsc -x M304 -x M331             // option repeated

Error and Warning Messages

The following table explains the categories for the output messages issued by PackChk utility. Sections below list the errors and warnings and contain recommendations on how to resolve them.

Categories

CodeCategoryDescription
M0xxInfo messagesHelp and Progress messages. No action required.
M1xxInternal errorsInternal execution errors
M2xxInvocation ErrorsErrors in the command line input.
M3xx, M4xxValidation MessagesErrors and Warnings from the pack validation.
M5xxModel ErrorsErrors in RTE model creation

Internal Errors

The errors in this category are issued because of an internal error in the packchk utility.

Message NumberTypeDescriptionDetails and Actions
M101ERRORUnknown error!Contact Arm for clarifications
M103ERRORInternal Error: 'REF'Contact Arm for clarifications
M104ERRORPath empty when searching for other PDSC filesExecute the check in verbose mode and try to identify the PDSC file intended for use. Correct the PDSC.
M108TEXTReading PDSC File failed!XML parsing of the PDSC file failed. Verify syntax of the PDSC file.
M109TEXTConstructing Model failed!Contact Arm for clarifications
M110TEXTVerifying Model failedContact Arm for clarifications

Invocation Errors

The errors in this category are issued because of an incorrect command-line input that prevents the packchk execution.

Message NumberTypeMessage TextDetails and Actions
M202ERRORNo PDSC input file specifiedCorrect the command line. packchk expects a *.pdsc file name as input.
M203ERRORError reading PDSC file 'PATH/FILENAME'!Verify the PDSC file for consistency.
M204ERRORFile not found: 'PATH'The specified PDSC file could not be found in the PATH displayed in the message. Correct the path or the filename.
M205ERRORCannot create Pack Name file 'PATH'Check the disk space or your permissions. Correct the path name.
M206ERRORMultiple PDSC files found in package: 'FILES'Only one PDSC file is allowed in a package. Remove unnecessary PDSC files. The message lists all *.pdsc files found.
M207ERRORPDSC file name mismatch! Expected: 'PDSC1.pdsc' Actual : 'PDSC2.pdsc'The PDSC file expected has not been found. Rename or exchange the PDSC file.
M210ERROROnly one input file to be checked is allowed.You can only check one PDSC file at a time.
M218ERRORCannot find the schema file specified by "--xsd".CHeck whether the file exists.

Validation Messages

The messages in this category are issued by PackChk during package validation. This can be for example incorrect use of the pack schema in the PDSC file, missing files, broken dependencies and others. ERROR messages must be resolved to ensure that the package is compliant to the CMSIS-format. WARNING messages should be checked and are strongly recommended to be resolved.

Message NumberTypeMessage TextDetails and Actions
M301ERRORChecking Pack URL of PDSC file failed: Expected URL : 'URL1' Package URL : 'URL2'The URL specified in the package does not match the value entered for comparison in option -u. Check for possible misspellings in both URLs. Refer to /package/url.
M302ERRORNo vendor tag found in the PDSC file! Add the <vendor> tag and provide the vendor name. For example: <vendor>Keil</vendor>.Vendor name is mandatory required in the package description but was not found in the /package element in the PDSC file. Within the parent <package> element enter the tag <vendor> and add the vendor name. For example: <vendor>Keil</vendor>. Refer to /package/vendor.
M303ERRORNo package name found in the PDSC file! Add the <name> tag and provide the package name. For example: <name>MCU-Name_DFP</name>.Package name is mandatory required in the package description but was not found in the /package element in the PDSC file. Within the parent <package> element enter the tag <name> and add the package name. For example <name>MCU-Name_DFP</name>. Refer to /package/name.
M304WARNINGNo package URL (<url>-tag and/or value) found in PDSC file!Package URL is mandatory required in the package description but was not found in the /package element in the PDSC file. Within the parent <package> element enter the tag <url> and add the URL that should be used to download the package. Refer to /package/url.
M305ERRORNo releases (<release> elements in a <releases>-tag) found in PDSC file!"At least one package release shall be specified in the PDSC file, but none was not found. Use <release> tag to specify release information in <releases> element. Refer to /package/releases/release.
M306ERRORNo package description found in the PDSC file. Add the <description>-tag and provide a descriptive text.Package description is mandatory required in the package description but was not found in the /package element in the PDSC file. Within the parent <package> element add the tag <description> and briefly describe the package content. Refer to /package/description.
M307ERROREither attribute 'TAG' or 'TAG2' + 'TAG3' must be specified for 'memory'<memory> element requires that either attribute id or attributes name and access are specified, but none of those were found. Specify the expected attributes. Refer to /package/devices/family/.../memory.
M308ERRORAttribute 'TAG' missing on 'TAG2'Element 'TAG2' requires attribute 'TAG', but it was not found. Add missing attribute.
M309ERRORAttribute 'TAG' missing on 'TAG2' (when 'TAG3' is specified)Add missing attribute 'TAG' or remove the attribute 'TAG3' in the element 'TAG2'.
M310ERRORFilename mismatch (case sensitive): PDSC name : 'PDSC_FILENAME' Filename : 'SYSTEM'Filenames are case sensitive. Correct spelling.
M311ERRORRedefinition of 'TAG' : 'NAME', see Line 'LINE'Remove the redefinition of element 'TAG' with name 'NAME'.
M312WARNINGNo 'TAG' found for device 'NAME'Element 'TAG' is missing for device 'NAME'. Add missing element.
M315ERRORInvalid URL / Paths to Drives are not allowed in Package URL: 'URL'Correct package URL 'URL'. Refer to /package/url.
M316WARNINGURL must end with slash '/': 'URL'Correct package URL 'URL'. Refer to /package/url.
M323ERRORFile/Path not found: 'PATH'The file or path 'PATH' entered in the PDSC file could not be found. Verify the path information.
M324WARNINGBoard referenced in Example 'EXAMPLE' is undefined: 'VENDOR' : 'BOARD'The definition of the board referenced in the example application could not be found. Define the board (/package/boards/board) or correct the reference information (/package/examples/example/board).
M325ERRORBoard 'NAME' redefined, already defined in Line 'LINE''PATH'This board has been defined already in the line 'LINE' of the file 'PATH'. Verify and remove one of the board definitions. Refer to /package/boards/board.
M326ERRORPath is not conformant: 'PATH': Absolute Paths or Drive references are not allowed, use Paths relative to PDSC file.The path needs to be relative to the PDSC file so that a dependency of a certain file system does not occur.
M327WARNINGPath is not conformant: 'PATH': Backslashes are not recommended, use forward slashes.Paths to files should adhere to the POSIX standard using forward slashes (/).
M328ERRORVersion not set for Release Information 'DESCR'The release defined through the description 'DESCR' requires the attribute <version>. Refer to /package/releases/release.
M329ERRORDescription not set for Release Information 'VER'The release defined through the version 'VER' needs a description. Refer to /package/releases/release.
M330ERRORCondition redefined: 'COND', already defined in Line 'LINE'The condition has been defined already in a previous line. Correct the condition name, or remove the duplicate. Refer to /package/conditions/condition.
M331WARNINGCondition unused: 'COND'The condition has been defined but not used further. Remove the condition or add condition rules. Refer to /package/conditions/condition.
M332ERRORCondition undefined: 'COND'A condition has been used but not defined. Correct the name of the condition or define the missing condition. Refer to /package/conditions/condition.
M333WARNINGComponent has no condition: Cclass= 'CCLASS', Cgroup= 'CGROUP'Csub='CSUB'Cversion= 'CVER'The component defined has no condition. If the component has restrictions, then add a condition to the component definition. Refer to /package/components/.../component.
M334WARNINGConfig File has no version: 'PATH'Specified file 'PATH' does not contain version information. It is recommended to specify versions for configuration files. Add attribute version with the file version in the <file> tag that defines the 'PATH' file in the PDSC. Refer to /package/.../files/file.
M335WARNINGComponent declared as 'Board Support' has no ref to a device: Cclass= 'CCLASS', Cgroup= 'CGROUP', Cversion= 'CVER'A component defined as 'board support' needs a reference to a device. Add a device or correct the component definition. Refer to attribute Cclass of /package/components/.../component and /package/boards/board/mountedDevice.
M336WARNINGNo reference to a device or device not found: Cclass= 'CCLASS', Cgroup= 'CGROUP', Cversion= 'CVER'Define the device /package/devices/family/../device or correct the information about the device in the reference.
M337WARNINGFile with category 'CAT' has wrong extension 'EXT''PATH'The extension of the file does not match the file category 'CAT' specified in the category attribute. Verify the extension to match the category. Refer to /package/.../files/file.
M338WARNINGNo releases found.The PDSC file is missing release information. Add <release> information to the file. Refer to /package/releases element.
M339WARNINGInclude Path 'PATH' must not be a file!The path specified contains a filename. Correct the path infomation and remove the filename. Refer to /package/.../files/file.
M340WARNINGInclude Path 'PATH' must end with '/' or '\'Include paths must end with a slash or backslash. Verify and correct the path name. Refer to /package/.../files/file.
M341WARNINGFile with 'COMP' dependency must have extension 'EXT' : 'PATH'The file 'PATH' with dependency on component 'COMP' must have a specific extension 'EXT'. Verify the dependency and correct the file extension. Refer to /package/.../files/file.
M342WARNINGFile with attribute 'ATTR' must not have category 'CAT''PATH'File 'PATH' is defined with the attribute attr set to 'ATTR'. This conflicts with the file category 'CAT' specified in category attribute. For example attr=config and category=include are not allowed for the same file. Correct the file attribute or the file category. Refer to /package/.../files/file.
M343WARNINGFile with attribute 'ATTR' requires 'ATTR2' attribute: 'PATH'File 'PATH' is defined with the attribute 'ATTR' that requires presense of attribute 'ATTR2' as well, but such attribute was not found. For example, attr=template requires that attribute select is defined. Add the required attribute 'ATTR2' or correct the attribute 'ATTR' in the <file> element. Refer to /package/.../files/file.
M344WARNINGFile shall have condition containing 'COND''PATH'File definition for 'PATH' shall contain a condition 'COND'. Add attribute condition with the 'COND' in the <file> tag that defines the 'PATH' file. Refer to /package/.../files/file.
M345WARNINGURL not found : 'URL'The specified URL could not be found. Correct the URL. Refer to /package.
M346WARNINGReferenced device(s) in 'BOARD' not found: 'DEVICE'The device or devices specified for the board could not be found. Verify and correct the device name or the board name. Refer to /package/boards/board/mountedDevice and /package/boards/board/compatibleDevice.
M347WARNINGGenerator ID in Component Cclass= 'CCLASS', Cgroup= 'CGROUP', Cversion= 'CVER' is undefined: 'GENID'The generator ID used in the component could not be found. Verify and correct the generator ID (/package/components/.../component), or define the generator ID (ref /package/generators/generator).
M348WARNINGFeature redefined for 'MCU', see Line 'REF_LINE''FEATURE'This feature 'FEATURE' has been defined already on the same level in line 'REF_LINE'. The feature characteristics defined on line 'LINE' overwrite those from 'REF_LINE'. Correct the feature (/package/devices/family/.../feature).
M349WARNINGExamples found, but no board description(s) foundExample projects have been found for a board that was not defined. Correct the entry for the examples (/package/examples/example/board) or define the board (/package/boards/board).
M350WARNINGNo 'COMP' found for 'VENDOR' : 'MCU' ('COMPILER')The package (/package) defines a Vendor-MCU combination for which no component was defined. Define a component (/package/components/.../component) or verify the 'VENDOR' - 'MCU' settings.
M351WARNINGComponent 'COMP' ('COMPID') error for 'VENDOR''MCU' ( 'COMPILER'): 'MSG'An unspecified error was found for the component. The message might give detailed information about the error.
M352WARNINGNo Directories/Files found for 'COMP' ('COMPID') for 'VENDOR''MCU' ('COMPILER')No files or directories could be found for the defined component. Add the missing information. Refer to /package/.../files.
M353WARNINGNo 'FILECAT' File found for Component 'COMP' ('COMPID') for 'VENDOR' : 'MCU' ('COMPILER')No file with the mentioned file category was found for the component. Verify whether the file exists or correct the information. Refer to attribute category in /package/.../files/file.
M354WARNINGMultiple 'FILECAT' Files found for Component 'COMP' ('COMPID') for 'VENDOR' : 'MCU' ('COMPILER')Multiple files with the mentioned file category were found for the specified component. Verify and rename the files, or correct the component settings (/package/.../files/file).
M355WARNINGNo 'FILECAT' Directory found for Component 'COMP' ('COMPID') for 'VENDOR' : 'MCU' ('COMPILER')The directory specified for the file category was not found. Correct the information in the component settings (/package/components/.../component).
M358WARNINGHeader File 'HFILE' for 'CFILE' missing for Component 'COMP' ('COMPID') for 'VENDOR' : 'MCU' ('COMPILER')The header file defined for the component could not be found. Verify the header file settings (/package/.../files/file) or whether the file exists.
M359WARNINGFamily has no Device(s) or Subfamilies: 'FAMILY'The device family has no devices or subfamilies. Add the missing information (/package/devices/family).
M360WARNINGSubfamily has no Device(s): 'SUBFAMILY'Add the missing information. Refer to /package/devices/family/subFamily.
M361WARNINGGenerator ID in Taxonomy Cclass= 'CCLASS', Cgroup= 'CGROUP' is undefined: 'GENID'The generator ID used in the taxonomy is not defined. Define or correct the generator ID (/package/taxonomy element).
M362WARNINGNot all Component Dependencies for Cclass= 'CCLASS', Cgroup= 'CGROUP', Csub= 'CSUB', Cversion= 'CVER', Capiversion= 'APIVER' can be resolved. RTE Model reports: 'MSG'Some of the component dependencies could not be resolved. The message might contain additional information. Verify and correct component definition and dependency information. Refer to /package/components/.../component attribute condition.
M363WARNINGNo API defined for Component Cclass= 'CCLASS', Cgroup= 'CGROUP', Csub= 'CSUB', Cversion= 'CVER', Capiversion= 'APIVER'The package is missing the API information for the specified component. Refer to /package/apis.
M364WARNINGNo Devices for Condition 'COND' available.The specified condition refers to a device that does not exist. Define the device (/package/devices/family/../device) or correct the information for the condition (/package/conditions/condition).
M365ERRORRedefined 'DEVTYPE' 'MCU' found, see Line LINERemove duplicate device/variant entries. Refer to /package/devices/family/../device.
M366ERRORRedefined 'DEVTYPEEXIST' as 'DEVTYPE' 'MCU' found, see Line LINEDevice has been redefined as variant or vice versa. Remove duplicate device/variant entries. Refer to /package/devices/family/../device.
M367ERRORRedefined 'TYPE' 'NAME' found, see Line 'LINE'Remove duplicate device/variant entries. Refer to /package/devices/family/../device.
M369WARNINGFeature is already defined for 'DEVICE' and will be added, see Line 'LINE''FEATURE'.This feature 'FEATURE' has been defined already on a higher level and as such it gets added to this 'DEVICE'. This is usually done when some devices have a higher number of basic features. Correct the feature (/package/devices/family/.../feature) if this is a typo.
M370WARNINGURL is not conformant: 'URL': Backslashes are not allowed in URL, use forward slashes.Use standard URL notation using forward slashes (/).
M371ERROR'SECTION' Feature for 'MCU''FEATURE' unknown.This feature 'FEATURE' is unknwon to the specified 'MCU'. Correct the feature (/package/devices/family/.../feature) if this is a typo.
M372ERROR'SECTION' Feature for 'MCU''FEATURE' misspelled, did you mean 'KNOWNFEATURE' ('DESCR').This feature 'FEATURE' resembles the feature 'KNOWNFEATURE'. Correct the feature (/package/devices/family/.../feature) if this is a typo.
M373ERRORUnsupported Schema Version: 'VER'.The schema version is not supported. Verify the attribute schemaVersion of the element /package.
M374ERRORWhile checking Feature for 'MCU': Pname 'CPU' not found.The processor could not be found for the specified device. Refer to /package/devices/family/../device and /package/devices/family/.../processor.
M375ERROR'path/pdsc_file': No <mountedDevice> for board 'BOARD' found.If a board element does not contain a <mountedDevice> element, then the examples for this board are not shown and example projects may not appear in the development tools. Refer to /package/boards/board/mountedDevice of /package/boards.
M376ERRORSchema Version not set!Set a valid schema version in the PDSC file. Refer to schemaVersion attribute in the /package.
M377WARNINGFile 'NAME' 'TYPE' must have 'attr="config"'The category 'TYPE' of the file 'NAME' requires it to be defined as a configuration file. Add the attribute attr="config" to the <file> element that defines the file. Refer to /package/.../files/file.
M378WARNINGComponent Cclass='CCLASS, Cgroup='CGROUP, Csub='CSUB', Cversion='CVER', implements the API defined in 'NAME' but does not attribute 'Capiversion' specifying the version it implements.Add attribute Capiversion specifying the API version that is implemented in the component described in the message. Refer to /package/components/.../component.
M379WARNINGNo example(s) found for Board '['VENDOR''BOARD'.There are no examples found for the board 'BOARD'. Provide examples. Refer to /package/examples/example.
M380WARNINGNo description found for ['VENDOR'] 'MCU'No description was found for the device 'MCU' from 'VENDOR'. Use description attribute to provide information about the device, its subfamily, or family. Refer to /package/devices/family/.../description.
M381WARNINGVendor names are not equal: '['VENDOR''MCU', MCU '['VENDOR2''MCU2', see Line 'LINE'Vendor name specified in the Dvendor attribute for the <mountedDevice> tag does not match the actual device vendor name. Verify and correct vendor name. Refer to /package/boards/board/mountedDevice.
M382WARNINGRequirement <'TAG'> '['VENDOR''NAME' 'VER' could not be resolved.'MSG'The package requires a package with name 'NAME' and version 'VER' from vendor 'VENDOR'. That package was not found. Verify the requirement. Use option -i to point to the required package. Refer to /package/requirements/packages.
M383ERROR'TAG' 'NAME' is not conformant to the pattern "'CHAR'"Unsupported characters are found in the 'NAME' for the tag/attribute 'TAG'. Specify the name using only supported characters from 'CHAR'.
M384ERRORCondition 'NAME': Direct or indirect recursion detected. Skipping condition while searching for 'NAME2'Resolve recursion in condition 'NAME'.
M385INFORelease date is empty.In the <release> tag add attribute date with the release date. Refer to /package/releases/release.
M386WARNINGRelease date is in future: 'RELEASEDATE' (today: 'TODAYDATE')Set the date to the future. Refer to /package/releases/release.
M391WARNINGRedefined Item 'NAME''MSGMultiple defitions of item 'NAME' are found. Use unique names for the items listed in the message 'MSG'.
M392ERRORRedefined Device or Variant 'NAME''MSG'Multiple defitions of device or variant 'NAME' are found. Use unique names for the devices listed in the message 'MSG'. Refer to /package/devices/family/../device and /package/devices/family/.../device/variant
M393WARNINGPackage has development version 'RELEASEVER'The package has development version specified in the version attribute. For release use only MAJOR, MINOR and PATCH sections as described in the CMSIS-pack version semantics. Also refer to /package/releases/release.
M394ERRORNot Semantic Versioning: 'RELEASEVER'Package version does not follow expected semantic versioning. Correct the value specified for the version attribute using correct semantic. Refer to /package/releases/release.
M395WARNINGRelease date attribute is not set for release version: 'RELEASEVER'Specify release date in the attribute date for the returned release version 'RELEASEVER'. Refer to /package/releases/release.
M396WARNINGRelease 'TAG' not consecutive (newest first): 'RELEASEVER''RELEASEDATE' (prev.: 'LATESTVER''LATESTDATE', see Line 'LINE')Package releases shall be entered in consecutive way: newest release version and latest date first. Rearrange the releases in the list or correct values for the returned 'TAG' attributes (version or date). Refer to /package/releases/release.
M397WARNINGFile extension '.pdsc' must be lowercase: 'PATH'The PDSC file shall have lowercase extension .pdsc Correct extension of the PDSC file 'PATH'.
M398ERRORAttribute 'Dname' missing in expression using 'Pname="'NAME'"When using attribute Pname in the <condition> element the Dname attribue shall be present as well. Add attribute token{Dname} specifying the device name. Refer to /package/conditions/condition.
M399WARNINGAttribute 'TAG' is ignored, because 'TAG2' + 'TAG3' is specifiedDeprecated attribute 'TAG' is ignored because newer attributes are found. Triggered for id attribute in the /package/devices/family/.../memory element when name or access attributes are present as well. remove deprecated attribute 'TAG'

RTE Model Errors

Message NumberTypeMessage TextAction
M500TEXTRTE Model reports: 'MSG'Error while preparing data. See massage for more details.
M502TEXTRTE Model reports: #error 'NUM''NAME' : 'MSG'Additional software components required.
M504TEXTRTE Model reports: MISSING: – SPACE NAMEAdd the missing component.