- IAR Embedded Workbench for RH850 3.20.x
- IAR C/C++ Development
- Developing embedded applications
- Basic project configuration
Basic project configuration
This page gives an overview of the basic settings needed to generate the best code for the RH850 device you are using. You can specify the options either from the command line interface or in the IDE. On the command line, you must specify each option separately, but if you use the IDE, many options will be set automatically, based on your settings of some of the fundamental options.
You need to make settings for:
Processor core
Position independence
Data model
Alignment
Floating-point unit
Optimization settings
Runtime environment, see Setting up the runtime environment
Customizing the ILINK configuration, see Linking considerations.
In addition to these settings, you can use many other options and settings to fine-tune the result even further. For information about how to set options and for a list of all available options, see Compiler options, Linker options, and the IDE Project Management and Building documentation, respectively.
Size of double floating-point type
Floating-point values are represented by 32- and 64-bit numbers in standard IEEE 754 format. If you use the compiler option ‑‑double={32|64}, you can choose whether data declared as double should be represented with 32 bits or 64 bits. The data type float is always represented using 32 bits.
Optimization for speed and size
The compiler’s optimizer performs, among other things, dead-code elimination, constant propagation, inlining, common sub-expression elimination, and precision reduction. It also performs loop optimizations, such as unrolling and induction variable elimination.
You can choose between several optimization levels, and for the highest level you can choose between different optimization goals—size, speed, or balanced. Most optimizations will make the application both smaller and faster. However, when this is not the case, the compiler uses the selected optimization goal to decide how to perform the optimization.
The optimization level and goal can be specified for the entire application, for individual files, and for individual functions. In addition, some individual optimizations, such as function inlining, can be disabled.
For information about compiler optimizations and for more information about efficient coding techniques, see Efficient coding for embedded applications.