iarbuild—the IAR Command Line Build Utility
The IAR Command Line Build Utility (iarbuild) is located in the common\bin directory.
The invocation syntax is one of:
iarbuildproject.ewp [opmode] {config[,config2,...]|"*"} [options] iarbuild -Eutilityoptions
The first alternative builds your project. The second alternative performs an operation on your project using an external utility.
Using iarbuild
These are the possible parameters for iarbuild:
Parameter | Description |
|---|---|
| Your IAR Embedded Workbench project file. |
| One of these operating modes (see descriptions below the table):
|
| Operates by invoking an external utility (see descriptions below the table). Choose between:
|
|
|
| One or more of these additional options (see descriptions below the table):
|
If you run the application from a command shell without specifying a project file, you will get a sign-on message describing available parameters and their syntax.
If the operation was successful, the IAR Command Line Build Utility returns 0. Otherwise it returns a non-zero number and a diagnostic message.
Using iarbuild to run C-STAT
For general information on the C-STAT Static Analysis tool and how to use it, see C-STAT® for static analysis.
If you have a project that is not based on an Embedded Workbench project file (.ewp), you can use the IAR Command Line Build Utility (iarbuild) together with a JSON compilation database of the project to perform a C-STAT analysis, either by pointing to a CMake build directory to create the JSON file, or by pointing to an existing JSON compilation database file.
The invocation syntax is:
iarbuild -E cstat_analyze optionsThese are the possible parameters:
Parameter | Description |
|---|---|
| One or more of these options (see descriptions below the table):
|