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 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 84 | - 3.13 |
| 85 | - 3.14 |
Raef Coles | 1ecb813 | 2020-10-02 15:11:24 +0100 | [diff] [blame^] | 86 | - 3.15 |
| 87 | - 3.16 |
| 88 | - 3.17 |
| 89 | - 3.18 |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 90 | |
| 91 | .. Note:: |
Raef Coles | 1ecb813 | 2020-10-02 15:11:24 +0100 | [diff] [blame^] | 92 | - IAR requires version 3.14 or later. |
| 93 | - ARMClang requires version 3.15 or later. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 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. |
| 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. |
Mingyang Sun | 1e59064 | 2019-09-24 10:46:21 +0800 | [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 | |
| 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: |
Kevin Townsend | 0f869bb | 2019-08-01 21:06:48 +0200 | [diff] [blame] | 113 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 114 | - GNU make v4.2.1 executable from Cygwin |
| 115 | - GNU make v4.2.1 executable from msys2 |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 116 | - 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] | 117 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 118 | CMake is quite tolerant to GNU make versions and basically any |
| 119 | "reasonably recent" GNU make version should work. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 120 | |
| 121 | CMake generators other than "Unix Makefiles" may work, but are not |
| 122 | officially supported. |
| 123 | |
Minos Galanakis | ac6b06c | 2020-03-19 12:57:02 +0000 | [diff] [blame] | 124 | ********************* |
| 125 | External dependencies |
| 126 | ********************* |
| 127 | |
Anton Komlev | b8e3af0 | 2020-08-28 10:23:57 +0100 | [diff] [blame] | 128 | Dependency management is now handled by cmake. If you wish to alter this |
| 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 | |
Kevin Peng | 6710c82 | 2020-05-21 16:52:14 +0800 | [diff] [blame] | 136 | 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] | 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. |
| 139 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 140 | ************** |
| 141 | Example setups |
| 142 | ************** |
| 143 | |
| 144 | This section lists dependencies and some exact and tested steps to set-up a |
| 145 | TF-M-m build environment under various OSes. |
| 146 | |
Mingyang Sun | 1e59064 | 2019-09-24 10:46:21 +0800 | [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 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 152 | - DS-5 |DS5_VERSION|. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 153 | - Git tools v2.10.0 |
| 154 | - CMake (see the "Supported CMake versions" chapter) |
| 155 | - GNU Make (see the "Supported make versions" chapter) |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 156 | - Python3 and the pip package manager (from Python 3.4 it's included) |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 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 | |
| 159 | .. code-block:: bash |
| 160 | |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [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 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 163 | - SRecord v1.58 (for Musca test chip boards) |
| 164 | |
| 165 | Setup a shell to enable compiler toolchain and CMake after installation. |
| 166 | ------------------------------------------------------------------------ |
| 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 | |
| 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 | |
| 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 | |
| 194 | To import IAR Arm compiler in your bash shell console: |
| 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 | |
Mingyang Sun | 1e59064 | 2019-09-24 10:46:21 +0800 | [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 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [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. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 207 | - Git client latest version (https://git-scm.com/download/win) |
Mingyang Sun | 1e59064 | 2019-09-24 10:46:21 +0800 | [diff] [blame] | 208 | - CMake (`native Windows version <https://cmake.org/download/>`__, |
| 209 | see the `Supported CMake versions`_ chapter) |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 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. |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 215 | - Python3 `(native Windows version) <https://www.python.org/downloads/>`__ and |
| 216 | the pip package manager (from Python 3.4 it's included) |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 217 | - 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] | 218 | |
| 219 | .. code-block:: bash |
| 220 | |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 221 | pip3 install --user cryptography pyasn1 pyyaml jinja2 cbor click imgtool |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 222 | |
Jamie Fox | b8a9270 | 2019-06-05 17:19:31 +0100 | [diff] [blame] | 223 | - `SRecord v1.63 <https://sourceforge.net/projects/srecord/>`__ (for Musca test |
| 224 | chip boards) |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 225 | |
| 226 | Setup Cygwin to enable a compiler toolchain and CMake after installation. |
| 227 | ------------------------------------------------------------------------- |
| 228 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 229 | 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] | 230 | change permanent, add the command line into ~/.bashrc |
| 231 | |
| 232 | Armclang + DS-5 |
| 233 | ^^^^^^^^^^^^^^^ |
| 234 | .. Note:: |
| 235 | |
| 236 | - Arm compiler specific environment variable may need updating based on |
| 237 | specific products and licenses as explained in |
| 238 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 239 | - Arm licensing related environment variables must use Windows paths, and not |
| 240 | the Cygwin specific one relative to */cygrive*. |
| 241 | |
| 242 | .. code-block:: bash |
| 243 | |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 244 | export PATH=/cygdrive/c/<DS-5_PATH>/sw/ARMCompiler6.10/bin:$PATH |
| 245 | export ARM_PRODUCT_PATH=C:/<DS-5_PATH>/sw/mappings |
| 246 | export ARM_TOOL_VARIANT=ult |
| 247 | export ARMLMD_LICENSE_FILE=<LICENSE_FILE_PATH> |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 248 | |
| 249 | Armclang + Keil MDK Arm |
| 250 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 251 | |
| 252 | .. Note:: |
| 253 | |
| 254 | - Arm compiler specific environment variable may need updating based |
| 255 | on specific products and licenses as explained in |
| 256 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 257 | |
| 258 | .. code-block:: bash |
| 259 | |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 260 | export PATH=/cygdrive/c/<uVision path>/ARM/ARMCLANG/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 261 | |
| 262 | GNU Arm |
| 263 | ^^^^^^^ |
| 264 | |
| 265 | If applicable, import GNU Arm compiler v6.3.1 in your shell console. To make |
| 266 | this change permanent, add the command line into ~/.bashrc |
| 267 | |
| 268 | .. code-block:: bash |
| 269 | |
| 270 | export PATH=<GNU Arm path>/bin:$PATH |
| 271 | |
| 272 | CMake |
| 273 | ^^^^^ |
| 274 | |
| 275 | To import CMake in your bash shell console: |
| 276 | |
| 277 | .. code-block:: bash |
| 278 | |
| 279 | export PATH=/cygdrive/c/<CMake path>/bin:$PATH |
| 280 | |
| 281 | Building the documentation |
| 282 | ========================== |
| 283 | |
| 284 | The build system is prepared to support generation of two documents. |
| 285 | The Reference Manual which is Doxygen based, and the User Guide which is |
| 286 | Sphinx based. Both document can be generated in HTML and PDF format. |
| 287 | |
| 288 | .. Note:: |
| 289 | |
| 290 | Support for document generation in the build environment is not mandatory. |
| 291 | Missing document generation tools will not block building the TF-M |
| 292 | firmware. |
| 293 | |
| 294 | To compile the TF-M Reference Manual |
| 295 | ------------------------------------ |
| 296 | |
| 297 | The following additional tools are needed: |
| 298 | |
| 299 | - Doxygen v1.8.0 or later |
| 300 | - Graphviz dot v2.38.0 or later |
| 301 | - PlantUML v1.2018.11 or later |
| 302 | - Java runtime environment 1.8 or later (for running PlantUML) |
| 303 | |
| 304 | For PDF generation the following tools are needed in addition to the |
| 305 | above list: |
| 306 | |
| 307 | - LaTeX |
| 308 | - PdfLaTeX |
| 309 | |
| 310 | Set-up the needed tools |
| 311 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 312 | |
| 313 | Linux |
| 314 | """"" |
| 315 | .. code-block:: bash |
| 316 | |
| 317 | sudo apt-get install -y doxygen graphviz default-jre |
| 318 | mkdir ~/plantuml |
| 319 | curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download --output ~/plantuml/plantuml.jar |
| 320 | |
| 321 | For PDF generation: |
| 322 | |
| 323 | .. code-block:: bash |
| 324 | |
| 325 | sudo apt-get install -y doxygen-latex |
| 326 | |
| 327 | Windows + Cygwin |
| 328 | """""""""""""""" |
| 329 | |
| 330 | Download and install the following tools: |
| 331 | - `Doxygen |
| 332 | 1.8.8 <https://sourceforge.net/projects/doxygen/files/snapshots/doxygen-1.8-svn/windows/doxygenw20140924_1_8_8.zip/download>`__ |
| 333 | - `Graphviz |
| 334 | 2.38 <https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi>`__ |
| 335 | - The Java runtime is part of the DS5 installation or can be |
| 336 | `downloaded from here <https://www.java.com/en/download/>`__ |
| 337 | - `PlantUML <http://sourceforge.net/projects/plantuml/files/plantuml.jar/download>`__ |
| 338 | |
| 339 | For PDF generation: |
| 340 | |
| 341 | - `MikTeX <https://miktex.org/download>`__ |
| 342 | |
| 343 | .. Note:: |
| 344 | When building the documentation the first time, MikTeX might prompt for |
| 345 | installing missing LaTeX components. Please allow the MikTeX package |
| 346 | manager to set-up these. |
| 347 | |
| 348 | Configure the shell |
| 349 | ^^^^^^^^^^^^^^^^^^^ |
| 350 | |
| 351 | Linux |
| 352 | """"" |
| 353 | |
| 354 | :: |
| 355 | |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 356 | export PLANTUML_JAR_PATH=~/plantuml/plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 357 | |
| 358 | Windows + Cygwin |
| 359 | """""""""""""""" |
| 360 | |
| 361 | Assumptions for the settings below: |
| 362 | |
| 363 | - plantuml.jar is available at c:\\plantuml\\plantuml.jar |
| 364 | - doxygen, dot, and MikTeX binaries are available on the PATH. |
| 365 | - Java JVM is used from DS5 installation. |
| 366 | |
| 367 | :: |
| 368 | |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 369 | export PLANTUML_JAR_PATH=c:/plantuml/plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 370 | export PATH=$PATH:/cygdrive/c/<DS-5 path>/sw/java/bin |
| 371 | |
| 372 | To compile the TF-M User Guide |
| 373 | ------------------------------ |
| 374 | |
| 375 | The following additional tools are needed: |
| 376 | |
| 377 | - Python3 and the following modules: |
| 378 | - Sphinx v1.7.9 |
| 379 | - m2r v0.2.0 |
| 380 | - sphinxcontrib-plantuml |
| 381 | - sphinx-rtd-theme |
| 382 | - Graphviz dot v2.38.0 or later |
| 383 | - PlantUML v1.2018.11 or later |
| 384 | - Java runtime environment 1.8 or later (for running PlantUML) |
| 385 | |
| 386 | For PDF generation the following tools are needed in addition to the |
| 387 | above list: |
| 388 | |
| 389 | - LaTeX |
| 390 | - PdfLaTeX |
| 391 | |
| 392 | Set-up the needed tools |
| 393 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 394 | |
| 395 | Linux |
| 396 | """"" |
| 397 | |
| 398 | .. code-block:: bash |
| 399 | |
| 400 | sudo apt-get install -y python3 graphviz default-jre |
| 401 | pip --user install m2r Sphinx sphinx-rtd-theme sphinxcontrib-plantuml |
| 402 | mkdir ~/plantuml |
| 403 | curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download --output ~/plantuml/plantuml.jar |
| 404 | |
| 405 | For PDF generation: |
| 406 | |
| 407 | .. code-block:: bash |
| 408 | |
| 409 | sudo apt-get install -y doxygen-latex |
| 410 | |
| 411 | Windows + Cygwin |
| 412 | """""""""""""""" |
| 413 | Download and install the following tools: |
| 414 | - Python3 `(native Windows version) <https://www.python.org/downloads/>`__ |
| 415 | - Pip packages *m2r, Sphinx, sphinx-rtd-theme sphinxcontrib-plantuml* |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 416 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 417 | .. code-block:: bash |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 418 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 419 | pip --user install m2r Sphinx sphinx-rtd-theme sphinxcontrib-plantuml |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 420 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 421 | - `Graphviz 2.38 <https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi>`__ |
| 422 | - The Java runtime is part of the DS5 installation or can be |
| 423 | `downloaded from here <https://www.java.com/en/download/>`__ |
| 424 | - `PlantUML <http://sourceforge.net/projects/plantuml/files/plantuml.jar/download>`__ |
| 425 | |
| 426 | For PDF generation: |
| 427 | |
| 428 | - `MikTeX <https://miktex.org/download>`__ |
| 429 | |
| 430 | .. Note:: |
| 431 | When building the documentation the first time, MikTeX might |
| 432 | prompt for installing missing LaTeX components. Please allow the MikTeX |
| 433 | package manager to set-up these. |
| 434 | |
| 435 | Configure the shell |
| 436 | ^^^^^^^^^^^^^^^^^^^ |
| 437 | |
| 438 | Linux |
| 439 | """"" |
| 440 | .. code-block:: bash |
| 441 | |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 442 | export PLANTUML_JAR_PATH=~/plantuml/plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 443 | |
| 444 | Windows + Cygwin |
| 445 | """""""""""""""" |
| 446 | |
| 447 | Assumptions for the settings below: |
| 448 | |
| 449 | - plantuml.jar is available at c:\\plantuml\\plantuml.jar |
| 450 | - doxygen, dot, and MikTeX binaries are available on the PATH. |
| 451 | - Java JVM is used from DS5 installation. |
| 452 | |
| 453 | .. code-block:: bash |
| 454 | |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 455 | export PLANTUML_JAR_PATH=c:/plantuml/plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 456 | export PATH=$PATH:/cygdrive/c/<DS-5 path>/sw/java/bin |
| 457 | |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 458 | ************************** |
| 459 | Tool & Dependency overview |
| 460 | ************************** |
| 461 | |
| 462 | To build the TF-M firmware the following tools are needed: |
| 463 | |
| 464 | .. csv-table:: Tool dependencies |
| 465 | :header: "Name", "Version", "Component" |
| 466 | |
| 467 | "C compiler",See `Supported C compilers`_,"Firmware" |
| 468 | "CMake",See `Supported CMake versions`_, |
| 469 | "GNU Make",See `Supported GNU make versions`_, |
Kevin Peng | 6710c82 | 2020-05-21 16:52:14 +0800 | [diff] [blame] | 470 | "tf-m-tests",See `External dependencies`_, |
Minos Galanakis | ac6b06c | 2020-03-19 12:57:02 +0000 | [diff] [blame] | 471 | "mbed-crypto",See `External dependencies`_, |
David Vincze | 91e7ac8 | 2020-06-25 15:30:32 +0200 | [diff] [blame] | 472 | "MCUboot",See `External dependencies`_, |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 473 | "Python",3.x,"Firmware, User Guide" |
| 474 | "yaml",,"Firmware" |
| 475 | "pyasn1",,"Firmware" |
| 476 | "jinja2",,"Firmware" |
| 477 | "cryptography",,"Firmware" |
| 478 | "cbor",,"Firmware" |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 479 | "click",,"Firmware" |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 480 | "imgtool",,"Firmware" |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 481 | "Doxygen",">1.8","Reference manual" |
| 482 | "Sphinx",">1.4","User Guide" |
| 483 | "sphinxcontrib-plantuml",,"User Guide" |
| 484 | "sphinx-trd-theme",,"User Guide" |
| 485 | "Git",, |
| 486 | "PlantUML",">v1.2018.11","Reference Manual, User Guide" |
| 487 | "Graphviz dot",">v2.38.0","Reference manual" |
| 488 | "Java runtime environment (JRE)",">1.8","Reference Manual, User Guide" |
| 489 | "LaTex",,"pdf version of Reference Manual and User Guide" |
| 490 | "PdfLaTex",,"pdf version of Reference Manual and User Guide" |
| 491 | |
| 492 | Dependency chain: |
| 493 | |
| 494 | .. uml:: |
| 495 | |
| 496 | @startuml |
| 497 | skinparam state { |
| 498 | BackgroundColor #92AEE0 |
| 499 | FontColor black |
| 500 | FontSize 16 |
| 501 | AttributeFontColor black |
| 502 | AttributeFontSize 16 |
| 503 | BackgroundColor<<pdf>> #A293E2 |
| 504 | BackgroundColor<<doc>> #90DED6 |
| 505 | } |
| 506 | state fw as "Firmware" : TF-M binary |
| 507 | state c_comp as "C Compiler" : C99 |
| 508 | state gmake as "GNU make" |
| 509 | state u_guide as "User Guide" <<doc>> |
| 510 | state refman as "Reference Manual" <<doc>> |
| 511 | state rtd_theme as "sphinx-rtd-theme" <<doc>> |
| 512 | state sphnix_puml as "sphinxcontrib-plantuml" <<doc>> |
| 513 | state JRE as "JRE" <<doc>> : Java Runtime Environment |
| 514 | state gwiz as "Graphwiz dot" <<doc>> |
| 515 | state Sphinx as "Sphinx" <<doc>> |
| 516 | state m2r as "m2r" <<doc>> |
| 517 | state PlantUML as "PlantUML" <<doc>> |
| 518 | state LaTex as "LaTex" <<pdf>> |
| 519 | state PdfLaTex as "PdfLaTex" <<<<pdf>>>> |
| 520 | state Doxygen as "Doxygen" <<doc>> |
| 521 | |
| 522 | [*] --> fw |
| 523 | fw --> c_comp |
| 524 | fw --> CMake |
| 525 | CMake --> gmake |
| 526 | fw --> cryptography |
| 527 | fw --> pyasn1 |
| 528 | fw --> yaml |
| 529 | fw --> jinja2 |
| 530 | fw --> cbor |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 531 | fw --> click |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 532 | fw --> imgtool |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 533 | cryptography --> Python3 |
| 534 | pyasn1 --> Python3 |
| 535 | yaml --> Python3 |
| 536 | jinja2 --> Python3 |
| 537 | cbor --> Python3 |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 538 | click --> Python3 |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 539 | imgtool --> Python3 |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 540 | |
| 541 | [*] --> u_guide |
| 542 | u_guide --> Sphinx |
| 543 | Sphinx --> m2r |
| 544 | Sphinx --> rtd_theme |
| 545 | Sphinx --> sphnix_puml |
| 546 | m2r --> Python3 |
| 547 | rtd_theme --> Python3 |
| 548 | sphnix_puml --> Python3 |
| 549 | Sphinx --> PlantUML |
| 550 | PlantUML --> JRE |
| 551 | PlantUML --> gwiz |
| 552 | Sphinx --> LaTex |
| 553 | LaTex --> PdfLaTex |
| 554 | |
| 555 | [*] --> refman |
| 556 | refman --> Doxygen |
| 557 | Doxygen --> PlantUML |
| 558 | Doxygen --> LaTex |
| 559 | state Legend { |
| 560 | state x as "For PDF generation only" <<pdf>> |
| 561 | state y as "For document generation only" <<doc>> |
| 562 | state z as "Mandatory" |
| 563 | } |
| 564 | |
| 565 | @enduml |
| 566 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 567 | -------------- |
| 568 | |
Ronald Cron | c0c38fa | 2019-09-23 09:36:56 +0200 | [diff] [blame] | 569 | *Copyright (c) 2017-2020, Arm Limited. All rights reserved.* |