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 | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 29 | - Windows 10 x64 |
Mingyang Sun | 1e59064 | 2019-09-24 10:46:21 +0800 | [diff] [blame] | 30 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 31 | *********** |
| 32 | C compilers |
| 33 | *********** |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 34 | |
| 35 | To compile TF-M code, at least one of the supported compiler toolchains have to |
| 36 | be available in the build environment. The currently supported compiler |
| 37 | versions are: |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 38 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 39 | - Arm Compiler v6.10.1+, v6.11, v6.12, v6.13 |
| 40 | - GNU Arm compiler v6.3.1, v7.3 |
| 41 | - IAR Arm compiler v8.42.x, v8.50.x |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 42 | |
| 43 | .. Note:: |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 44 | - The Arm compilers above are provided via Keil uVision |KEIL_VERSION| |
| 45 | or greater, DS-5 |DS5_VERSION| or greater, and Development Studio |
| 46 | |DEV_STUDIO_VERSION| or greater, or they can be downloaded as standalone |
| 47 | packages from |
| 48 | `here <https://developer.arm.com/products/software-development-tools/compilers/arm-compiler/downloads/version-6>`__. |
| 49 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 50 | - The GNU Arm compiler can be downloaded from |
| 51 | `here <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads>`__. |
| 52 | On the page select *GNU Arm Embedded Toolchain: 6-2017-q1-update* |
| 53 | or *GNU Arm Embedded Toolchain: 7-2018-q2-update* |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 54 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 55 | - The IAR Arm compilers above are provided via IAR Embedded Workbench (Windows) or |
| 56 | IAR build tools for linux. |
| 57 | For information, see |
| 58 | `here <https://www.iar.com/iar-embedded-workbench/#!?architecture=Arm>`__ or |
| 59 | `here <https://www.iar.com/iar-embedded-workbench/build-tools-for-linux/>`__. |
| 60 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 61 | ***** |
| 62 | CMake |
| 63 | ***** |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 64 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 65 | The build-system is CMake based and supports the versions 3.13 or higher. |
| 66 | Please check `Exceptions and special cases`_ section if you need a higher |
| 67 | version of CMake. |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 68 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 69 | - Please use the latest build version available. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 70 | - Recent versions of CMake can be downloaded from |
| 71 | https://cmake.org/download/, and older releases are available from |
| 72 | https://cmake.org/files. |
| 73 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 74 | CMake handles all external dependencies, but if you wish to alter this |
Anton Komlev | b8e3af0 | 2020-08-28 10:23:57 +0100 | [diff] [blame] | 75 | behaviour, see :ref:`docs/getting_started/tfm_build_instruction:Manual |
| 76 | dependency management` |
Minos Galanakis | ac6b06c | 2020-03-19 12:57:02 +0000 | [diff] [blame] | 77 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 78 | ******** |
| 79 | GNU make |
| 80 | ******** |
| 81 | |
| 82 | TF-M project builds using the "Unix Makefiles" generator of CMake |
| 83 | and thus GNU make is needed for the build. |
| 84 | |
| 85 | - On Linux please use the version available in your distribution. |
| 86 | - On Windows, GNU make v3.81 or higher shall work fine. |
| 87 | |
| 88 | CMake generators other than "Unix Makefiles" may work too, but are not |
| 89 | officially supported. You may have a good luck with Ninja. |
| 90 | |
Ludovic Barre | 8a77bdd | 2020-03-26 19:53:07 +0100 | [diff] [blame] | 91 | ******************************************** |
| 92 | Tools for configuring and programming boards |
| 93 | ******************************************** |
| 94 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 95 | Please follow a board secific documentation for building and programming |
| 96 | tools. |
Ludovic Barre | 8a77bdd | 2020-03-26 19:53:07 +0100 | [diff] [blame] | 97 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 98 | ************** |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 99 | Typical setups |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 100 | ************** |
| 101 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 102 | This section lists steps to set-up TF-M build environment under Linux and Windows. |
| 103 | Please also check the `Exceptions and special cases`_ chapter for any special |
| 104 | requirements depending on the tools you are using. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 105 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 106 | Ubuntu |
| 107 | ====== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 108 | |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 109 | Install the following tools: |
| 110 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 111 | - DS-5 |DS5_VERSION|. |
| 112 | - Git tools v2.10.0 |
| 113 | - CMake (see the `CMake`_ chapter) |
| 114 | - GNU Make (see the `GNU make`_ chapter) |
| 115 | - SRecord v1.58 (for Musca test chip boards) |
| 116 | - Python3 and the pip package manager (from Python 3.4 it's included) |
| 117 | - The necessary Python3 packages are listed in the requirements.txt file. |
| 118 | To install all needed just do: |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 119 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 120 | .. code-block:: bash |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 121 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 122 | pip install -r tools/requirements.txt |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 123 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 124 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 125 | Setup environment variables in Linux |
| 126 | ------------------------------------ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 127 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 128 | To import Arm Compiler v6.10 in your bash shell console: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 129 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 130 | .. code-block:: bash |
| 131 | |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 132 | export PATH=<DS-5_PATH>/sw/ARMCompiler6.10/bin:$PATH |
Vikas Katariya | 1c361cd | 2019-08-23 15:05:02 +0100 | [diff] [blame] | 133 | export ARM_TOOL_VARIANT=ult |
| 134 | export ARM_PRODUCT_PATH=<DS-5_PATH>/sw/mappings |
| 135 | export ARMLMD_LICENSE_FILE=<LICENSE_FILE_PATH> |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 136 | |
| 137 | To import CMake in your bash shell console: |
| 138 | |
| 139 | .. code-block:: bash |
| 140 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 141 | export PATH=<CMake path>/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 142 | |
| 143 | To import GNU Arm in your bash shell console: |
| 144 | |
| 145 | .. code-block:: bash |
| 146 | |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 147 | export PATH=<bash path>/bin:$PATH |
| 148 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 149 | To import IAR Arm compiler in your bash shell console: |
TTornblom | 8a8b452 | 2020-06-10 11:13:32 +0200 | [diff] [blame] | 150 | |
| 151 | .. code-block:: bash |
| 152 | |
| 153 | export PATH=<IAR compiler path>/bin:$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 154 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 155 | Windows |
| 156 | ======= |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 157 | |
David Vincze | 4a6555e | 2019-11-06 09:32:13 +0100 | [diff] [blame] | 158 | Install the following tools: |
| 159 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 160 | - uVision |KEIL_VERSION| or DS-5 |DS5_VERSION| (DS-5 Ultimate Edition) |
| 161 | or GNU Arm compiler v6.3.1. |
| 162 | - Git client latest version (https://git-scm.com/download/win) |
| 163 | - CMake (`native Windows version <https://cmake.org/download/>`__, |
| 164 | see the `CMake`_ chapter) |
| 165 | - GNU make |
| 166 | - `SRecord v1.63 <https://sourceforge.net/projects/srecord/>`__ (for Musca test |
| 167 | chip boards) |
| 168 | - Python3 `(native Windows version) <https://www.python.org/downloads/>`__ and |
| 169 | the pip package manager (from Python 3.4 it's included) |
| 170 | - The necessary Python3 packages are listed in the requirements.txt file. |
| 171 | To install all needed just do: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 172 | |
| 173 | .. code-block:: bash |
| 174 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 175 | pip install -r tools\requirements.txt |
| 176 | |
| 177 | Setup environment variables in Windows |
| 178 | -------------------------------------- |
| 179 | |
| 180 | Add CMake to your PATH variable: |
| 181 | |
| 182 | .. code-block:: bash |
| 183 | |
| 184 | set PATH=<CMake_Path>\bin;$PATH |
| 185 | |
| 186 | There are several configurations depending on a toolset you are using. |
| 187 | The typical cases are listed below. |
| 188 | |
| 189 | Armclang + DS-5 |
| 190 | ^^^^^^^^^^^^^^^ |
| 191 | .. code-block:: bash |
| 192 | |
| 193 | set PATH=<DS-5_PATH>\sw\ARMCompiler6.10\bin;$PATH |
| 194 | set ARM_PRODUCT_PATH=<DS-5_PATH>\sw\mappings |
| 195 | set ARM_TOOL_VARIANT=ult |
| 196 | set ARMLMD_LICENSE_FILE=<LICENSE_FILE_PATH> |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 197 | |
| 198 | Armclang + Keil MDK Arm |
| 199 | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 200 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 201 | .. code-block:: bash |
| 202 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 203 | set PATH=<uVision path>\ARM\ARMCLANG\bin;$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 204 | |
| 205 | GNU Arm |
| 206 | ^^^^^^^ |
| 207 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 208 | .. code-block:: bash |
| 209 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 210 | set PATH=<GNU Arm path>\bin;$PATH |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 211 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 212 | ************************** |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 213 | Building the documentation |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 214 | ************************** |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 215 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 216 | The build system is prepared to support generation of two documents: |
| 217 | The Reference Manual and the User Guide. |
| 218 | The Reference Manual is Doxygen based, while the User Guide is |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 219 | Sphinx based. Both document can be generated in HTML and PDF format. |
| 220 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 221 | Support for document generation in the build environment is not mandatory. |
| 222 | Missing document generation tools will not block building the TF-M firmware. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 223 | |
| 224 | To compile the TF-M Reference Manual |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 225 | ==================================== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 226 | |
| 227 | The following additional tools are needed: |
| 228 | |
| 229 | - Doxygen v1.8.0 or later |
| 230 | - Graphviz dot v2.38.0 or later |
| 231 | - PlantUML v1.2018.11 or later |
| 232 | - Java runtime environment 1.8 or later (for running PlantUML) |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 233 | - LaTeX - for PDF generation only |
| 234 | - PdfLaTeX - for PDF generation only |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 235 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 236 | Set-up the needed tools and environment in Linux |
| 237 | ------------------------------------------------ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 238 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 239 | .. code-block:: bash |
| 240 | |
| 241 | sudo apt-get install -y doxygen graphviz default-jre |
| 242 | mkdir ~/plantuml |
| 243 | curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download --output ~/plantuml/plantuml.jar |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 244 | export PLANTUML_JAR_PATH=~/plantuml/plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 245 | |
| 246 | For PDF generation: |
| 247 | |
| 248 | .. code-block:: bash |
| 249 | |
| 250 | sudo apt-get install -y doxygen-latex |
| 251 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 252 | Set-up the needed tools and environment in Windows |
| 253 | -------------------------------------------------- |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 254 | |
| 255 | Download and install the following tools: |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 256 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 257 | - `Doxygen |
| 258 | 1.8.8 <https://sourceforge.net/projects/doxygen/files/snapshots/doxygen-1.8-svn/windows/doxygenw20140924_1_8_8.zip/download>`__ |
| 259 | - `Graphviz |
| 260 | 2.38 <https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi>`__ |
| 261 | - The Java runtime is part of the DS5 installation or can be |
| 262 | `downloaded from here <https://www.java.com/en/download/>`__ |
| 263 | - `PlantUML <http://sourceforge.net/projects/plantuml/files/plantuml.jar/download>`__ |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 264 | - `MikTeX <https://miktex.org/download>`__ - for PDF generation only |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 265 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 266 | Set the environment variables, assuming that: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 267 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 268 | - doxygen, dot, and MikTeX binaries are available on the PATH. |
| 269 | - Java JVM is used from DS5 installation. |
| 270 | |
| 271 | :: |
| 272 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 273 | set PLANTUML_JAR_PATH=<plantuml_Path>\plantuml.jar |
| 274 | set PATH=$PATH;<DS-5_Path>\sw\java\bin |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 275 | |
| 276 | To compile the TF-M User Guide |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 277 | ============================== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 278 | |
| 279 | The following additional tools are needed: |
| 280 | |
| 281 | - Python3 and the following modules: |
| 282 | - Sphinx v1.7.9 |
| 283 | - m2r v0.2.0 |
| 284 | - sphinxcontrib-plantuml |
| 285 | - sphinx-rtd-theme |
| 286 | - Graphviz dot v2.38.0 or later |
| 287 | - PlantUML v1.2018.11 or later |
| 288 | - Java runtime environment 1.8 or later (for running PlantUML) |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 289 | - LaTeX - for PDF generation only |
| 290 | - PdfLaTeX - for PDF generation only |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 291 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 292 | Set-up the tools and environment in Linux |
| 293 | ----------------------------------------- |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 294 | |
| 295 | .. code-block:: bash |
| 296 | |
| 297 | sudo apt-get install -y python3 graphviz default-jre |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 298 | pip install -r tools/requirements.txt |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 299 | mkdir ~/plantuml |
| 300 | curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download --output ~/plantuml/plantuml.jar |
| 301 | |
| 302 | For PDF generation: |
| 303 | |
| 304 | .. code-block:: bash |
| 305 | |
| 306 | sudo apt-get install -y doxygen-latex |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 307 | export PLANTUML_JAR_PATH=~/plantuml/plantuml.jar |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 308 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 309 | Set-up the tools and environment in Windows |
| 310 | ------------------------------------------- |
| 311 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 312 | Download and install the following tools: |
Antonio de Angelis | 065ce4a | 2019-06-04 14:02:33 +0100 | [diff] [blame] | 313 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 314 | - `Graphviz 2.38 <https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi>`__ |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 315 | - The Java runtime is part of the DS5 installation or can be `downloaded from here <https://www.java.com/en/download/>`__ |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 316 | - `PlantUML <http://sourceforge.net/projects/plantuml/files/plantuml.jar/download>`__ |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 317 | - `MikTeX <https://miktex.org/download>`__ - for PDF generation only |
| 318 | - Python3 `(native Windows version) <https://www.python.org/downloads/>`__ |
| 319 | - The necessary Python3 packages are listed in the requirements.txt file. |
| 320 | To install all needed packages just do: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 321 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 322 | .. code-block:: bash |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 323 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 324 | pip install -r tools\requirements.txt |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 325 | |
| 326 | .. Note:: |
| 327 | When building the documentation the first time, MikTeX might |
| 328 | prompt for installing missing LaTeX components. Please allow the MikTeX |
| 329 | package manager to set-up these. |
| 330 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 331 | Set the environment variables, assuming that: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 332 | |
| 333 | - plantuml.jar is available at c:\\plantuml\\plantuml.jar |
| 334 | - doxygen, dot, and MikTeX binaries are available on the PATH. |
| 335 | - Java JVM is used from DS5 installation. |
| 336 | |
| 337 | .. code-block:: bash |
| 338 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 339 | set PLANTUML_JAR_PATH=<plantuml_Path>\plantuml.jar |
| 340 | set PATH=$PATH;<DS-5_Path>\sw\java\bin |
| 341 | |
| 342 | **************************** |
| 343 | Exceptions and special cases |
| 344 | **************************** |
| 345 | |
| 346 | ArmClang |
| 347 | ======== |
| 348 | - Arm compiler specific environment variable may need updating based on |
| 349 | specific products and licenses as explained in |
| 350 | `product-and-toolkit-configuration <https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration>`__. |
| 351 | |
| 352 | - ARMClang requires CMake version 3.15 or higher |
| 353 | |
| 354 | IAR toolchain |
| 355 | ============= |
| 356 | - IAR requires CMake version 3.14 or higher. |
| 357 | |
| 358 | MikTeX |
| 359 | ====== |
| 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. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 363 | |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 364 | ************************** |
| 365 | Tool & Dependency overview |
| 366 | ************************** |
| 367 | |
| 368 | To build the TF-M firmware the following tools are needed: |
| 369 | |
| 370 | .. csv-table:: Tool dependencies |
| 371 | :header: "Name", "Version", "Component" |
| 372 | |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 373 | "C compiler",See `C compilers`_,"Firmware" |
| 374 | "CMake",See `CMake`_, |
| 375 | "GNU Make",See `GNU make`_, |
| 376 | "tf-m-tests",`CMake`_ handles it, |
| 377 | "mbed-crypto",`CMake`_ handles it, |
| 378 | "MCUboot",`CMake`_ handles it, |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 379 | "Python",3.x,"Firmware, User Guide" |
| 380 | "yaml",,"Firmware" |
| 381 | "pyasn1",,"Firmware" |
| 382 | "jinja2",,"Firmware" |
| 383 | "cryptography",,"Firmware" |
| 384 | "cbor",,"Firmware" |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 385 | "click",,"Firmware" |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 386 | "imgtool",,"Firmware" |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 387 | "Doxygen",">1.8","Reference manual" |
| 388 | "Sphinx",">1.4","User Guide" |
| 389 | "sphinxcontrib-plantuml",,"User Guide" |
| 390 | "sphinx-trd-theme",,"User Guide" |
| 391 | "Git",, |
| 392 | "PlantUML",">v1.2018.11","Reference Manual, User Guide" |
| 393 | "Graphviz dot",">v2.38.0","Reference manual" |
| 394 | "Java runtime environment (JRE)",">1.8","Reference Manual, User Guide" |
| 395 | "LaTex",,"pdf version of Reference Manual and User Guide" |
| 396 | "PdfLaTex",,"pdf version of Reference Manual and User Guide" |
| 397 | |
| 398 | Dependency chain: |
| 399 | |
| 400 | .. uml:: |
| 401 | |
| 402 | @startuml |
| 403 | skinparam state { |
| 404 | BackgroundColor #92AEE0 |
| 405 | FontColor black |
| 406 | FontSize 16 |
| 407 | AttributeFontColor black |
| 408 | AttributeFontSize 16 |
| 409 | BackgroundColor<<pdf>> #A293E2 |
| 410 | BackgroundColor<<doc>> #90DED6 |
| 411 | } |
| 412 | state fw as "Firmware" : TF-M binary |
| 413 | state c_comp as "C Compiler" : C99 |
| 414 | state gmake as "GNU make" |
| 415 | state u_guide as "User Guide" <<doc>> |
| 416 | state refman as "Reference Manual" <<doc>> |
| 417 | state rtd_theme as "sphinx-rtd-theme" <<doc>> |
| 418 | state sphnix_puml as "sphinxcontrib-plantuml" <<doc>> |
| 419 | state JRE as "JRE" <<doc>> : Java Runtime Environment |
| 420 | state gwiz as "Graphwiz dot" <<doc>> |
| 421 | state Sphinx as "Sphinx" <<doc>> |
| 422 | state m2r as "m2r" <<doc>> |
| 423 | state PlantUML as "PlantUML" <<doc>> |
| 424 | state LaTex as "LaTex" <<pdf>> |
| 425 | state PdfLaTex as "PdfLaTex" <<<<pdf>>>> |
| 426 | state Doxygen as "Doxygen" <<doc>> |
| 427 | |
| 428 | [*] --> fw |
| 429 | fw --> c_comp |
| 430 | fw --> CMake |
| 431 | CMake --> gmake |
| 432 | fw --> cryptography |
| 433 | fw --> pyasn1 |
| 434 | fw --> yaml |
| 435 | fw --> jinja2 |
| 436 | fw --> cbor |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 437 | fw --> click |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 438 | fw --> imgtool |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 439 | cryptography --> Python3 |
| 440 | pyasn1 --> Python3 |
| 441 | yaml --> Python3 |
| 442 | jinja2 --> Python3 |
| 443 | cbor --> Python3 |
Balint Matyi | 3bae883 | 2020-06-22 15:34:12 +0200 | [diff] [blame] | 444 | click --> Python3 |
Balint Matyi | d9abb49 | 2020-06-22 08:35:52 +0100 | [diff] [blame] | 445 | imgtool --> Python3 |
Galanakis, Minos | 757139a | 2019-11-11 15:00:11 +0000 | [diff] [blame] | 446 | |
| 447 | [*] --> u_guide |
| 448 | u_guide --> Sphinx |
| 449 | Sphinx --> m2r |
| 450 | Sphinx --> rtd_theme |
| 451 | Sphinx --> sphnix_puml |
| 452 | m2r --> Python3 |
| 453 | rtd_theme --> Python3 |
| 454 | sphnix_puml --> Python3 |
| 455 | Sphinx --> PlantUML |
| 456 | PlantUML --> JRE |
| 457 | PlantUML --> gwiz |
| 458 | Sphinx --> LaTex |
| 459 | LaTex --> PdfLaTex |
| 460 | |
| 461 | [*] --> refman |
| 462 | refman --> Doxygen |
| 463 | Doxygen --> PlantUML |
| 464 | Doxygen --> LaTex |
| 465 | state Legend { |
| 466 | state x as "For PDF generation only" <<pdf>> |
| 467 | state y as "For document generation only" <<doc>> |
| 468 | state z as "Mandatory" |
| 469 | } |
| 470 | |
| 471 | @enduml |
| 472 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 473 | -------------- |
| 474 | |
Ronald Cron | c0c38fa | 2019-09-23 09:36:56 +0200 | [diff] [blame] | 475 | *Copyright (c) 2017-2020, Arm Limited. All rights reserved.* |
Anton Komlev | b759e67 | 2020-11-02 12:15:44 +0000 | [diff] [blame^] | 476 | |