CMSIS-Pack: Pack Index Files

| CMSIS-Pack Version 1.6.3 Delivery Mechanism for Software Packs

- Main Page
- Usage and Description

All Pages
Pack Index Files

CMSIS-Pack is designed as a web-based distribution network. Each provider of a CMSIS-Pack (also referred to as vendor) is responsible for hosting, maintaining and publishing unique versions of a CMSIS-Pack.

A CMSIS-Pack is uniquely identified by <vendor>.<pack name>.<version>.pack. All published versions of a pack and the PDSC file need to be available in the same web folder specified by <url>. Multiple different packs may be located in the same web folder.

# Package Index File (pidx)

The package index file lists all CMSIS-Packs hosted and maintained by a vendor. The file is hosted by the vendor and has the name <vendor>.pidx. The <vendor> tag needs to match the file name. The file also contains the <url> to it's origin, as well as a <timestamp> of it's last update.

It is the vendor's obligation to update this file whenever:

- a new pack is added.
- a new version of a pack is added.
- a pack is deprecated.
- a replacement for a pack becomes available.

Example MyVendor.pidx:

<?xml version="1.0" encoding="UTF-8" ?>
<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
<vendor>MyVendor</vendor>
<url>https://www.MyVendor.com/pack/</url>
<timestamp>2017-01-25T15:00:10.7300074+00:00</timestamp>
<pindex>
<pdsc url="https://www.MyVendor.com/pack/mypack/" vendor="MyVendor" name="MyPack" version="1.1.0"/>
...
</pindex>
</index>

Each individual pack is referenced by the attributes:

- `url` = web folder where the PDSC and packs reside.
- `vendor` = vendor of the pack.
- `name` = the name of the pack.
- `version` = the version number of the latest available release for the pack.

The package index file for the CMSIS-Pack compliant packs, hosted on www.keil.com can be found here: https://www.keil.com/pack/Keil.pidx.

The benefit of a single package index file is, that this file only needs to be exchanged once and can be polled for updates and additions of packs by a vendor. To add a vendor's packs to the public list maintained on www.keil.com, send an email to CMSIS@arm.com attaching a version of the <vendor>.pidx file.

# Vendor Index File (vidx)

A vendor index file lists package index files from different vendors. This information can be used to compile a list of known packs.

Example MyVendor.vidx:

<?xml version="1.0" encoding="UTF-8" ?>
<index schemaVersion="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PackIndex.xsd">
<vendor>MyVendor</vendor>
<url>www.MyVendor.com/pack</url>
<timestamp>2017-01-08T10:30:00</timestamp>
<vindex>
<pidx url="http://www.othervendor.com/MyPacks/" vendor="OtherVendor" />
...
</vindex>
<!-- the section below is only intended for the transition until all vendors use the <vendor>.pidx file
<pindex>
<pdsc url="http://www.othervendor2.com/packs/" vendor="OtherVendor2" name="MyPack" version="2.3.0"/>
...
</pindex>
</index>

The latest index file of CMSIS-Packs belonging to vendor="ARM" and vendor="Keil" that are hosted on www.keil.com/pack is maintained here: https://www.keil.com/pack/Keil.pidx

ARM also maintains a flat list of all CMSIS-Pack compliant packs reported to ARM here: https://www.keil.com/pack/index.pidx

The vendor index file containing references to the package index files (or optionally PDSC files) used for compiling this summary index file are listed in the Keil.vidx file and can be downloaded from here: https://www.keil.com/pack/Keil.vidx

Based on these publicly available index files, everyone is equally positioned to create an index of available packs and their latest versions.

# CMSIS-Pack Index Schema File

    <?xml version="1.0" encoding="UTF-8"?>
    <!--

      Copyright (c) 2013-2017 ARM Limited. All rights reserved.

      SPDX-License-Identifier: Apache-2.0

      Licensed under the Apache License, Version 2.0 (the License); you may
      not use this file except in compliance with the License.
      You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an AS IS BASIS, WITHOUT
      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

      $Date:        23. Januar 2017
      $Revision:    1.1.0

      $Project: Schema File for Package Index File Format Specification

      Package Index file naming convention <vendor>.pidx
      Vendor  Index file naming convention <vendor>.vidx
      SchemaVersion=1.1.0
    -->

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.1.0">

      <!-- semantic versioning (semver.org) <major>.<minor>.<patch>-<quality> -->
      <xs:simpleType name="SemanticVersionType">
        <xs:restriction  base="xs:string">
          <!--               <major>         . <minor>        . <patch>        - <quality>                                                                                       + <build meta info>               -->
          <xs:pattern value="(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?"/>
        </xs:restriction>
      </xs:simpleType>

      <!-- some strings are used to construct filenames (e.g. package name). Such names can contain only subset of characters and must not contain neither spaces nor dots. -->
      <xs:simpleType name="RestrictedString">
        <xs:restriction base="xs:string">
          <xs:pattern value="[\-_A-Za-z0-9]+"/>
          <xs:pattern value="\S(.*\S)?"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>

      <!-- Vendor index file Description Type -->
      <xs:complexType name="VidxType">
        <xs:attribute name="url"             type="xs:anyURI"           use="required"/>
        <xs:attribute name="vendor"          type="RestrictedString"    use="required"/>
        <xs:attribute name="date"            type="xs:date"             use="optional"/>
      </xs:complexType>

      <!-- Package Description Type -->
      <xs:complexType name="PdscType">
        <xs:attribute name="url"             type="xs:anyURI"           use="required"/>
        <xs:attribute name="vendor"          type="RestrictedString"    use="required"/>
        <xs:attribute name="name"            type="RestrictedString"    use="required"/>
        <xs:attribute name="version"         type="SemanticVersionType" use="required"/>
        <xs:attribute name="date"            type="xs:date"             use="optional"/>
        <xs:attribute name="deprecated"      type="xs:date"             use="optional"/>
        <xs:attribute name="replacement"     type="RestrictedString"    use="optional"/>
        <xs:attribute name="size"            type="xs:unsignedInt"      use="optional"/>
      </xs:complexType>

      <!-- Package Description file Type -->
      <xs:complexType name="PindexType">
        <xs:sequence>
          <xs:element name="pdsc"            type="PdscType"            maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>

      <!-- Vendor vendor's package index file tag -->
      <xs:complexType name="VindexType">
        <xs:sequence>
          <xs:element name="pidx"            type="VidxType"            maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>

      <!-- Index description root point (Vendor Index file, Package Index file -->
      <xs:element name="index" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="vendor"        type="RestrictedString"/>
            <xs:element name="url"           type="xs:anyURI"/>
            <xs:element name="timestamp"     type="xs:dateTime"         minOccurs="0"/>
            <xs:choice minOccurs="1" maxOccurs="2">
              <!-- index/list of packs -->
              <xs:element name="pindex"      type="PindexType"/>
              <!-- index/list of vendor index files -->
              <xs:element name="vindex"      type="VindexType"/>
            </xs:choice>
          </xs:sequence>
          <xs:attribute name="schemaVersion" type="SemanticVersionType" use="required"/>
        </xs:complexType>
      </xs:element>
    </xs:schema>