Recent

This Page

User

Automated builds from the command line

Starting with Red Suite 3, you can run an automated build from the command line with Red Suite using the following instructions. Note that Red Suite 3 or greater is required - it will not work with Red Suite 2.

Open a command prompt window

Set up the paths so the compiler etc can be found by the tools. The following directories will need to be added to the path

<install>/lpcxpresso/bin or <install>/redsuite/bin

<install>/lpcxpresso/tools/bin or <install>/redsuite/tools/bin

On Windows only, the following will also need to be added

<install>/lpcxpresso/msys/bin or <install>/redsuite/msys/bin

Use the <product> application with the following options (On Windows only, a 'c' must be added to the end of the excutable name, which indicates this is the command line version of the tool). Note 1: options are case sensitive. Note 2: replace <product> with your product name.

The '-application' switch instructs Red Suite to run the headless builder rather than starting the workbench. The other switches can be used individually or together. This means you can checkout a project using a script of your own, '-import' it into a workspace, and '-build' it using the headless builder.

-import {[uri:/]/path/to/project}

import a project from another location into the workspace before building. Path can be local file system, or a URI

can be specified multiple times, to import multiple projects

-build {project_name[/build_config] | all}

-cleanBuild {project_name[/build_config] | all}

build or 'clean' the project

select which build configuration to use by by specifying /build_config immediately after the project_name (i.e. no spaces)

Use the '-data' switch to specify the workspace to use, which can be an empty temporary directory

The output from the build process will appear on the console, and can be redirected.

Example

To clean and build all the projects in the workspace c:\workspace\product, run the following command