blob: b86f5f230cb0dc1e8de99584ecfc1eb68b4f7c8c [file] [log] [blame]
TTornblomb9e5ed02020-02-13 16:53:15 +01001###################################################
2Additional build instructions for the IAR toolchain
3###################################################
4
5Follow the instructions in
Raef Coles69817322020-10-19 14:14:14 +01006:doc:`software requirements <tfm_build_instruction>`, but replace the -DTFM_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
Minos Galanakisdfefe252021-03-11 10:49:58 +000014 Currently the MUSCA_B1 and MUSCA_S1 targets are not supported with IARARM,
Anton Komlev78f67402021-10-22 11:33:20 +010015 due to lack of testing.
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
Leonardo Sandoval98350142021-02-03 16:32:14 -060030 cd <TF-M base folder>
Summer Qin2de23d02021-05-14 13:44:14 +080031 cmake -S . -B cmake_build -DTFM_PLATFORM=arm/mps2/an521 -DTFM_TOOLCHAIN_FILE=toolchain_IARARM.cmake
Anton Komlevb8e3af02020-08-28 10:23:57 +010032 cmake --build cmake_build -- install
TTornblomb9e5ed02020-02-13 16:53:15 +010033
Anton Komlevb8e3af02020-08-28 10:23:57 +010034Alternately using traditional cmake syntax
TTornblomb9e5ed02020-02-13 16:53:15 +010035
TTornblomb9e5ed02020-02-13 16:53:15 +010036.. code-block:: bash
37
Leonardo Sandoval98350142021-02-03 16:32:14 -060038 cd <TF-M base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010039 mkdir cmake_build
40 cd cmake_build
Summer Qin2de23d02021-05-14 13:44:14 +080041 cmake .. -DTFM_PLATFORM=arm/mps2/an521 -DTFM_TOOLCHAIN_FILE=../toolchain_IARARM.cmake
Anton Komlevb8e3af02020-08-28 10:23:57 +010042 make install
TTornblomb9e5ed02020-02-13 16:53:15 +010043
44Regression Tests for the AN521 target platform
45==============================================
TTornblomb9e5ed02020-02-13 16:53:15 +010046
47.. code-block:: bash
48
Leonardo Sandoval98350142021-02-03 16:32:14 -060049 cd <TF-M base folder>
Summer Qin2de23d02021-05-14 13:44:14 +080050 cmake -S . -B cmake_build -DTFM_PLATFORM=arm/mps2/an521 -DTFM_TOOLCHAIN_FILE=toolchain_IARARM.cmake -DTEST_S=ON -DTEST_NS=ON
Anton Komlevb8e3af02020-08-28 10:23:57 +010051 cmake --build cmake_build -- install
TTornblomb9e5ed02020-02-13 16:53:15 +010052
Anton Komlevb8e3af02020-08-28 10:23:57 +010053Alternately using traditional cmake syntax
TTornblomb9e5ed02020-02-13 16:53:15 +010054
55.. code-block:: bash
56
Leonardo Sandoval98350142021-02-03 16:32:14 -060057 cd <TF-M base folder>
Anton Komlevb8e3af02020-08-28 10:23:57 +010058 mkdir cmake_build
59 cd cmake_build
Summer Qin2de23d02021-05-14 13:44:14 +080060 cmake .. -DTFM_PLATFORM=arm/mps2/an521 -DTFM_TOOLCHAIN_FILE=../toolchain_IARARM.cmake -DTEST_S=ON -DTEST_NS=ON
Anton Komlevb8e3af02020-08-28 10:23:57 +010061 make install
TTornblomb9e5ed02020-02-13 16:53:15 +010062
Minos Galanakisdfefe252021-03-11 10:49:58 +000063 *Copyright (c) 2020-2021, Arm Limited. All rights reserved.*