Building applications—an overview
In the command line interface, the following line compiles the source file myfile.c into the object file myfile.o using the default settings:
iccrh850 myfile.cYou must also specify some critical options, see Basic project configuration.
On the command line, the following line can be used for starting the linker:
ilinkrh850 myfile.omyfile2.o-o a.out‑‑config my_configfile.icf
In this example, myfile.o and myfile2.o are object files, and my_configfile.icf is the linker configuration file. The option -o specifies the name of the output file.
The application will start executing at a start label. In the IDE, the default start label depends on the device you are developing for:
Type of RH850 device | Default start label |
|---|---|
G3 Single-core |
|
G3 Multi-core |
|
G3 with a PCU core |
|
G4 Single-core |
|
G4 Multi-core |
|
n corresponds to the number of cores that your microcontroller has. On the command line, the default label is always __iar_program_start. If your application does not use all microcontroller cores, you must set the start label explicitly in IDE or on the command line.
Danger
To change the start point of the application to another label, use the ILINK option ‑‑entry, see ‑‑entry.
Tip
When building a project, the IAR Embedded Workbench IDE can produce extensive build information in the Build messages window. This information can be useful, for example, as a base for producing batch files for building on the command line. You can copy the information and paste it in a text file. To activate extensive build information, right-click in the Build messages window, and select All on the context menu.