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

boards: mps3: Add support for corstone300/an552 and corstone310/an555 #79127

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion boards/arm/mps3/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) 2021 Linaro Limited
# Copyright 2024 Arm Limited and/or its affiliates <[email protected]>
# SPDX-License-Identifier: Apache-2.0

config BOARD_MPS3
select QEMU_TARGET
select QEMU_TARGET if BOARD_MPS3_CORSTONE300_AN547 || BOARD_MPS3_CORSTONE300_AN547_NS
3 changes: 2 additions & 1 deletion boards/arm/mps3/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright (c) 2018-2021 Linaro Limited
# Copyright 2024 Arm Limited and/or its affiliates <[email protected]>
# SPDX-License-Identifier: Apache-2.0

if BOARD_MPS3_AN547
if BOARD_MPS3_CORSTONE300_AN547 || BOARD_MPS3_CORSTONE300_AN552 || BOARD_MPS3_CORSTONE310_AN555

# MPU-based null-pointer dereferencing detection cannot
# be applied as the (0x0 - 0x400) is unmapped but QEMU
Expand Down
4 changes: 3 additions & 1 deletion boards/arm/mps3/Kconfig.mps3
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Copyright (c) 2023 Nordic Semiconductor
# Copyright 2024 Arm Limited and/or its affiliates <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0

config BOARD_MPS3
select SOC_SERIES_MPS3
select SOC_MPS3_AN547
select SOC_MPS3_CORSTONE300 if BOARD_MPS3_CORSTONE300_AN547 || BOARD_MPS3_CORSTONE300_AN547_NS || BOARD_MPS3_CORSTONE300_AN552 || BOARD_MPS3_CORSTONE300_AN552_NS
select SOC_MPS3_CORSTONE310 if BOARD_MPS3_CORSTONE310_AN555 || BOARD_MPS3_CORSTONE310_AN555_NS
57 changes: 41 additions & 16 deletions boards/arm/mps3/board.cmake
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
# Copyright (c) 2021 Linaro
# Copyright 2024 Arm Limited and/or its affiliates <[email protected]>
# SPDX-License-Identifier: Apache-2.0

# The AN547 FVP must be used to enable Ethos-U55 NPU support, but QEMU also
# The AN552/AN547 FVP must be used to enable Ethos-U55 NPU support, but QEMU also
# supports the AN547 without the NPU.
#
# For emulation, QEMU is used by default. To use AN547 FVP as an emulation
# use the 'run_armfvp' target, for example:
# Default emulation:
# QEMU is used by default for AN547 and
# FVP is used by default for AN552.
#
# $ west build -b mps3_an547 samples/hello_world -t run_armfvp
# To explicitly use FVP for emulation:
# AN552 and AN547 can also use FVP as an emulation with
# the 'run_armfvp' target, for example:
#
# $ west build -b mps3//an547 samples/hello_world -t run_armfvp


set(SUPPORTED_EMU_PLATFORMS qemu armfvp)
if(CONFIG_BOARD_MPS3_CORSTONE300_AN547 OR CONFIG_BOARD_MPS3_CORSTONE300_AN547_NS)
set(SUPPORTED_EMU_PLATFORMS qemu armfvp)
set(ARMFVP_BIN_NAME FVP_Corstone_SSE-300_Ethos-U55)

# QEMU settings
set(QEMU_CPU_TYPE_${ARCH} cortex-m55)
set(QEMU_FLAGS_${ARCH}
-cpu ${QEMU_CPU_TYPE_${ARCH}}
-machine mps3-an547
-nographic
-vga none
# QEMU settings
set(QEMU_CPU_TYPE_${ARCH} cortex-m55)
set(QEMU_FLAGS_${ARCH}
-cpu ${QEMU_CPU_TYPE_${ARCH}}
-machine mps3-an547
-nographic
-vga none
)
elseif(CONFIG_BOARD_MPS3_CORSTONE300_AN552 OR CONFIG_BOARD_MPS3_CORSTONE300_AN552_NS)
set(SUPPORTED_EMU_PLATFORMS armfvp)
set(ARMFVP_BIN_NAME FVP_Corstone_SSE-300_Ethos-U55)
elseif(CONFIG_BOARD_MPS3_CORSTONE300)
string(REPLACE "mps3/corstone300;" "" board_targets "${board_targets}")
string(REPLACE ";" "\n" board_targets "${board_targets}")
message(FATAL_ERROR "Please use a target from the list below: \n${board_targets}\n")
elseif(CONFIG_BOARD_MPS3_CORSTONE310_AN555 OR CONFIG_BOARD_MPS3_CORSTONE310_AN555_NS)
set(SUPPORTED_EMU_PLATFORMS armfvp)
set(ARMFVP_BIN_NAME FVP_Corstone_SSE-310)
set(ARMFVP_FLAGS
# default is '0x11000000' but should match cpu<i>.INITSVTOR which is 0.
-C mps3_board.sse300.iotss3_systemcontrol.INITSVTOR_RST=0
)
endif()

board_set_debugger_ifnset(qemu)

if (CONFIG_BUILD_WITH_TFM)
Expand All @@ -28,19 +53,19 @@ if (CONFIG_BUILD_WITH_TFM)
set(QEMU_KERNEL_OPTION "-device;loader,file=${CMAKE_BINARY_DIR}/zephyr/tfm_merged.hex")
endif()

# FVP settings
set(ARMFVP_BIN_NAME FVP_Corstone_SSE-300_Ethos-U55)

# FVP Parameters
# -C indicate a config option in the form of:
# instance.parameter=value
# Run the FVP with --list-params to list all options
set(ARMFVP_FLAGS
set(ARMFVP_FLAGS ${ARMFVP_FLAGS}
-C mps3_board.uart0.out_file=-
-C mps3_board.uart0.unbuffered_output=1
-C mps3_board.uart1.out_file=-
-C mps3_board.uart1.unbuffered_output=1
-C mps3_board.uart2.out_file=-
-C mps3_board.uart2.unbuffered_output=1
-C mps3_board.visualisation.disable-visualisation=1
-C mps3_board.telnetterminal0.start_telnet=0
-C mps3_board.telnetterminal1.start_telnet=0
-C mps3_board.telnetterminal2.start_telnet=0
)
14 changes: 12 additions & 2 deletions boards/arm/mps3/board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ board:
name: mps3
vendor: arm
socs:
- name: 'an547'
- name: 'corstone300'
variants:
- name: 'ns'
- name: 'an547'
variants:
- name: 'ns'
- name: 'an552'
variants:
- name: 'ns'
- name: 'corstone310'
variants:
- name: 'an555'
variants:
- name: 'ns'
Copy link
Collaborator

@kartben kartben Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the original index.rst file and rework all the variants into the same document rather than vastly duplicating content in the two new pages you introduced. You can probably use a mix of Sphinx "tabs" for the sections that differ per variant, and simply reword paragraphs to refer to "MPS3" when their content applies to all variants.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ CPU and the following devices:
- Cortex-M System Design Kit UART
- Ethos-U55 NPU

.. image:: img/mps3_an547.jpg
.. image:: img/mps3.jpg
:align: center
:alt: ARM MPS3 AN547
:alt: ARM MPS3

This board configuration also supports using the `Corstone-300 FVP`_ to emulate
a MPS3 AN547 hardware platform.
Expand All @@ -41,13 +41,17 @@ for building for both Secure and Non-Secure firmware.

The BOARD options are summarized below:

+----------------------+-----------------------------------------------+
| BOARD | Description |
+======================+===============================================+
| ``mps3/an547`` | For building Secure (or Secure-only) firmware |
+----------------------+-----------------------------------------------+
| ``mps3/an547/ns`` | For building Non-Secure firmware |
+----------------------+-----------------------------------------------+
+-------------------------------+-----------------------------------------------+
| BOARD | Description |
+===============================+===============================================+
| ``mps3/corstone300/an547`` | For building Secure (or Secure-only) firmware |
+-------------------------------+-----------------------------------------------+
| ``mps3/corstone300/an547/ns`` | For building Non-Secure firmware |
+-------------------------------+-----------------------------------------------+

.. note::
Board qualifier must include the board name as mentioned above.
``mps3/corstone300`` without the board name is not a valid qualifier.

Hardware
********
Expand Down Expand Up @@ -89,7 +93,7 @@ ARM MPS3 AN547 provides the following hardware components:
Supported Features
===================

The ``mps3/an547`` board configuration supports the following hardware features:
The ``mps3/corstone300/an547`` board configuration supports the following hardware features:

+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
Expand All @@ -109,7 +113,7 @@ See the `MPS3 FPGA Website`_ for a complete list of MPS3 AN547 board hardware
features.

The default configuration can be found in
:zephyr_file:`boards/arm/mps3/mps3_an547_defconfig`.
:zephyr_file:`boards/arm/mps3/mps3_corstone300_an547_defconfig`.

For more details refer to `MPS3 AN547 Technical Reference Manual (TRM)`_.

Expand Down Expand Up @@ -146,7 +150,7 @@ the :zephyr:code-sample:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mps3/an547
:board: mps3/corstone300/an547
:goals: build

Open a serial terminal (minicom, putty, etc.) with the following settings:
Expand Down
Loading
Loading