From b2c1fe0e31987bf1a6d8b682fc1b465b0efb27e4 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Wed, 6 Mar 2019 18:19:57 +0200 Subject: [PATCH 1/4] Add README.md for tools/psa --- tools/psa/README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tools/psa/README.md diff --git a/tools/psa/README.md b/tools/psa/README.md new file mode 100644 index 0000000000..202f734392 --- /dev/null +++ b/tools/psa/README.md @@ -0,0 +1,50 @@ +# PSA Tools + +This document will describe 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 function 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 non-secure build. + + +## Code generation scripts + +mbed-os holds 2 implementations of PSA: +* MBED_SPM - Implementation for dual core v7 targets. +* TF-M - Implementation for v8 targets. + +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 BMED_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. + +```python +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 will compile all the images for all the targets + +This script should be ran in following scenarios: +* Release. +* Update to files originating in the secure side. +* Drivers update. +* PSA updates. From 6695c22634e736ad700732c2a71fea29d87f9c03 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Wed, 6 Mar 2019 23:21:09 +0200 Subject: [PATCH 2/4] Remove python from code block --- tools/psa/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/psa/README.md b/tools/psa/README.md index 202f734392..89b80c75e7 100644 --- a/tools/psa/README.md +++ b/tools/psa/README.md @@ -33,7 +33,7 @@ each implementation requires a set of auto generated files describing the secure `release.py` is the script assigned with compiling the secure images. -```python +``` usage: release.py [-h] [-m MCU] optional arguments: From 43e819e785319b864b53c170db14ca54a86a3339 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Thu, 7 Mar 2019 01:08:24 +0200 Subject: [PATCH 3/4] Fix typo --- tools/psa/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/psa/README.md b/tools/psa/README.md index 89b80c75e7..137bff2361 100644 --- a/tools/psa/README.md +++ b/tools/psa/README.md @@ -25,7 +25,7 @@ mbed-os holds 2 implementations of PSA: 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 BMED_SPM. +* `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. From f4a3d263ad40c0a82e7ebe1277a57ebe4ceaf2a3 Mon Sep 17 00:00:00 2001 From: Amanda Butler Date: Wed, 6 Mar 2019 18:39:56 -0600 Subject: [PATCH 4/4] Edit README.md Edit file for minor grammar and style tweaks, mostly for consistent capitalization and tense across docs. --- tools/psa/README.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tools/psa/README.md b/tools/psa/README.md index 137bff2361..cebeb0808e 100644 --- a/tools/psa/README.md +++ b/tools/psa/README.md @@ -1,6 +1,6 @@ -# PSA Tools +# PSA tools -This document will describe the following scripts: +This document describes the following scripts: * \_\_init\_\_.py * generate_partition_code.py @@ -11,18 +11,18 @@ This document will describe the following scripts: ## \_\_init\_\_.py -This file holds common function 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 non-secure build. +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 2 implementations of PSA: -* MBED_SPM - Implementation for dual core v7 targets. +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 auto generated files describing the secure partitions. +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. @@ -31,7 +31,7 @@ each implementation requires a set of auto generated files describing the secure ## Secure image generation -`release.py` is the script assigned with compiling the secure images. +`release.py` is the script assigned with compiling the secure images: ``` usage: release.py [-h] [-m MCU] @@ -41,9 +41,10 @@ optional arguments: -m MCU, --mcu MCU build for the given MCU ``` -when `MCU ` is not specified the script will compile all the images for all the targets +When `MCU ` is not specified, the script compiles all the images for all the targets. + +This script should be run in following scenarios: -This script should be ran in following scenarios: * Release. * Update to files originating in the secure side. * Drivers update.