You can specify a SEGGER Embedded Studio project file:
emBuild [options…] project-file
You must specify a configuration to build using -config. For instance:
emBuild -config "V5T Thumb LE Release" arm.emProject
The above example uses the configuration V5T Thumb LE Release to build all projects in the solution contained in arm.emProject.
To build a specific project that is in a solution, you can specify it using the -project option. For example:
emBuild -config "V5T Thumb LE Release" -project "libm" libc.emProject
This example will use the configuration V5T Thumb LE Release to build the project libm that is contained in libc.emProject.
If your project file imports other project files (using the <import…> mechanism), when denoting projects you must specify the solution names as a comma-separated list in parentheses after the project name:
emBuild -config "V5T Thumb LE Release" -project "libc(C Library)" arm.emProject
libc(C Library) specifies the libc project in the C Library solution that has been imported by the project file arm.emProject.
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-separated list. For example:
emBuild -config "ARM Debug" -solution "ARM Targets,EB55" arm.emProject
In this example, ARM Targets,EB55 specifies the EB55 solution imported by the ARM Targets solution, which was itself imported by the project file arm.emProject.
You can do a batch build using the -batch option:
emBuild -config "ARM Debug" -batch libc.emProject
This will build the projects in libc.emProject that are marked for batch build in the configuration ARM Debug.
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 is up to date. You can force a complete build by using the -rebuild option. Alternatively, to remove all output files, use the -clean option.
To see the commands being used in the build, use the -echo option. To also see why commands are being executed, use the -verbose option. You can see what commands will be executed, without executing them, by using the -show option.