@@ -16,6 +16,10 @@ with Isolation Level 1 and 2.
16
16
17
17
Only GNU toolchain is supported.
18
18
19
+ .. note ::
20
+
21
+ Only "profile_medium" predefined profile is supported.
22
+
19
23
Building TF-M
20
24
-------------
21
25
@@ -29,9 +33,9 @@ Build instructions with platform name: rpi/rp2350
29
33
.. note ::
30
34
31
35
This platform port relies on
32
- `Raspberry Pi Pico SDK <https://github.com/raspberrypi/pico-sdk >`__
36
+ `Raspberry Pi Pico SDK <https://github.com/raspberrypi/pico-sdk >`__.
33
37
Make sure it is either cloned locally or available to download during build.
34
- SDK version used for testing: SDK 2.0.0 release
38
+ SDK version used for testing: SDK 2.0.0 release.
35
39
36
40
.. note ::
37
41
@@ -45,7 +49,7 @@ Build instructions with platform name: rpi/rp2350
45
49
46
50
If ``-DPLATFORM_DEFAULT_PROVISIONING=OFF `` and
47
51
``-DTFM_DUMMY_PROVISIONING=ON `` then the keys in the
48
- ``tf-m /platform/ext/common/provisioning_bundle/provisioning_config.cmake ``
52
+ ``<TF-M source dir> /platform/ext/common/provisioning_bundle/provisioning_config.cmake ``
49
53
and the default MCUBoot signing keys will be used for provisioning.
50
54
51
55
If ``-DPLATFORM_DEFAULT_PROVISIONING=OFF `` and
@@ -54,7 +58,7 @@ Build instructions with platform name: rpi/rp2350
54
58
the build command, or by setting the ``-DPROVISIONING_KEYS_CONFIG `` flag to a
55
59
.cmake file that contains the keys. An example config cmake file can be seen
56
60
at
57
- ``tf-m /platform/ext/common/provisioning_bundle/provisioning_config.cmake ``.
61
+ ``<TF-M source dir> /platform/ext/common/provisioning_bundle/provisioning_config.cmake ``.
58
62
Otherwise new random values are going to be generated and used. For the image
59
63
signing the ${MCUBOOT_KEY_S} and ${MCUBOOT_KEY_NS} will be used. These
60
64
variables should point to .pem files that contain the code signing private
@@ -69,68 +73,79 @@ Build instructions with platform name: rpi/rp2350
69
73
The new generated keypair can be found in the ``<build dir>/bin `` folder or
70
74
in the ``<install directory>/image_signing/keys `` after installation.
71
75
The generated provisioning_data.c file can be found at
72
- ``<build directory >/platform/target/provisioning/provisioning_data.c ``
76
+ ``<build dir >/platform/target/provisioning/provisioning_data.c ``
73
77
74
78
.. note ::
75
79
76
- The provisioning bundle generation depends on pyelftools that's have to be
77
- installed::
80
+ The provisioning bundle generation depends on pyelftools that needs to be
81
+ installed via ::
78
82
79
83
pip3 install pyelftools
80
84
81
- Example build instructions for regression tests with dummy keys:
82
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
+ Example of build instructions for regression tests with dummy keys:
86
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83
87
Building Secure side with provisioning bundle:
84
88
85
89
.. note ::
86
90
87
- Add -DTFM_MULTI_CORE_TOPOLOGY=ON to the above for multicore support
91
+ Add optionally:
88
92
93
+ - -DTFM_MULTI_CORE_TOPOLOGY=ON for multicore support
94
+ - -DPICO_SDK_PATH=<abs-path-to-pico-sdk> for a pre-fetched Pico SDK
89
95
90
96
.. code-block :: bash
91
97
92
- cmake -S < TF-M tests source dir> /tests_reg/spe \
93
- -B < TF-M tests source dir> /tests_reg/spe/build_rpi_myns_single \
98
+ cmake -S < TF-M- tests source dir> /tests_reg/spe \
99
+ -B < TF-M- tests source dir> /tests_reg/spe/build_rpi_single \
94
100
-DTFM_PLATFORM=rpi/rp2350 \
95
101
-DTFM_TOOLCHAIN_FILE=< TF-M source dir> /toolchain_GNUARM.cmake \
96
102
-DCONFIG_TFM_SOURCE_PATH=< TF-M source dir> \
97
- -DTFM_PROFILE=profile_medium -DPLATFORM_DEFAULT_PROVISIONING=OFF \
98
- -DTEST_S=ON -DTEST_NS=ON
103
+ -DTFM_PROFILE=profile_medium \
104
+ -DPLATFORM_DEFAULT_PROVISIONING=OFF \
105
+ -DTEST_S=ON \
106
+ -DTEST_NS=ON
99
107
100
108
.. code-block :: bash
101
109
102
- cmake --build < TF-M tests source dir> /tests_reg/spe/build_rpi_myns_single \
110
+ cmake --build < TF-M- tests source dir> /tests_reg/spe/build_rpi_single \
103
111
-- -j8 install
104
112
105
113
106
114
Building Non-Secure side:
107
115
108
116
.. code-block :: bash
109
117
110
- cmake -S < TF-M tests source dir> /tests_reg \
111
- -B < TF-M tests source dir> /tests_reg/build_rpi_myns_single \
112
- -DCONFIG_SPE_PATH=< TF-M tests source dir> /tests_reg/spe/build_rpi_myns_single/api_ns \
113
- -DTFM_TOOLCHAIN_FILE=< TF-M tests source dir> /tests_reg/spe/build_rpi_myns_single/api_ns/cmake/toolchain_ns_GNUARM.cmake
114
- cmake --build < TF-M tests source dir> /tests_reg/build_rpi_myns_single -- -j8
118
+ cmake -S < TF-M-tests source dir> /tests_reg \
119
+ -B < TF-M-tests source dir> /tests_reg/build_rpi_single \
120
+ -DCONFIG_SPE_PATH=< TF-M tests source dir> /tests_reg/spe/build_rpi_single/api_ns \
121
+ -DTFM_TOOLCHAIN_FILE=< TF-M-tests source dir> /tests_reg/spe/build_rpi_single/api_ns/cmake/toolchain_ns_GNUARM.cmake
122
+
123
+ .. code-block :: bash
124
+
125
+ cmake --build < TF-M-tests source dir> /tests_reg/build_rpi_single -- -j8
115
126
116
- Binaries need to be converted with a small script pico_uf2.sh
117
- It uses uf2conv.py from here:
118
- https://github.com/microsoft/uf2/blob/master/utils/uf2conv.py
127
+ Binaries need to be converted with a small script pico_uf2.sh.
128
+ It requires uf2conv.py from here:
129
+ https://github.com/microsoft/uf2/blob/master/utils/uf2conv.py.
119
130
It depends on:
120
- https://github.com/microsoft/uf2/blob/master/utils/uf2families.json
131
+ https://github.com/microsoft/uf2/blob/master/utils/uf2families.json.
132
+ Both the above files need to be copied into the same place where pico_uf2.sh
133
+ runs.
134
+ Also, you may need to give executable permissions to both pico_uf2.sh and
135
+ uf2conv.py.
121
136
The tool takes the combined and signed S and NS images in .bin format, and
122
- outputs .uf2. It also generates the .uf2 for the bootloader (bl2.uf2) and the
123
- provisioning bundle.
137
+ generates the corresponding .uf2 file . It also generates the .uf2 for the
138
+ bootloader (bl2.uf2) and the provisioning bundle one .
124
139
125
140
.. code-block :: bash
126
141
127
- pico_uf2.sh < TF-M tests source dir> build_rpi_myns_single
142
+ pico_uf2.sh < TF-M- tests source dir> build_rpi_single
128
143
129
- Then just copy the bl2.uf and tfm_s_ns_signed.bin. uf2 files to the board. It
130
- will run the BL2, S and NS tests and print the results to the UART (Baudrate
131
- 115200).
144
+ Then just copy (drag-and-drop) the bl2.uf2 and tfm_s_ns_signed.uf2 files into
145
+ the board, one at time. It will run the BL2, S and NS tests and print the
146
+ results to the UART (Baudrate 115200).
132
147
If the board needs provisioning, the .uf2 file containing the provisioning
133
- bundle needs to be copied before tfm_s_ns_signed.bin. uf2. It only needs to be
148
+ bundle needs to be copied before tfm_s_ns_signed.uf2. It only needs to be
134
149
done once.
135
150
136
151
.. note ::
0 commit comments