Skip to main content

IAR Embedded Workbench for RH850 3.20.x

Building applications—an overview

In this section:

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.c

You 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.o myfile2.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

__iar_program_start

G3 Multi-core

__iar_program_startn

G3 with a PCU core

__iar_program_startn_pcu

G4 Single-core

__iar_program_start_g4

G4 Multi-core

__iar_program_startn_g4

Table 53. The default start label


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.