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