mbed-os/tools/psa/README.md

58 lines
1.9 KiB
Markdown
Raw Normal View History

# PSA tools
2019-03-06 16:19:57 +00:00
This document describes the following scripts:
2019-03-06 16:19:57 +00:00
* \_\_init\_\_.py
* generate_partition_code.py
* mbed_spm_tfm_common.py
* release.py
## \_\_init\_\_.py
This file holds common functions dedicated to help SiP with their post-build logic.
2019-03-06 16:19:57 +00:00
* find_secure_image - Scans a Resource object to find the correct binary of the secure image to merge with the non-secure build.
2019-03-06 16:19:57 +00:00
## Code generation scripts
Mbed OS holds two implementations of PSA:
* MBED_SPM - Implementation for dual-core v7 targets.
2019-03-06 16:19:57 +00:00
* TF-M - Implementation for v8 targets.
Each implementation requires a set of auto-generated files describing the secure partitions:
2019-03-06 16:19:57 +00:00
* `generate_partition_code.py` - Generate files for both implementations.
* `mbed_spm_tfm_common.py` - Holds common functions for both.
2019-03-06 16:19:57 +00:00
## Secure image generation
`release.py` is the script assigned with compiling the secure images:
2019-03-06 16:19:57 +00:00
2019-03-06 21:21:09 +00:00
```
2019-03-20 14:15:21 +00:00
usage: release.py [-h] [-m MCU] [-d] [-q] [-l] [--commit] [--skip-tests]
[-x ...]
2019-03-06 16:19:57 +00:00
optional arguments:
-h, --help show this help message and exit
-m MCU, --mcu MCU build for the given MCU
-d, --debug set build profile to debug
-q, --quiet No Build log will be printed
-l, --list Print supported PSA secure targets
--commit create a git commit for each platform
--skip-tests skip the test build phase
-x ..., --extra ... additional build parameters
2019-03-06 16:19:57 +00:00
```
2019-03-08 12:17:58 +00:00
* When `MCU ` is not specified, the script compiles all the images for all the targets.
* When `-d/--debug` is not specified, the script compiles the images using the release profile.
2019-03-08 14:11:27 +00:00
* When `--commit` is not specified, the script will not commit the images to git.
* A user can specify additional commands that will be passed on to the build commands (Ex. -D for compilation defines).
This script should be run in following scenarios:
2019-03-06 16:19:57 +00:00
* Release.
* Update to files originating in the secure side.
* Drivers update.
* PSA updates.