blob: 87fbc4f0de17756a9019e1632ba8aeecd19f8d90 [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
Mudit Sharma8301e102025-04-10 11:44:31 +010012 IAR Embedded Workbench for ARM (EWARM) versions v9.30.1 or later are required.
TTornblombefd3ca2020-04-30 11:09:08 +020013
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
Nik Dewallyae923b12024-06-26 15:30:09 +010017 cmake needs to be version 3.21 or newer.
TTornblomb9e5ed02020-02-13 16:53:15 +010018
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====================================================
Joakim Anderssonaca307c2023-11-24 13:56:55 +010028
TTornblombefd3ca2020-04-30 11:09:08 +020029.. code-block:: bash
30
Leonardo Sandoval98350142021-02-03 16:32:14 -060031 cd <TF-M base folder>
Summer Qin2de23d02021-05-14 13:44:14 +080032 cmake -S . -B cmake_build -DTFM_PLATFORM=arm/mps2/an521 -DTFM_TOOLCHAIN_FILE=toolchain_IARARM.cmake
Anton Komlevb8e3af02020-08-28 10:23:57 +010033 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 Sandoval98350142021-02-03 16:32:14 -060039 cd <TF-M base folder>
TTornblomb9e5ed02020-02-13 16:53:15 +010040 mkdir cmake_build
41 cd cmake_build
Summer Qin2de23d02021-05-14 13:44:14 +080042 cmake .. -DTFM_PLATFORM=arm/mps2/an521 -DTFM_TOOLCHAIN_FILE=../toolchain_IARARM.cmake
Anton Komlevb8e3af02020-08-28 10:23:57 +010043 make install
TTornblomb9e5ed02020-02-13 16:53:15 +010044
45Regression Tests for the AN521 target platform
46==============================================
TTornblomb9e5ed02020-02-13 16:53:15 +010047
48.. code-block:: bash
49
Leonardo Sandoval98350142021-02-03 16:32:14 -060050 cd <TF-M base folder>
Summer Qin2de23d02021-05-14 13:44:14 +080051 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 +010052 cmake --build cmake_build -- install
TTornblomb9e5ed02020-02-13 16:53:15 +010053
Anton Komlevb8e3af02020-08-28 10:23:57 +010054Alternately using traditional cmake syntax
TTornblomb9e5ed02020-02-13 16:53:15 +010055
56.. code-block:: bash
57
Leonardo Sandoval98350142021-02-03 16:32:14 -060058 cd <TF-M base folder>
Anton Komlevb8e3af02020-08-28 10:23:57 +010059 mkdir cmake_build
60 cd cmake_build
Summer Qin2de23d02021-05-14 13:44:14 +080061 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 +010062 make install
TTornblomb9e5ed02020-02-13 16:53:15 +010063
Joakim Anderssonaca307c2023-11-24 13:56:55 +010064*Copyright (c) 2020-2021, Arm Limited. All rights reserved.*