- IAR Embedded Workbench for Arm 10.10.x
- IAR C/C++ Development
- Developing embedded applications
- Basic project configuration
- 32-bit mode processor configuration
32-bit mode processor configuration
To make the compiler generate optimum code, you should configure it for the Arm core you are using.
Processor variant
The IAR C/C++ Compiler for Arm supports most 32-bit Arm cores and devices. All supported cores support Thumb instructions and 64-bit multiply instructions. The object code that the compiler generates is not always binary compatible between the cores, therefore it is crucial to specify a processor option to the compiler. The default core is Cortex-M3.
Caution
VFP and floating-point arithmetic
If you are using an Arm core that contains a Vector Floating Point (VFP) coprocessor, you can use the ‑‑fpu option to generate code that carries out floating-point operations utilizing the coprocessor, instead of using the software floating-point library routines.
Note
It is important to know that when using the VFP—unless the linker option ‑‑no_library_search is specified—the linker will automatically keep some symbols (‑‑keep) and redirect others (‑‑redirect) during the automatic runtime library search, based on how the product libraries are built. This can cause problems, in particular if you replace the library startup code in your project. A missing symbol being kept by the linker results in an error. The implicit ‑‑redirect and ‑‑keep operations performed by the linker during library selection are:
for 32-bit Armv6 or later (not Cortex-M), setup code is included to allow unaligned access:
Redirected symbol:
__iar_init_coreto__iar_init_core_v6Kept symbol:
__iar_init_core_v6. This activates a weak call to keep__iar_init_core, which through the redirect will end up in__iar_init_core_v6
for Cortex-M (or Armv5) with FPU, setup code is included to activate the FPU:
Kept symbol:
__iar_init_vfp
for 32-bit Armv6 or later with FPU (not Cortex-M), setup code is included to activate the FPU:
Redirected symbol:
__iar_init_vfpto__iar_init_vfp_v6Kept symbol:
__iar_init_vfp_v6
for code that includes IAR C++ headers, when linking with
--semihosting, C++ exception debug support is included:Kept symbol:
__iar_debug_exceptions
Caution
See General options for information about setting the FPU option in the IDE.
Danger
Use the ‑‑fpu option to specify the Arm core. For syntax information, see ‑‑fpu.
Byte order
The compiler supports the big-endian and little-endian byte order. All user and library modules in your application must use the same byte order.
Caution
See 32-bit for information about setting the Byte order option in the IDE.
Danger
Use the ‑‑endian option to specify the byte order for your project. For syntax information, see ‑‑endian.