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