Since the offline build is made to auto-generate PSA related components
and services for Secure targets, we can change the output directory to
update the files in the respective locations.
TARGET_PSA
--TARGET_MBED_SPM
--COMPONENT_SPE
psa_setup.c
--TARGET_TFM
--COMPONENT_SPE
--inc
tfm_partition_defs.inc
tfm_partition_list.inc
tfm_service_list.inc
tfm_spm_signal_defs.h
--services
--inc
autogen_sid.h
mbed_spm_partitions.h
The release script is been modified to commit these files if there are
any changes detected when `--commit` argument is passed.
Cleaning of auto-generated is been removed as it uses the main directory
for its operations, but PSA auto-generation will work if any of the
service and application-based manifests are updated.
Signed-off-by: Vikas Katariya <Vikas.Katariya@arm.com>
The release script must be run from mbed-os root, otherwise the test
partition binaries will not be created. Add a note in the tool's README
to make this clear and hopefully help save someone some debugging time
in the future.
Unify TF-M and Mbed-SPM code generators:
- Unify SPM initialization logic:
- All partitions are registered at once
- Test partitions are guarded by #ifndef
- Introduce single template list
- Beatify template files and add "Autogen-do not modify" notice
Prepare for integration with mbed-os build system:
- Generate all the files in a single place
Simplify tools/psa/release.py script
* Unify PSA generators
* Replace scanning for mbed_spm templates with json
* Make generate_source_files and parse_manifests common
* Make assert_int an internal function
* Use parse_manifests in pytests
* Update docs
* Replace call with check_call to throw exception on failure
* Check if binaries actually been changes before calling git commit
* Docstrings for all functions
* Small refactor