Skip to content

Update the README to align with TF-Mv1.4.0 in TF-M integration #384

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 1 commit into from
Aug 27, 2021
Merged
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
21 changes: 11 additions & 10 deletions portable/ThirdParty/GCC/ARM_CM33_TFM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ for Arm M-profile architecture. Please get the details from this [link](https://
# Derivation of the source code

* ```os_wrapper_freertos.c```
The implementation of APIs which are defined in ```os_wrapper\mutex.h``` by TF-M
(tag: TF-Mv1.2.0). The implementation is based on FreeRTOS mutex type semaphore.
The implementation of APIs which are defined in ```\os_wrapper\mutex.h``` by tf-m-tests
(tag: TF-Mv1.4.0). The implementation is based on FreeRTOS mutex type semaphore.

# Usage notes

Expand All @@ -27,18 +27,19 @@ To build a project based on this port:

### Get the TF-M source code

See the [link](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/) to get the source code. This port is based on TF-M version **tag: TF-Mv1.2.0**.
See the [link](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/) to get the source code. This port is based on TF-M version **tag: TF-Mv1.4.0**.

### Build TF-M

Please refer to this [link](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/docs/getting_started/tfm_build_instruction.rst) to build the secure side.
_**Note:** ```CONFIG_TFM_ENABLE_CTX_MGMT``` must be configured as "OFF" when building TF-M_.
Please refer to this [link](https://tf-m-user-guide.trustedfirmware.org/docs/technical_references/instructions/tfm_build_instruction.html) to build the secure side.
_**Note:** ```TFM_NS_CLIENT_IDENTIFICATION``` must be configured as "OFF" when building TF-M_.

## Build the Non-Secure Side

Please copy all the files in ```freertos_kernel\portable\GCC\ARM_CM33_NTZ``` into the ```freertos_kernel\portable\ThirdParty\GCC\ARM_CM33_TFM``` folder before using this port. Note that TrustZone is enabled in this port. The TF-M runs in the Secure Side.

Please call the API ```tfm_ns_interface_init()``` which is defined in ```tfm_ns_interface.c``` at the very beginning of your application. Otherwise, it will always fail when calling a TF-M service in the Nonsecure Side.
Please call the API ```tfm_ns_interface_init()``` which is defined in ```tfm_ns_interface.c``` by tf-m-tests
(tag: TF-Mv1.4.0)at the very beginning of your application. Otherwise, it will always fail when calling a TF-M service in the Nonsecure Side.

### Configuration in FreeRTOS kernel

Expand All @@ -57,15 +58,15 @@ This macro should be configured as 0 because TF-M doesn't use the secure context
### Integrate TF-M Non-Secure interface with FreeRTOS project

To enable calling TF-M services by the Non-Secure Side, the files below should be included in the FreeRTOS project and built together.
* files in ```trusted-firmware-m\build\install\export\tfm\src```
* files in ```trusted-firmware-m\build\install\interface\src```
These files contain the implementation of PSA Functional Developer APIs which can be called by Non-Secure Side directly and PSA Firmware Framework APIs in the IPC model. These files should be taken
as part of the Non-Secure source code.
* files in ```trusted-firmware-m\build\install\export\tfm\include```
* files in ```trusted-firmware-m\build\install\interface\include```
These files are the necessary header files to call TF-M services.
* ```trusted-firmware-m\build\install\export\tfm\lib\s_veneers.o```
* ```trusted-firmware-m\build\install\interface\lib\s_veneers.o```
This object file contains all the Non-Secure callable functions exported by
TF-M and it should be linked when generating the Non-Secure image.



*Copyright (c) 2020, Arm Limited. All rights reserved.*
*Copyright (c) 2020-2021, Arm Limited. All rights reserved.*