The preceding examples assume that the support packages required to carry out the download or debugging have already been installed using CrossStudio's package manager. On some systems however, it is not possible or desirable to use CrossStudio to do this. This section describes how to install packages from the command line and specify where CrossLoad should look for them.

Installing packages using the command line package manager

The simplest method of installing packages from the command line is to use the pkg tool which is a command line version of the package manager included in CrossStudio. For example, to install the LPC1000 support package and all the packages it depends on:

  pkg update
  pkg install LPC1000

If you need to install the package files to a specific directory, the -packagesdir option can be used with both pkg and crossload to specify an alternative package directory. For example:

  export PACKAGES_DIR=/my_crossload_packages
  pkg update -packagesdir $PACKAGES_DIR
  pkg install -packagesdir $PACKAGES_DIR LPC1000
  crossload -packagesdir $PACKAGES_DIR -target usb -solution MySolution.hzp -project MyProject -config Debug

Please note, Windows command prompt users should use set instead of export and %PACKAGES_DIR% instead of $PACKAGES_DIR.

Manually installing packages

If you don't have Internet access on the machine running CrossLoad and therefore can't use the package manager, you can instead manually install packages using the mkpkg tool.

First, you need to get hold of the package .hzq or .hzr files to be installed. These can be downloaded from our package website using a machine that does have Internet access and then copied to the machine running CrossLoad.

Once we have got the package files, the mkpkg tool can be used to install the packages. For example:

  export PACKAGES_DIR=/my_crossload_packages
  mkpkg -x CMSIS_3.hzq $PACKAGES_DIR
  mkpkg -x LPC1000.hzq $PACKAGES_DIR

By default, CrossLoad will look for packages in CrossStudio's packages directory. We can override this so that our local package installation is used instead with CrossLoad's -packagesdir option. For example:

  crossload -packagesdir $PACKAGES_DIR -target usb -solution MySolution.hzp -project MyProject -config Debug