blob: 6f39539863e6e51ce4d64e32764ae4397ba0c732 [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
17 bash needs to be installed and used by cmake for the build steps.
18
19 cmake needs to be version 3.14 or newer.
20
21 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 +080022 CMSIS_5 5.7.0. The updated libraries are part of the tf-m-tests repo and no special instructions
23 are needed when the libraries from this repo are used.
TTornblomb9e5ed02020-02-13 16:53:15 +010024
25 For all configurations and build options some of the QCBOR tests fail due to the tests not handling
26 double float NaN:s according to the Arm Runtime ABI. This should be sorted out in the future.
27
28 Some minor changes to the mbed-crypto pack is required to allow building TF-M with the
29 IAR tools. This will be sorted out once tf-m upgrades to >3.1.0
30
31 For mbed-crypto (CMakeLists.txt):
32
TTornblombefd3ca2020-04-30 11:09:08 +020033.. code-block:: bash
34
35 if(CMAKE_COMPILER_IS_IAR)
36 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts --warnings_are_errors -Ohz")
37 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts")
38 + set(CMAKE_C_FLAGS_RELEASE "-Ohz")
39 + set(CMAKE_C_FLAGS_DEBUG "--debug -On")
40 + set(CMAKE_C_FLAGS_CHECK "--warnings_are_errors")
41 endif(CMAKE_COMPILER_IS_IAR)
TTornblomb9e5ed02020-02-13 16:53:15 +010042
43
44Build steps:
45============
46.. code-block:: bash
47
48 cd <TF-M base folder>
49 cd trusted-firmware-m
50 mkdir cmake_build
51 cd cmake_build
52 cmake ../ -G"Unix Makefiles" -DTARGET_PLATFORM=AN521 -DCOMPILER=IARARM
53 cmake --build ./ -- install
54
55Regression Tests for the AN521 target platform
56==============================================
57*TF-M build regression tests on Linux*
58
59.. code-block:: bash
60
61 cd <TF-M base folder>
62 cd trusted-firmware-m
63 mkdir cmake_test
64 cd cmake_test
65 cmake -G"Unix Makefiles" -DPROJ_CONFIG=`readlink -f ../configs/ConfigRegression.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=IARARM ../
66 cmake --build ./ -- install
67
68*TF-M build regression tests on Windows*
69
70.. code-block:: bash
71
72 cd <TF-M base folder>
73 cd trusted-firmware-m
74 mkdir cmake_test
75 cd cmake_test
76 cmake -G"Unix Makefiles" -DPROJ_CONFIG=`cygpath -am ../configs/ConfigRegression.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=IARARM ../
77 cmake --build ./ -- install
78
79 *Copyright (c) 2020, Arm Limited. All rights reserved.*