|
| 1 | +IAR Arm Toolchain |
| 2 | +################# |
| 3 | + |
| 4 | +#. Download and install a release of `IAR Arm Toolchain`_ (EWARM/CXARM) on your host. |
| 5 | + |
| 6 | +.. note:: |
| 7 | + As of now, a Development version of the IAR build tools for Arm is required to work with Zephyr. |
| 8 | + It is distributed to selected partners and customers for evaluation. If you are interested in being |
| 9 | + part of this program, please send a request to the IAR FAE team at [email protected]. |
| 10 | + |
| 11 | +#. Make sure you have :ref:`Zephyr SDK <toolchain_zephyr_sdk>` installed on your host. |
| 12 | + |
| 13 | +.. note:: |
| 14 | + A Zephyr SDK is used as a source of tools like device tree compiler (DTC), QEMU, etc… Even though |
| 15 | + IAR Arm toolchain is used for Zephyr RTOS build, still the GNU preprocessor & GNU objcopy might |
| 16 | + be used for some steps like device tree preprocessing and .bin file generation. |
| 17 | + |
| 18 | +#. :ref:`Set these environment variables <env_vars>`: |
| 19 | + |
| 20 | + - Set :envvar:`ZEPHYR_TOOLCHAIN_VARIANT` to ``iar``. |
| 21 | + - Set :envvar:`IAR_TOOLCHAIN_PATH` to the toolchain installation directory. |
| 22 | + |
| 23 | +#. The IAR Toolchain needs the :envvar:`IAR_LMS_BEARER_TOKEN` environment |
| 24 | + variable to be set to a valid ``license bearer token``. |
| 25 | + |
| 26 | +For example: |
| 27 | + |
| 28 | + .. code-block:: bash |
| 29 | +
|
| 30 | + # Linux (default installation path): |
| 31 | + export IAR_TOOLCHAIN_PATH=/opt/iarsystems/bxarm/arm |
| 32 | + export ZEPHYR_TOOLCHAIN_VARIANT=iar |
| 33 | + export IAR_LMS_BEARER_TOKEN="<BEARER-TOKEN>" |
| 34 | +
|
| 35 | + .. code-block:: batch |
| 36 | +
|
| 37 | + # Windows: |
| 38 | + set IAR_TOOLCHAIN_PATH=c:\<path>\arm |
| 39 | + set ZEPHYR_TOOLCHAIN_VARIANT=iar |
| 40 | + set IAR_LMS_BEARER_TOKEN="<BEARER-TOKEN>" |
| 41 | +
|
| 42 | +.. note:: |
| 43 | + |
| 44 | + The IAR Toolchain uses ``ilink`` for linking. This is incompatible with Zephyr’s |
| 45 | + linker script template, which works with GNU ld. Zephyr’s IAR Arm Toolchain depends on |
| 46 | + Zephyr’s CMake linker script generator, which supports generating icf-files. |
| 47 | + Basic icf-file support is in place, but there are still areas which are not fully |
| 48 | + supported by the CMake linker script generator. |
| 49 | + |
| 50 | +.. note:: |
| 51 | + |
| 52 | + The IAR Toolchain uses the GNU Assembler which is distributed with the Zephyr SDK |
| 53 | + for ``.S-files``. |
| 54 | + |
| 55 | +.. note:: |
| 56 | + |
| 57 | + Some Zephyr subsystems or modules may also contain C or assembly code that relies |
| 58 | + on GNU intrinsics and have not yet been updated to work fully with ``iar``. |
| 59 | + |
| 60 | +.. _IAR Arm Toolchain: https://www.iar.com/products/architectures/arm/ |
0 commit comments