The command line program crossbuild enables your software to be built without using CrossStudio. This tool can be used for production build purposes but isn’t designed to be used for development. The tool works from a crossstudio project file (.hzp) and options that specify what is to be built.

    crossbuild [options] project.hzp

You must specify a configuration to build in using the -config option.

    crossbuild -config "V5T Thumb LE Release" arm.hzp

This example will build all projects in the solution contained in arm.hzp in the configuration "V5T Thumb LE Release".

If you want to build a specific project in the solution then you can specify it using the -project option.

    crossbuild -config "V5T Thumb LE Release" -project "libm" libc.hzp

This example will build the project libm contained in libc.hzp in the configuration "V5T Thumb LE Release".

If your project file imports other project files (using the <import..> mechanism) then denoting projects requires you to specify the solution names as a comma seperated list in brackets after the project name.

    crossbuild -config "V5T Thumb LE Release" -project "libc(C Library)" arm.hzp

With this example libc(C Library) specifies the libc project in the C Library solution that has been imported by the project file arm.hzp.

If you want to build a specific solution that has been imported from other project files you can use the -solution option. This option takes the solution names as a comma seperated list.

    crossbuild -config "ARM Debug" -solution "ARM Targets,EB55" arm.hzp

With this example ARM Targets,EB55 specifies the EB55 solution imported by the ARM Targets solution which in turn was imported by the project file arm.hzp.

You can do a batch build using the -batch option.

    crossbuild -config "ARM Debug" -batch libc.hzp

With this example the projects in libc.hzp which are marked to batch build in the configuration "ARM Debug" will be built.

By default a make style build will be done i.e. the dates of input files are checked against the dates of output files and the build is avoided if the output file is up to date. You can force a complete build by using the -rebuild option. Alternatively you can remove all output files using the -clean option.

You can see the commands that are being used in the build if you use the -echo option and you can also see why commands are being executed using the -verbose option. You can see what commands will be executed without executing them using the -show option.

CrossBuild Options
-batch | Do a batch build.
-config 'name' | Specify the configuration to build in. If the 'name' configuration can’t be found crossbuild will list the set of configurations that are available.
-clean | Remove all the output files of the build process.
-D macro=value | Define a macro value for the build process.
-echo | Show the command lines as they are executed.
-project 'name' | Specify the name of the project to build. If crossbuild can’t find the specified project then a list of project names is shown.
-rebuild | Always execute the build commands.
-show | Show the command lines but don’t execute them.
-solution 'name' | Specify the name of the solution to build. If crossbuild can’t find the specified solution then a list of solution names is shown.
-verbose | Show build information.