|
| 1 | +# PSA tools |
| 2 | + |
| 3 | +This document describes the following scripts: |
| 4 | + |
| 5 | +* \_\_init\_\_.py |
| 6 | +* generate_partition_code.py |
| 7 | +* mbed_spm_tfm_common.py |
| 8 | +* generate_mbed_spm_partition_code.py |
| 9 | +* generate_tfm_partition_code.py |
| 10 | +* release.py |
| 11 | + |
| 12 | +## \_\_init\_\_.py |
| 13 | + |
| 14 | +This file holds common functions dedicated to help SiP with their postbuild logic. |
| 15 | + |
| 16 | +* find_secure_image - Scans a Resource object to find the correct binary of the secure image to merge with the nonsecure build. |
| 17 | + |
| 18 | +## Code generation scripts |
| 19 | + |
| 20 | +Mbed OS holds two implementations of PSA: |
| 21 | + |
| 22 | +* MBED_SPM - Implementation for dual-core v7 targets. |
| 23 | +* TF-M - Implementation for v8 targets. |
| 24 | + |
| 25 | +Each implementation requires a set of autogenerated files describing the secure partitions: |
| 26 | + |
| 27 | +* `generate_partition_code.py` - Generate files for both implementations. |
| 28 | +* `generate_mbed_spm_partition_code.py` - Generate files for MBED_SPM. |
| 29 | +* `generate_tfm_partition_code.py` - Generate files for TF-M. |
| 30 | +* `mbed_spm_tfm_common.py` - Holds common functions for both. |
| 31 | + |
| 32 | +## Secure image generation |
| 33 | + |
| 34 | +`release.py` is the script assigned with compiling the secure images: |
| 35 | + |
| 36 | +``` |
| 37 | +usage: release.py [-h] [-m MCU] |
| 38 | +
|
| 39 | +optional arguments: |
| 40 | + -h, --help show this help message and exit |
| 41 | + -m MCU, --mcu MCU build for the given MCU |
| 42 | +``` |
| 43 | + |
| 44 | +When `MCU ` is not specified, the script compiles all the images for all the targets. |
| 45 | + |
| 46 | +This script should be run in following scenarios: |
| 47 | + |
| 48 | +* Release. |
| 49 | +* Update to files originating in the secure side. |
| 50 | +* Drivers update. |
| 51 | +* PSA updates. |
0 commit comments