Merge pull request #9963 from kfnta/psa_tools_docs

PSA tools docs
pull/9976/head
Nir Sonnenschein 2019-03-07 12:03:21 +02:00 committed by GitHub
commit aedc1e10ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 51 additions and 0 deletions

51
tools/psa/README.md Normal file
View File

@ -0,0 +1,51 @@
# PSA tools
This document describes the following scripts:
* \_\_init\_\_.py
* generate_partition_code.py
* mbed_spm_tfm_common.py
* generate_mbed_spm_partition_code.py
* generate_tfm_partition_code.py
* release.py
## \_\_init\_\_.py
This file holds common functions dedicated to help SiP with their postbuild logic.
* find_secure_image - Scans a Resource object to find the correct binary of the secure image to merge with the nonsecure build.
## Code generation scripts
Mbed OS holds two implementations of PSA:
* MBED_SPM - Implementation for dual-core v7 targets.
* TF-M - Implementation for v8 targets.
Each implementation requires a set of autogenerated files describing the secure partitions:
* `generate_partition_code.py` - Generate files for both implementations.
* `generate_mbed_spm_partition_code.py` - Generate files for MBED_SPM.
* `generate_tfm_partition_code.py` - Generate files for TF-M.
* `mbed_spm_tfm_common.py` - Holds common functions for both.
## Secure image generation
`release.py` is the script assigned with compiling the secure images:
```
usage: release.py [-h] [-m MCU]
optional arguments:
-h, --help show this help message and exit
-m MCU, --mcu MCU build for the given MCU
```
When `MCU ` is not specified, the script compiles all the images for all the targets.
This script should be run in following scenarios:
* Release.
* Update to files originating in the secure side.
* Drivers update.
* PSA updates.