CMSIS-Build  Version 0.10.0 (beta)
Tools, software frameworks, and work flows for productivity with CMSIS based projects
 All Pages
cp_install.sh: Install Packs

The cp_install "cp_install.sh" script gets a list of URLs that refer to software packs in CMSIS-Pack format that should be downloaded and installed.

Invocation

cp_install is called from the Bash command line with the following syntax:

cp_install.sh <pack-list-file>

Where:

cp_install is the name of the script.

<pack-list-file> is a text file that contains a URL list.

The cp_install script reads a text file that contains a URL list of software packs in CMSIS-Pack format. The URL list has the following format: <url>/<vendor>.<packname>.<version>.pack. Below is an example:

https://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
https://www.keil.com/pack/ARM.CMSIS-Driver.2.5.0.pack

For each URL in this list the following operations are performed:

  1. Download the related software pack from the URL.
  2. Extract the content of the software pack.

The following directories are used to store software pack. The naming conventions for directories is based on the CMSIS-Pack specification.

Directory Description
${CMSIS_PACK_ROOT}/.Download Stores the downloaded software pack
${CMSIS_PACK_ROOT}/<vendor>/<packname>/<version> Extracted content of the software pack (naming according CMSIS-Pack specification)
Note
The environment variable $CMSIS_PACK_ROOT must reference an existing directory with at least the file ./Web/index.pidx. The directory structure can be created with cp_init.sh: Setup Pack Directory

Usage Example

$
cp_install.sh Simulation.cpinstall
(cp_install.sh): Install Packs 0.10.0 (C) 2020 ARM
info: reading file: Simulation.cpinstall
dos2unix: converting file Simulation.cpinstall to Unix format...
http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack
######################################################################## 100.0%#=#=#
######################################################################## 100.0%
info: ARM.CMSIS.5.6.0.pack installing into /c/arm/cbuild/packs/ARM/CMSIS/5.6.0
http://www.keil.com/pack/Keil.ARM_Compiler.1.6.1.pack
######################################################################## 100.0%#=#=#
######################################################################## 100.0%
info: Keil.ARM_Compiler.1.6.1.pack installing into /c/arm/cbuild/packs/Keil/ARM_Compiler/1.6.1
pack installation completed successfully

Error Messages

Type Message Action
ERROR error: missing command line argument See usage and correct argument.
ERROR error: too many command line arguments See usage and correct argument.
ERROR error: $filename does not exist See usage and correct argument.
ERROR error: CMSIS_PACK_ROOT environment variable not set Set Environment Variables.
ERROR error: CMSIS_PACK_ROOT: folder does not contain package index file .Web/index.pidx Check pack repository.
ERROR error: pack download failed for $pack_url Check internet connection and server availability.
ERROR error: downloaded file $packfile is not a zip/pack file Check list of missing packages in cpinstall file.
ERROR error: unzip failed for $packfile Check downloaded package.
INFO info: pack $packfile is already downloaded For information only.
INFO info: $packfile is already installed For information only.
INFO pack installation completed successfully For information only.