Skip to content
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

Add Arm MPS3 AN524 Target and Trusted Firmware-M #264

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

microbuilder
Copy link

@microbuilder microbuilder commented Jul 5, 2021

This PR enables the Arm MPS3 development board using the AN524
(Arm Cortex-M33) application image:

  • It has been tested using QEMU (6.0.0) and on actual HW.
    Instructions on building QEMU from source to enable
    functional AN524 support are included.
  • Trusted Firmware-M (TF-M) has been enabled as an external
    project in cmake, which will be downloaded, built and linked
    as part of the standard build process. TF-M integration is
    currently based on the 1.3.0 release.

Note: This PR requires changes to threadx, proposed here:
eclipse-threadx/threadx#126 ... once those
changes are merged in, the threadx sobmodule reference in this
PR can be updated from url = https://github.com/Linaro/threadx.git
to the original url = https://github.com/azure-rtos/threadx.git.

Co-authored-by: Jimmy Brisson jimmy.brisson@linaro.org
Co-authored-by: Devaraj Ranganna devaraj.ranganna@linaro.org
Signed-off-by: Kevin Townsend kevin.townsend@linaro.org

microbuilder and others added 5 commits July 1, 2021 14:54
Add support for the MPS3 AN524, a cortex-m33-based prototyping platform.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Enable UART0 support to be able to print logs from Azure RTOS to serial
console.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
The python script `Arm/MPS3_AN524/tools/flash.py` updates an
application image onto the Arm MPS3 FPGA Prototyping Board.

The build script `Arm/MPS3_AN524/tools/rebuild.sh` accepts the MCC
serial port to reboot the connected board.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
This commit redirects the ThreadX submodule to point to a fork where
changes can be more easily made during porting.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This is a rollup of the following changes:
 * Use ThreadX and threads in the example.
 * Build ThreadX.
 * Use the threadx cortex_m33.cmake build file instead of the one in
 this repo to avoid falling out of sync with upstream.
 * Update the tfm submodule reference to point to linaro/lite-azure-threadx.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
@ghost
Copy link

ghost commented Jul 5, 2021

CLA assistant check
All CLA requirements met.

urutva and others added 4 commits July 13, 2021 13:59
This also links the App at the offset expected by TFM and uses a
non-secure address in the startup code

This allows for firmware update, MCUBoot sytle.

The modifications include:
 * Reserve room in flash for the MCUBoot header (0x400)
 * Sign firmware parts as part of the build process

The total size of RAM in MPS3 AN524 is 128KB out of which 96KB is
allocated to TF-M. Update app linker file to allocate remaining RAM. In
addition reduce stack size from `0x1800` to `0x1000` to keep heap size
at `0x1000`.

Finally, we call some PSA APIs in the example application to test this
integration.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
This includes instructions on how to patch qemu to work around a bug

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
We don't need any more than 2 theads and 1 semaphore. This keeps the
allocations used in the adaptation layer to fit.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
TF-M regression tests config option `TFM_REGRESSION` is documented in
`Arm/MPS3_AN524/app/config.cmake` and is disabled by default. To run
TF-M NS regression tests set the config option to `ON` and rebuild
the application. Then run it either on QEMU or hardware.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
@ryanwinter
Copy link
Contributor

Thanks @microbuilder, we can review this for inclusion when the new threadx version is released.

@ryanwinter ryanwinter added the devkit New devkit label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devkit New devkit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants