blob: facb744f868fdabc06ff55149e926c4891a72873 [file] [log] [blame]
TTornblomb9e5ed02020-02-13 16:53:15 +01001###################################################
2Additional build instructions for the IAR toolchain
3###################################################
4
5Follow the instructions in
6:doc:`software requirements <tfm_build_instruction>`, but replace the -DCOMPILER= setting with IARARM.
7
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
26 Some minor changes to the mbed-crypto pack is required to allow building TF-M with the
27 IAR tools. This will be sorted out once tf-m upgrades to >3.1.0
28
29 For mbed-crypto (CMakeLists.txt):
30
TTornblombefd3ca2020-04-30 11:09:08 +020031.. code-block:: bash
32
33 if(CMAKE_COMPILER_IS_IAR)
34 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts --warnings_are_errors -Ohz")
35 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts")
36 + set(CMAKE_C_FLAGS_RELEASE "-Ohz")
37 + set(CMAKE_C_FLAGS_DEBUG "--debug -On")
38 + set(CMAKE_C_FLAGS_CHECK "--warnings_are_errors")
39 endif(CMAKE_COMPILER_IS_IAR)
TTornblomb9e5ed02020-02-13 16:53:15 +010040
41
42Build steps:
43============
44.. code-block:: bash
45
Leonardo Sandovald7f72d52020-07-28 18:02:34 -050046 cd <base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010047 cd trusted-firmware-m
48 mkdir cmake_build
49 cd cmake_build
50 cmake ../ -G"Unix Makefiles" -DTARGET_PLATFORM=AN521 -DCOMPILER=IARARM
51 cmake --build ./ -- install
52
53Regression Tests for the AN521 target platform
54==============================================
55*TF-M build regression tests on Linux*
56
57.. code-block:: bash
58
Leonardo Sandovald7f72d52020-07-28 18:02:34 -050059 cd <base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010060 cd trusted-firmware-m
61 mkdir cmake_test
62 cd cmake_test
63 cmake -G"Unix Makefiles" -DPROJ_CONFIG=`readlink -f ../configs/ConfigRegression.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=IARARM ../
64 cmake --build ./ -- install
65
66*TF-M build regression tests on Windows*
67
68.. code-block:: bash
69
Leonardo Sandovald7f72d52020-07-28 18:02:34 -050070 cd <base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010071 cd trusted-firmware-m
72 mkdir cmake_test
73 cd cmake_test
74 cmake -G"Unix Makefiles" -DPROJ_CONFIG=`cygpath -am ../configs/ConfigRegression.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=IARARM ../
75 cmake --build ./ -- install
76
77 *Copyright (c) 2020, Arm Limited. All rights reserved.*