blob: 8df576fb8ea242e0481906e864ca1d97b831797b [file] [log] [blame]
TTornblomb9e5ed02020-02-13 16:53:15 +01001###################################################
2Additional build instructions for the IAR toolchain
3###################################################
4
5Follow the instructions in
Anton Komlevb8e3af02020-08-28 10:23:57 +01006:doc:`software requirements <tfm_build_instruction>`, but replace the -DCMAKE_TOOLCHAIN_FILE setting with toolchain_IARARM.cmake.
TTornblomb9e5ed02020-02-13 16:53:15 +01007
8
9Notes for building with IARARM
10------------------------------
11
TTornblombefd3ca2020-04-30 11:09:08 +020012 IAR Embedded Workbench for ARM (EWARM) versions 8.42 or later are required.
13
TTornblomb9e5ed02020-02-13 16:53:15 +010014 Currently the MUSCA_B1, MUSCA_S1 and SSE-200_AWS targets are not supported with IARARM,
Mark Horvath9a5a9b92019-11-29 15:57:55 +010015 due to lack of testing. The FVP_SSE300_MPS2 target is currently not supported by IARARM.
TTornblomb9e5ed02020-02-13 16:53:15 +010016
TTornblomb9e5ed02020-02-13 16:53:15 +010017 cmake needs to be version 3.14 or newer.
18
19 The V8M IAR CMSIS_5 RTX libraries in CMSIS_5 5.5.0 has a problem and has been updated in
Kevin Peng6710c822020-05-21 16:52:14 +080020 CMSIS_5 5.7.0. The updated libraries are part of the tf-m-tests repo and no special instructions
21 are needed when the libraries from this repo are used.
TTornblomb9e5ed02020-02-13 16:53:15 +010022
23 For all configurations and build options some of the QCBOR tests fail due to the tests not handling
24 double float NaN:s according to the Arm Runtime ABI. This should be sorted out in the future.
25
Anton Komlevb8e3af02020-08-28 10:23:57 +010026Example: building TF-M for AN521 platform using IAR:
27====================================================
TTornblombefd3ca2020-04-30 11:09:08 +020028.. code-block:: bash
29
Anton Komlevb8e3af02020-08-28 10:23:57 +010030 cd <base folder>
31 cd trusted-firmware-m
32 cmake -S . -B cmake_build -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=toolchain_IARARM.cmake
33 cmake --build cmake_build -- install
TTornblomb9e5ed02020-02-13 16:53:15 +010034
Anton Komlevb8e3af02020-08-28 10:23:57 +010035Alternately using traditional cmake syntax
TTornblomb9e5ed02020-02-13 16:53:15 +010036
TTornblomb9e5ed02020-02-13 16:53:15 +010037.. code-block:: bash
38
Leonardo Sandovald7f72d52020-07-28 18:02:34 -050039 cd <base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010040 cd trusted-firmware-m
41 mkdir cmake_build
42 cd cmake_build
Anton Komlevb8e3af02020-08-28 10:23:57 +010043 cmake .. -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=../toolchain_IARARM.cmake
44 make install
TTornblomb9e5ed02020-02-13 16:53:15 +010045
46Regression Tests for the AN521 target platform
47==============================================
TTornblomb9e5ed02020-02-13 16:53:15 +010048
49.. code-block:: bash
50
Leonardo Sandovald7f72d52020-07-28 18:02:34 -050051 cd <base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010052 cd trusted-firmware-m
Anton Komlevb8e3af02020-08-28 10:23:57 +010053 cmake -S . -B cmake_build -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=toolchain_IARARM.cmake -DTEST_S=ON -DTEST_NS=ON
54 cmake --build cmake_build -- install
TTornblomb9e5ed02020-02-13 16:53:15 +010055
Anton Komlevb8e3af02020-08-28 10:23:57 +010056Alternately using traditional cmake syntax
TTornblomb9e5ed02020-02-13 16:53:15 +010057
58.. code-block:: bash
59
Leonardo Sandovald7f72d52020-07-28 18:02:34 -050060 cd <base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010061 cd trusted-firmware-m
Anton Komlevb8e3af02020-08-28 10:23:57 +010062 mkdir cmake_build
63 cd cmake_build
64 cmake .. -DTFM_PLATFORM=mps2/an521 -DCMAKE_TOOLCHAIN_FILE=../toolchain_IARARM.cmake -DTEST_S=ON -DTEST_NS=ON
65 make install
TTornblomb9e5ed02020-02-13 16:53:15 +010066
67 *Copyright (c) 2020, Arm Limited. All rights reserved.*