Skip to main content

IAR Embedded Workbench for Arm 10.10.x

32ビットモードプロセッサ構成

このセクションの内容:

コンパイラに最適なコードを生成させるためには、使用しているArm コアに合わせて設定する必要があります。

プロセッサ選択

IAR C/C++コンパイラfor Armはほとんどの32 ビットARMコアおよびデバイスをサポートします。サポートされているすべてのコアでは、Thumb 命令および64 ビット乗算命令がサポートされます。コンパイラが生成するオブジェクトコードは、コア間でバイナリレベルで互換性があるとは限りません。そのため、コンパイラのプロセッサオプションを指定する必要があります。デフォルトコアはCortex-M3です。

危険

‑‑cpuオプションを使用して、Armコアを指定します。構文情報については、‑‑armおよび‑‑thumbを参照してください。

VFPおよび浮動小数点演算

ベクタ浮動小数点(VFP)コプロセッサを含むArmコードを使用している場合、‑‑fpuオプションを使用して、ソフトウェア浮動小数点ライブラリルーチンではなく、コプロセッサを使用して、浮動小数点演算を実行するコードを生成できます。

注記

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_core to __iar_init_core_v6

    • Kept 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_vfp to __iar_init_vfp_v6

    • Kept 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

注意

一般オプション』を参照してください。

危険

‑‑fpuオプションを使用して、Armコアを指定します。構文については、‑‑fpuを参照してください。

バイトオーダ

コンパイラはビッグエンディアンとリトルエンディアンのバイトオーダをサポートしています。アプリケーションのすべてのユーザおよびライブラリモジュールで、同じバイトオーダを使用する必要があります。

注意

IDEでバイトオーダーオプションを設定する方法については、32-bitを参照してください。

危険

プロジェクトでバイトオーダを指定するには、‑‑endianオプションを使用します。構文については、‑‑endianを参照してください。