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