Skip to content

PSA more options in release tool #10070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions tools/psa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ This document describes the following scripts:

## \_\_init\_\_.py

This file holds common functions dedicated to help SiP with their postbuild logic.
This file holds common functions dedicated to help SiP with their post-build logic.

* find_secure_image - Scans a Resource object to find the correct binary of the secure image to merge with the nonsecure build.
* find_secure_image - Scans a Resource object to find the correct binary of the secure image to merge with the non-secure build.

## Code generation scripts

Expand All @@ -22,30 +22,36 @@ 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:
Each implementation requires a set of auto-generated 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.
* `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] [-d] [--commit]
usage: release.py [-h] [-m MCU] [-d] [-q] [-l] [--commit] [--skip-tests]
[-x ...]

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
--commit create a git commit for each platform
-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
```

* 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.
* 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:

Expand Down
Loading