Skip to main content

IAR Embedded Workbench for RX 5.20

Introduction to building projects

In this section:

Briefly about building a project

The build process consists of these steps:

  • Setting project options using the Options dialog box

  • Building the project, either an application project or a library project

  • Correcting any errors detected during the build procedure.

To make the build process more efficient, you can use the Batch Build command. This gives you the possibility to perform several builds in one operation. If necessary, you can also specify pre-build and post-build actions.

In addition to using the IAR Embedded Workbench IDE to build projects, you can also use the command line utility iarbuild.exe.

For examples of building application and library projects, see the tutorials in the Information Center, under Project Explorer. For more information about building library projects, see The IAR Archive Tool—iarchive.

Extending the toolchain

IAR Embedded Workbench provides a feature—Custom Build—which lets you extend the standard toolchain. This feature is used for executing external tools (not provided by IAR). You can make these tools execute each time specific files in your project have changed.

If you specify custom build options on the Custom tool configuration page, the build commands treat the external tool and its associated files in the same way as the standard tools within the IAR Embedded Workbench IDE and their associated files. The relation between the external tool and its input files and generated output files is similar to the relation between the C/C++ Compiler, c files, h files, and o files. For more information about custom build options, see Custom build options.

You specify filename extensions of the files used as input to the external tool. If the input file has changed since you last built your project, the external tool is executed—just as the compiler executes if a c file has changed. In the same way, any changes in additional input files (for instance, include files) are detected.

You must specify the name of the external tool. You can also specify any necessary command line options needed by the external tool, and the name of the output files generated by the external tool. Note that you can use argument variables for some of the file information.

You can specify custom build options to any level in the project tree. The options you specify are inherited by any sub-level in the project tree.

Tools that can be added to the toolchain

Some examples of external tools, or types of tools, that you can add to the IAR Embedded Workbench toolchain are:

  • Tools that generate files from a specification, such as Lex and YACC

  • Tools that convert binary files—for example files that contain bitmap images or audio data—to a table of data in an assembler or C source file. This data can then be compiled and linked together with the rest of your application.

For more information, see Adding an external tool.