Galanakis, Minos | 41f8597 | 2019-09-30 15:56:40 +0100 | [diff] [blame] | 1 | ##################### |
| 2 | Software requirements |
| 3 | ##################### |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 4 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 5 | .. |DS5_VERSION| replace:: v5.29.1 |
| 6 | .. |KEIL_VERSION| replace:: v5.25.2 |
| 7 | .. |DEV_STUDIO_VERSION| replace:: 2018.0 |
| 8 | |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 9 | A quick reference table is included in the |
Minos Galanakis | e409401 | 2020-06-12 14:25:34 +0100 | [diff] [blame] | 10 | :ref:`docs/getting_started/tfm_sw_requirement:Tool & Dependency overview` section |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 11 | of this document. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 12 | |
| 13 | **************************** |
| 14 | Supported build environments |
| 15 | **************************** |
| 16 | |
| 17 | TF-M officially supports a limited set of build environments and setups. In |
| 18 | this context, official support means that the environments listed below |
| 19 | are actively used by team members and active developers hence users should |
| 20 | be able to recreate the same configurations by following the instructions |
| 21 | described below. In case of problems, the TF-M team provides support |
| 22 | only for these environments, but building in other environments can still be |
| 23 | possible. |
| 24 | |
| 25 | The following environments are supported: |
Kevin Townsend | 0f869bb | 2019-08-01 21:06:48 +0200 | [diff] [blame] | 26 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 27 | - Ubuntu 16.04 x64 |
| 28 | - Ubuntu 18.04 x64 |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 29 | - Windows 10 x64 + git-bash (MinGW) + gnumake from DS-5 or msys2. |
| 30 | - Windows 10 x64 + Cygwin x64 (example configuration is provided for |
| 31 | this Windows setup only). |
Mingyang Sun | 1e59064 | 2019-09-24 10:46:21 +0800 | [diff] [blame] | 32 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 33 | .. note:: |
| 34 | Some tools (i.e. python3 and CMake) must NOT be installed from |
| 35 | Cygwin and instead a native windows version is needed. Please see the |
| 36 | chapter `Windows + Cygwin setup`_ below. |
| 37 | IAR requires Ubuntu 18.04 or later. |
| 38 | |
| 39 | ********************* |
| 40 | Supported C compilers |
| 41 | ********************* |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 42 | |
| 43 | To compile TF-M code, at least one of the supported compiler toolchains have to |
| 44 | be available in the build environment. The currently supported compiler |
| 45 | versions are: |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 46 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 47 | - Arm Compiler v6.10 |
| 48 | - Arm Compiler v6.11 |
| 49 | - Arm Compiler v6.12 |
| 50 | - Arm Compiler v6.13 |
| 51 | - GNU Arm compiler v6.3.1 |
| 52 | - GNU Arm compiler v7.3 |
| 53 | - IAR Arm compiler v8.42.x |
| 54 | - IAR Arm compiler v8.50.x |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 55 | |
| 56 | .. Note:: |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 57 | - The Arm compilers above are provided via Keil uVision |KEIL_VERSION| |
| 58 | or greater, DS-5 |DS5_VERSION| or greater, and Development Studio |
| 59 | |DEV_STUDIO_VERSION| or greater, or they can be downloaded as standalone |
| 60 | packages from |
| 61 | `here <https://developer.arm.com/products/software-development-tools/compilers/arm-compiler/downloads/version-6>`__. |
| 62 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 63 | - Arm compiler specific environment variable may need updating based |
| 64 | on specific products and licenses as explained in |
| 65 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 66 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 67 | - The GNU Arm compiler can be downloaded from |
| 68 | `here <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads>`__. |
| 69 | On the page select *GNU Arm Embedded Toolchain: 6-2017-q1-update* |
| 70 | or *GNU Arm Embedded Toolchain: 7-2018-q2-update* |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 71 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 72 | - The IAR Arm compilers above are provided via IAR Embedded Workbench (Windows) or |
| 73 | IAR build tools for linux. |
| 74 | For information, see |
| 75 | `here <https://www.iar.com/iar-embedded-workbench/#!?architecture=Arm>`__ or |
| 76 | `here <https://www.iar.com/iar-embedded-workbench/build-tools-for-linux/>`__. |
| 77 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 78 | ************************ |
| 79 | Supported CMake versions |
| 80 | ************************ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 81 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 82 | The build-system is CMake based and supports the following versions: |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 83 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 84 | - 3.13 |
| 85 | - 3.14 |
| 86 | - 3.15 |
| 87 | - 3.16 |
| 88 | - 3.17 |
| 89 | - 3.18 |
| 90 | |
| 91 | .. Note:: |
| 92 | - IAR requires version 3.14 or later. |
| 93 | - ARMClang requires version 3.15 or later. |
| 94 | - Please use the latest build version available (i.e. 3.7.2 instead of |
| 95 | 3.7.0). |
| 96 | While it is preferable to use the newest version this is not required |
| 97 | and any version from the above list should work. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 98 | - Recent versions of CMake can be downloaded from |
| 99 | https://cmake.org/download/, and older releases are available from |
| 100 | https://cmake.org/files. |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 101 | - For Cygwin users, please use a native windows CMake version |
| 102 | instead of the version installed with Cygwin. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 103 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 104 | *************************** |
| 105 | Supported GNU make versions |
| 106 | *************************** |
| 107 | |
| 108 | The TF-M team builds using the "Unix Makefiles" generator of CMake and |
| 109 | thus GNU make is needed for the build. On Linux please use the version |
| 110 | available from the official repository of your distribution. |
| 111 | |
| 112 | On Windows the following binaries are supported: |
| 113 | |
| 114 | - GNU make v4.2.1 executable from Cygwin |
| 115 | - GNU make v4.2.1 executable from msys2 |
| 116 | - GNU make v4.2 executable from DS5 |DS5_VERSION| (see <DS5 directory>/bin) |
| 117 | |
| 118 | CMake is quite tolerant to GNU make versions and basically any |
| 119 | "reasonably recent" GNU make version should work. |
| 120 | |
| 121 | CMake generators other than "Unix Makefiles" may work, but are not |
| 122 | officially supported. |
| 123 | |
| 124 | ********************* |
| 125 | External dependencies |
| 126 | ********************* |
| 127 | |
| 128 | Dependency management is now handled by cmake. If you wish to alter this |
Anton Komlev | b8e3af0 | 2020-08-28 10:23:57 +0100 | [diff] [blame] | 129 | behaviour, see :ref:`docs/getting_started/tfm_build_instruction:Manual |
| 130 | dependency management` |
Minos Galanakis | ac6b06c | 2020-03-19 12:57:02 +0000 | [diff] [blame] | 131 | |
Ludovic Barre | 8a77bdd | 2020-03-26 19:53:07 +0100 | [diff] [blame] | 132 | ******************************************** |
| 133 | Tools for configuring and programming boards |
| 134 | ******************************************** |
| 135 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 136 | For stm32l5xx boards, `STM32_Programmer_CLI <https://www.st.com/en/development-tools/stm32cubeprog.html>`__ |
| 137 | is used to configure security protections and to write the code in internal flash. |
| 138 | A version is available for Linux and Windows host machine. |
Ludovic Barre | 8a77bdd | 2020-03-26 19:53:07 +0100 | [diff] [blame] | 139 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 140 | ************** |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 141 | Example setups |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 142 | ************** |
| 143 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 144 | This section lists dependencies and some exact and tested steps to set-up a |
| 145 | TF-M-m build environment under various OSes. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 146 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 147 | Ubuntu setup |
| 148 | ============ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 149 | |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 150 | Install the following tools: |
| 151 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 152 | - DS-5 |DS5_VERSION|. |
| 153 | - Git tools v2.10.0 |
| 154 | - CMake (see the "Supported CMake versions" chapter) |
| 155 | - GNU Make (see the "Supported make versions" chapter) |
| 156 | - Python3 (3.6 or newer) |
| 157 | - Python3 packages: *cryptography, pyasn1, yaml, jinja2 v2.10, cbor v1.0.0, click, imgtool v1.6.0* |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 158 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 159 | .. code-block:: bash |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 160 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 161 | pip3 install --user cryptography pyasn1 pyyaml jinja2 cbor click imgtool |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 162 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 163 | - SRecord v1.58 (for Musca test chip boards) |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 164 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 165 | Setup a shell to enable compiler toolchain and CMake after installation. |
| 166 | ------------------------------------------------------------------------ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 167 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 168 | To import Arm Compiler v6.10 in your bash shell console: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 169 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 170 | .. Warning:: |
| 171 | Arm compiler specific environment variable may need updating based on |
| 172 | specific products and licenses as explained in |
| 173 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 174 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 175 | .. code-block:: bash |
| 176 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 177 | export PATH=<DS-5_PATH>/sw/ARMCompiler6.10/bin:$PATH |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 178 | export ARM_TOOL_VARIANT=ult |
| 179 | export ARM_PRODUCT_PATH=<DS-5_PATH>/sw/mappings |
| 180 | export ARMLMD_LICENSE_FILE=<LICENSE_FILE_PATH> |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 181 | |
| 182 | To import CMake in your bash shell console: |
| 183 | |
| 184 | .. code-block:: bash |
| 185 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 186 | export PATH=<CMake path>/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 187 | |
| 188 | To import GNU Arm in your bash shell console: |
| 189 | |
| 190 | .. code-block:: bash |
| 191 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 192 | export PATH=<bash path>/bin:$PATH |
| 193 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 194 | To import IAR Arm compiler in your bash shell console: |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 195 | |
| 196 | .. code-block:: bash |
| 197 | |
| 198 | export PATH=<IAR compiler path>/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 199 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 200 | Windows + Cygwin setup |
| 201 | ====================== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 202 | |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 203 | Install the following tools: |
| 204 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 205 | - uVision |KEIL_VERSION| or DS-5 |DS5_VERSION| (DS-5 Ultimate Edition) which |
| 206 | provides the Arm Compiler v6.10 compiler or GNU Arm compiler v6.3.1. |
| 207 | - Git client latest version (https://git-scm.com/download/win) |
| 208 | - CMake (`native Windows version <https://cmake.org/download/>`__, |
| 209 | see the `Supported CMake versions`_ chapter) |
| 210 | - `Cygwin <https://www.cygwin.com/>`__. Tests done with version 2.877 |
| 211 | (64 bits) |
| 212 | - GNU make should be installed by selecting appropriate package during |
| 213 | cygwin |
| 214 | installation. |
| 215 | - Python3 (3.6 or newer) `(native Windows version) <https://www.python.org/downloads/>`__ |
| 216 | - Python3 packages: *cryptography, pyasn1, yaml, jinja2 v2.10, cbor v1.0.0, click imgtool v1.6.0* |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 217 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 218 | .. code-block:: bash |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 219 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 220 | pip3 install --user cryptography pyasn1 pyyaml jinja2 cbor click imgtool |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame] | 221 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 222 | - `SRecord v1.63 <https://sourceforge.net/projects/srecord/>`__ (for Musca test |
| 223 | chip boards) |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame] | 224 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 225 | Setup Cygwin to enable a compiler toolchain and CMake after installation. |
| 226 | ------------------------------------------------------------------------- |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame] | 227 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 228 | If applicable, import Arm Compiler v6.10 in your shell console. To make this |
| 229 | change permanent, add the command line into ~/.bashrc |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame] | 230 | |
| 231 | Armclang + DS-5 |
| 232 | ^^^^^^^^^^^^^^^ |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 233 | .. Note:: |
| 234 | |
| 235 | - Arm compiler specific environment variable may need updating based on |
| 236 | specific products and licenses as explained in |
| 237 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 238 | - Arm licensing related environment variables must use Windows paths, and not |
| 239 | the Cygwin specific one relative to */cygrive*. |
| 240 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame] | 241 | .. code-block:: bash |
| 242 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 243 | export PATH=/cygdrive/c/<DS-5_PATH>/sw/ARMCompiler6.10/bin:$PATH |
| 244 | export ARM_PRODUCT_PATH=C:/<DS-5_PATH>/sw/mappings |
| 245 | export ARM_TOOL_VARIANT=ult |
| 246 | export ARMLMD_LICENSE_FILE=<LICENSE_FILE_PATH> |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 247 | |
| 248 | Armclang + Keil MDK Arm |
| 249 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 250 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 251 | .. Note:: |
| 252 | |
| 253 | - Arm compiler specific environment variable may need updating based |
| 254 | on specific products and licenses as explained in |
| 255 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 256 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 257 | .. code-block:: bash |
| 258 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 259 | export PATH=/cygdrive/c/<uVision path>/ARM/ARMCLANG/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 260 | |
| 261 | GNU Arm |
| 262 | ^^^^^^^ |
| 263 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 264 | If applicable, import GNU Arm compiler v6.3.1 in your shell console. To make |
| 265 | this change permanent, add the command line into ~/.bashrc |
| 266 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 267 | .. code-block:: bash |
| 268 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 269 | export PATH=<GNU Arm path>/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 270 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 271 | CMake |
| 272 | ^^^^^ |
| 273 | |
| 274 | To import CMake in your bash shell console: |
| 275 | |
| 276 | .. code-block:: bash |
| 277 | |
| 278 | export PATH=/cygdrive/c/<CMake path>/bin:$PATH |
| 279 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 280 | Building the documentation |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 281 | ========================== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 282 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 283 | The build system is prepared to support generation of two documents. |
| 284 | The Reference Manual which is Doxygen based, and the User Guide which is |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 285 | Sphinx based. Both document can be generated in HTML and PDF format. |
| 286 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 287 | .. Note:: |
| 288 | |
| 289 | Support for document generation in the build environment is not mandatory. |
| 290 | Missing document generation tools will not block building the TF-M |
| 291 | firmware. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 292 | |
| 293 | To compile the TF-M Reference Manual |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 294 | ------------------------------------ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 295 | |
| 296 | The following additional tools are needed: |
| 297 | |
| 298 | - Doxygen v1.8.0 or later |
| 299 | - Graphviz dot v2.38.0 or later |
| 300 | - PlantUML v1.2018.11 or later |
| 301 | - Java runtime environment 1.8 or later (for running PlantUML) |
| 302 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 303 | For PDF generation the following tools are needed in addition to the |
| 304 | above list: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 305 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 306 | - LaTeX |
| 307 | - PdfLaTeX |
| 308 | |
| 309 | Set-up the needed tools |
| 310 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 311 | |
| 312 | Linux |
| 313 | """"" |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 314 | .. code-block:: bash |
| 315 | |
| 316 | sudo apt-get install -y doxygen graphviz default-jre |
| 317 | mkdir ~/plantuml |
| 318 | curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download --output ~/plantuml/plantuml.jar |
| 319 | |
| 320 | For PDF generation: |
| 321 | |
| 322 | .. code-block:: bash |
| 323 | |
| 324 | sudo apt-get install -y doxygen-latex |
| 325 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 326 | Windows + Cygwin |
| 327 | """""""""""""""" |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 328 | |
| 329 | Download and install the following tools: |
| 330 | - `Doxygen |
| 331 | 1.8.8 <https://sourceforge.net/projects/doxygen/files/snapshots/doxygen-1.8-svn/windows/doxygenw20140924_1_8_8.zip/download>`__ |
| 332 | - `Graphviz |
| 333 | 2.38 <https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi>`__ |
| 334 | - The Java runtime is part of the DS5 installation or can be |
| 335 | `downloaded from here <https://www.java.com/en/download/>`__ |
| 336 | - `PlantUML <http://sourceforge.net/projects/plantuml/files/plantuml.jar/download>`__ |
| 337 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 338 | For PDF generation: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 339 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 340 | - `MikTeX <https://miktex.org/download>`__ |
| 341 | |
| 342 | .. Note:: |
| 343 | When building the documentation the first time, MikTeX might prompt for |
| 344 | installing missing LaTeX components. Please allow the MikTeX package |
| 345 | manager to set-up these. |
| 346 | |
| 347 | Configure the shell |
| 348 | ^^^^^^^^^^^^^^^^^^^ |
| 349 | |
| 350 | Linux |
| 351 | """"" |
| 352 | |
| 353 | :: |
| 354 | |
| 355 | export PLANTUML_JAR_PATH=~/plantuml/plantuml.jar |
| 356 | |
| 357 | Windows + Cygwin |
| 358 | """""""""""""""" |
| 359 | |
| 360 | Assumptions for the settings below: |
| 361 | |
| 362 | - plantuml.jar is available at c:\\plantuml\\plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 363 | - doxygen, dot, and MikTeX binaries are available on the PATH. |
| 364 | - Java JVM is used from DS5 installation. |
| 365 | |
| 366 | :: |
| 367 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 368 | export PLANTUML_JAR_PATH=c:/plantuml/plantuml.jar |
| 369 | export PATH=$PATH:/cygdrive/c/<DS-5 path>/sw/java/bin |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 370 | |
| 371 | To compile the TF-M User Guide |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 372 | ------------------------------ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 373 | |
| 374 | The following additional tools are needed: |
| 375 | |
| 376 | - Python3 and the following modules: |
| 377 | - Sphinx v1.7.9 |
| 378 | - m2r v0.2.0 |
| 379 | - sphinxcontrib-plantuml |
| 380 | - sphinx-rtd-theme |
| 381 | - Graphviz dot v2.38.0 or later |
| 382 | - PlantUML v1.2018.11 or later |
| 383 | - Java runtime environment 1.8 or later (for running PlantUML) |
| 384 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 385 | For PDF generation the following tools are needed in addition to the |
| 386 | above list: |
| 387 | |
| 388 | - LaTeX |
| 389 | - PdfLaTeX |
| 390 | |
| 391 | Set-up the needed tools |
| 392 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 393 | |
| 394 | Linux |
| 395 | """"" |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 396 | |
| 397 | .. code-block:: bash |
| 398 | |
| 399 | sudo apt-get install -y python3 graphviz default-jre |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 400 | pip --user install m2r Sphinx sphinx-rtd-theme sphinxcontrib-plantuml |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 401 | mkdir ~/plantuml |
| 402 | curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download --output ~/plantuml/plantuml.jar |
| 403 | |
| 404 | For PDF generation: |
| 405 | |
| 406 | .. code-block:: bash |
| 407 | |
| 408 | sudo apt-get install -y doxygen-latex |
| 409 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 410 | Windows + Cygwin |
| 411 | """""""""""""""" |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 412 | Download and install the following tools: |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 413 | - Python3 `(native Windows version) <https://www.python.org/downloads/>`__ |
| 414 | - Pip packages *m2r, Sphinx, sphinx-rtd-theme sphinxcontrib-plantuml* |
| 415 | |
| 416 | .. code-block:: bash |
| 417 | |
| 418 | pip --user install m2r Sphinx sphinx-rtd-theme sphinxcontrib-plantuml |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 419 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 420 | - `Graphviz 2.38 <https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi>`__ |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 421 | - The Java runtime is part of the DS5 installation or can be |
| 422 | `downloaded from here <https://www.java.com/en/download/>`__ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 423 | - `PlantUML <http://sourceforge.net/projects/plantuml/files/plantuml.jar/download>`__ |
| 424 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 425 | For PDF generation: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 426 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 427 | - `MikTeX <https://miktex.org/download>`__ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 428 | |
| 429 | .. Note:: |
| 430 | When building the documentation the first time, MikTeX might |
| 431 | prompt for installing missing LaTeX components. Please allow the MikTeX |
| 432 | package manager to set-up these. |
| 433 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 434 | Configure the shell |
| 435 | ^^^^^^^^^^^^^^^^^^^ |
| 436 | |
| 437 | Linux |
| 438 | """"" |
| 439 | .. code-block:: bash |
| 440 | |
| 441 | export PLANTUML_JAR_PATH=~/plantuml/plantuml.jar |
| 442 | |
| 443 | Windows + Cygwin |
| 444 | """""""""""""""" |
| 445 | |
| 446 | Assumptions for the settings below: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 447 | |
| 448 | - plantuml.jar is available at c:\\plantuml\\plantuml.jar |
| 449 | - doxygen, dot, and MikTeX binaries are available on the PATH. |
| 450 | - Java JVM is used from DS5 installation. |
| 451 | |
| 452 | .. code-block:: bash |
| 453 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 454 | export PLANTUML_JAR_PATH=c:/plantuml/plantuml.jar |
| 455 | export PATH=$PATH:/cygdrive/c/<DS-5 path>/sw/java/bin |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 456 | |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 457 | ************************** |
| 458 | Tool & Dependency overview |
| 459 | ************************** |
| 460 | |
| 461 | To build the TF-M firmware the following tools are needed: |
| 462 | |
| 463 | .. csv-table:: Tool dependencies |
| 464 | :header: "Name", "Version", "Component" |
| 465 | |
Anton Komlev | 211aacf | 2020-11-02 12:48:11 +0000 | [diff] [blame^] | 466 | "C compiler",See `Supported C compilers`_,"Firmware" |
| 467 | "CMake",See `Supported CMake versions`_, |
| 468 | "GNU Make",See `Supported GNU make versions`_, |
| 469 | "tf-m-tests",See `External dependencies`_, |
| 470 | "mbed-crypto",See `External dependencies`_, |
| 471 | "MCUboot",See `External dependencies`_, |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 472 | "Python",3.x,"Firmware, User Guide" |
| 473 | "yaml",,"Firmware" |
| 474 | "pyasn1",,"Firmware" |
| 475 | "jinja2",,"Firmware" |
| 476 | "cryptography",,"Firmware" |
| 477 | "cbor",,"Firmware" |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 478 | "click",,"Firmware" |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 479 | "imgtool",,"Firmware" |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 480 | "Doxygen",">1.8","Reference manual" |
| 481 | "Sphinx",">1.4","User Guide" |
| 482 | "sphinxcontrib-plantuml",,"User Guide" |
| 483 | "sphinx-trd-theme",,"User Guide" |
| 484 | "Git",, |
| 485 | "PlantUML",">v1.2018.11","Reference Manual, User Guide" |
| 486 | "Graphviz dot",">v2.38.0","Reference manual" |
| 487 | "Java runtime environment (JRE)",">1.8","Reference Manual, User Guide" |
| 488 | "LaTex",,"pdf version of Reference Manual and User Guide" |
| 489 | "PdfLaTex",,"pdf version of Reference Manual and User Guide" |
| 490 | |
| 491 | Dependency chain: |
| 492 | |
| 493 | .. uml:: |
| 494 | |
| 495 | @startuml |
| 496 | skinparam state { |
| 497 | BackgroundColor #92AEE0 |
| 498 | FontColor black |
| 499 | FontSize 16 |
| 500 | AttributeFontColor black |
| 501 | AttributeFontSize 16 |
| 502 | BackgroundColor<<pdf>> #A293E2 |
| 503 | BackgroundColor<<doc>> #90DED6 |
| 504 | } |
| 505 | state fw as "Firmware" : TF-M binary |
| 506 | state c_comp as "C Compiler" : C99 |
| 507 | state gmake as "GNU make" |
| 508 | state u_guide as "User Guide" <<doc>> |
| 509 | state refman as "Reference Manual" <<doc>> |
| 510 | state rtd_theme as "sphinx-rtd-theme" <<doc>> |
| 511 | state sphnix_puml as "sphinxcontrib-plantuml" <<doc>> |
| 512 | state JRE as "JRE" <<doc>> : Java Runtime Environment |
| 513 | state gwiz as "Graphwiz dot" <<doc>> |
| 514 | state Sphinx as "Sphinx" <<doc>> |
| 515 | state m2r as "m2r" <<doc>> |
| 516 | state PlantUML as "PlantUML" <<doc>> |
| 517 | state LaTex as "LaTex" <<pdf>> |
| 518 | state PdfLaTex as "PdfLaTex" <<<<pdf>>>> |
| 519 | state Doxygen as "Doxygen" <<doc>> |
| 520 | |
| 521 | [*] --> fw |
| 522 | fw --> c_comp |
| 523 | fw --> CMake |
| 524 | CMake --> gmake |
| 525 | fw --> cryptography |
| 526 | fw --> pyasn1 |
| 527 | fw --> yaml |
| 528 | fw --> jinja2 |
| 529 | fw --> cbor |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 530 | fw --> click |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 531 | fw --> imgtool |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 532 | cryptography --> Python3 |
| 533 | pyasn1 --> Python3 |
| 534 | yaml --> Python3 |
| 535 | jinja2 --> Python3 |
| 536 | cbor --> Python3 |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 537 | click --> Python3 |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 538 | imgtool --> Python3 |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 539 | |
| 540 | [*] --> u_guide |
| 541 | u_guide --> Sphinx |
| 542 | Sphinx --> m2r |
| 543 | Sphinx --> rtd_theme |
| 544 | Sphinx --> sphnix_puml |
| 545 | m2r --> Python3 |
| 546 | rtd_theme --> Python3 |
| 547 | sphnix_puml --> Python3 |
| 548 | Sphinx --> PlantUML |
| 549 | PlantUML --> JRE |
| 550 | PlantUML --> gwiz |
| 551 | Sphinx --> LaTex |
| 552 | LaTex --> PdfLaTex |
| 553 | |
| 554 | [*] --> refman |
| 555 | refman --> Doxygen |
| 556 | Doxygen --> PlantUML |
| 557 | Doxygen --> LaTex |
| 558 | state Legend { |
| 559 | state x as "For PDF generation only" <<pdf>> |
| 560 | state y as "For document generation only" <<doc>> |
| 561 | state z as "Mandatory" |
| 562 | } |
| 563 | |
| 564 | @enduml |
| 565 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 566 | -------------- |
| 567 | |
Ronald Cron | c0c38fa | 2019-09-23 09:36:56 +0200 | [diff] [blame] | 568 | *Copyright (c) 2017-2020, Arm Limited. All rights reserved.* |