Skip to content

Commit c3c5333

Browse files
RobinKastbergfabiobaltieri
authored andcommitted
toolchain: doc: Add toolchain information about IAR
This commit adds documentation information about the IAR toolchain. Signed-off-by: Robin Kastberg <[email protected]>
1 parent 6e1d953 commit c3c5333

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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/

doc/develop/toolchains/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Guides on how to set up toolchains for Zephyr development.
1414
cadence_xcc.rst
1515
designware_arc_mwdt.rst
1616
gnu_arm_embedded.rst
17+
iar_arm_toolchain.rst
1718
intel_oneapi_toolkit.rst
1819

1920
host.rst

0 commit comments

Comments
 (0)