LPCXpresso IDE supports options to control building projects from the command line, enabling a build process to be automated. To perform a command line build, the following steps will need to be followed:
(install)\lpcxpresso\bin
(install)\lpcxpresso\tools\bin
(install)\lpcxpresso\msys\bin
lpcxpresso(c) -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data \path\to\workspace -import {[uri:/]/path\to\project} -build {project_name[/build_config] | all} -cleanBuild {project_name[/build_config] | all}
To clean and build all projects that currently exist in the workspace C:\workspace\product, use the following command:
lpcxpressoc -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -build all -data c:\workspace\product
Note: This will build every build configuration (e.g. Debug and Release).
To following command will clean and build the Release configuration of my_project:
lpcxpressoc -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild my_project/Release -data c:\workspace\product
Notes:
'-application'
switch instructs LPCXpresso 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}
-build {project_name[/build_config] | all}
-cleanBuild {project_name_reg_ex[/build_configreg_ex] | all}
The following options are also supported.
Note: options are case sensitive
* Import projects : -import {[uri:/]/path/to/project}
* Import all projects in the tree : -importAll {[uri:/]/path/to/projectTreeURI}
* Build projects / the workspace : -build {project_name_reg_ex/config_name_reg_ex | all}
* Clean build projects / the workspace : -cleanBuild {project_name_reg_ex/config_name_reg_ex | all}
* Add Include path to build : -I {include_path}
* Add Include file to build : -include {include_file}
* Add preprocessor define to build : -D {prepoc_define}
* Replace environment variable in build : -E {var=value}
* Append environment variable to build : -Ea {var=value}
* Prepend environment variable to build : -Ep {var=value}
* Remove environment variable in build : -Er {var}
* Replace a tool option value : -T {toolid} {optionid=value}
* Append to a tool option value : -Ta {toolid} {optionid=value}
* Prepend to a tool option value : -Tp {toolid} {optionid=value}
* Remove a tool option : -Tr {toolid} {optionid=value}
* Suppress Java popup on build error : --launcher.suppressErrors