Skip to content

Commit d0b6912

Browse files
author
Donatien Garnier
authored
Merge pull request #1423 from LDong-Arm/tfm_mbed_cli_2
Update the PSA porting guide:
2 parents 0fa61cb + 47586e1 commit d0b6912

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

docs/porting/security/psa_targets_in_mbed-os.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ An Mbed OS (NSPE) target that supports TF-M must contain the following attribute
191191
* `function`: The target's post binary hook ([class].[method]) in `tools/targets/__init__.py` for image signing, required if the TF-M bootloader support is supported.
192192
* `secure_image_filename`: The file name of the TF-M secure binary, to be signed by the post binary hook.
193193

194-
**Note**: When `inherits` is used, some of attributes are set by the PSA generic target.
194+
<span class="notes">**Note:** When `inherits` is used, some of attributes are set by the PSA generic target.
195195

196196
The following example shows a PSA-enabled Armv8-M PSA target, `ARM_MUSCA_S1`:
197197

@@ -283,6 +283,9 @@ The [mbed-os-tf-m-regression-tests repository](https://github.com/ARMmbed/mbed-o
283283
To build TF-M and create an Mbed OS pull request:
284284

285285
1. Switch to the `mbed-os-tf-m-regression-tests` directory.
286+
287+
1. Add your target to `tfm_ns_import.yaml`. You can take the existing target `ARM_MUSCA_S1` as an example and adjust the target name.
288+
286289
1. Run:
287290

288291
```
@@ -295,8 +298,18 @@ To build TF-M and create an Mbed OS pull request:
295298
296299
1. Switch to the `mbed-os` directory and check the latest commit.
297300
298-
If everything looks good, push the changes to your fork of Mbed OS.
299-
1. Create an Mbed OS pull request against [https://github.com/ARMmbed/mbed-os](https://github.com/ARMmbed/mbed-os).
301+
1. In the directory of your target, create or update `CMakeLists.txt` to define how CMake builds your target. Make sure it links `s_veneers.o` to your target and calls `mbed_post_build_tfm_sign_image()` which generates a ready-to-flash image containing the bootloader + signed TF-M secure binary + signed Mbed OS application.
302+
303+
You can take a look at `targets/TARGET_ARM_SSG/TARGET_MUSCA_S1/CMakeLists.txt` as an example.
304+
305+
1. Switch back to the `mbed-os-tf-m-regression-tests` directory, and follow `README.md` to build and run all tests _manually_.
306+
307+
Ensure the test results are consistent with what you get from the vanilla TF-M tests (i.e. without Mbed OS integration). Some tests may be expected to fail.
308+
309+
Once you have the expected results, you can add them to `test/logs/<new target>/` to enable _automated_ testing. The logs should be minimal and based on regular expressions, see `test/logs/ARM_MUSCA_S1/` for example.
310+
311+
312+
1. If everything looks good, push the changes to your forks of [Mbed OS](https://github.com/ARMmbed/mbed-os) and [mbed-os-tf-m-regression-tests](https://github.com/ARMmbed/mbed-os-tf-m-regression-tests) and create pull requests against our official repositories.
300313
301314
<span class="tips">**Tip:** See the [contributing guide](../contributing/index.html) for more information about pull requests.</span>
302315

0 commit comments

Comments
 (0)