samples: openamp: Add support for Musca A
Musca A is a dual core SoC with both cores are CM33. Add openAMP to support on it. Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
This commit is contained in:
parent
88c3679933
commit
0e770c652a
7 changed files with 39 additions and 5 deletions
|
@ -12,6 +12,8 @@ if("${BOARD}" STREQUAL "lpcxpresso54114_m4")
|
||||||
elseif("${BOARD}" STREQUAL "mps2_an521")
|
elseif("${BOARD}" STREQUAL "mps2_an521")
|
||||||
set(QEMU_EXTRA_FLAGS "-device;loader,file=${REMOTE_ZEPHYR_DIR}/zephyr.elf")
|
set(QEMU_EXTRA_FLAGS "-device;loader,file=${REMOTE_ZEPHYR_DIR}/zephyr.elf")
|
||||||
set(BOARD_REMOTE "mps2_an521_nonsecure")
|
set(BOARD_REMOTE "mps2_an521_nonsecure")
|
||||||
|
elseif("${BOARD}" STREQUAL "v2m_musca")
|
||||||
|
set(BOARD_REMOTE "v2m_musca_nonsecure")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "${BOARD} was not supported for this sample")
|
message(FATAL_ERROR "${BOARD} was not supported for this sample")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -26,6 +26,14 @@ Building the application for mps2_an521
|
||||||
:board: mps2_an521
|
:board: mps2_an521
|
||||||
:goals: debug
|
:goals: debug
|
||||||
|
|
||||||
|
Building the application for v2m_musca
|
||||||
|
**************************************
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/subsys/ipc/openamp
|
||||||
|
:board: v2m_musca
|
||||||
|
:goals: debug
|
||||||
|
|
||||||
Open a serial terminal (minicom, putty, etc.) and connect the board with the
|
Open a serial terminal (minicom, putty, etc.) and connect the board with the
|
||||||
following settings:
|
following settings:
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ cmake_minimum_required(VERSION 3.13.1)
|
||||||
#
|
#
|
||||||
|
|
||||||
if(("${BOARD}" STREQUAL "lpcxpresso54114_m0")
|
if(("${BOARD}" STREQUAL "lpcxpresso54114_m0")
|
||||||
OR "${BOARD}" STREQUAL "mps2_an521_nonsecure")
|
OR "${BOARD}" STREQUAL "mps2_an521_nonsecure"
|
||||||
|
OR "${BOARD}" STREQUAL "v2m_musca_nonsecure")
|
||||||
message(INFO " ${BOARD} compile as slave in this sample")
|
message(INFO " ${BOARD} compile as slave in this sample")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "${BOARD} was not supported for this sample")
|
message(FATAL_ERROR "${BOARD} was not supported for this sample")
|
||||||
|
|
|
@ -73,7 +73,8 @@ static u32_t virtio_get_features(struct virtio_device *vdev)
|
||||||
|
|
||||||
static void virtio_notify(struct virtqueue *vq)
|
static void virtio_notify(struct virtqueue *vq)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SOC_MPS2_AN521)
|
#if defined(CONFIG_SOC_MPS2_AN521) || \
|
||||||
|
defined(CONFIG_SOC_V2M_MUSCA_A)
|
||||||
u32_t current_core = sse_200_platform_get_cpu_id();
|
u32_t current_core = sse_200_platform_get_cpu_id();
|
||||||
|
|
||||||
ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1);
|
ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1);
|
||||||
|
|
|
@ -4,7 +4,7 @@ sample:
|
||||||
name: OpenAMP example integration
|
name: OpenAMP example integration
|
||||||
tests:
|
tests:
|
||||||
sample.ipc.openamp:
|
sample.ipc.openamp:
|
||||||
platform_whitelist: lpcxpresso54114_m4 mps2_an521
|
platform_whitelist: lpcxpresso54114_m4 mps2_an521 v2m_musca
|
||||||
tags: ipm
|
tags: ipm
|
||||||
harness: console
|
harness: console
|
||||||
harness_config:
|
harness_config:
|
||||||
|
|
|
@ -84,7 +84,8 @@ static void virtio_set_features(struct virtio_device *vdev,
|
||||||
|
|
||||||
static void virtio_notify(struct virtqueue *vq)
|
static void virtio_notify(struct virtqueue *vq)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SOC_MPS2_AN521)
|
#if defined(CONFIG_SOC_MPS2_AN521) || \
|
||||||
|
defined(CONFIG_SOC_V2M_MUSCA_A)
|
||||||
u32_t current_core = sse_200_platform_get_cpu_id();
|
u32_t current_core = sse_200_platform_get_cpu_id();
|
||||||
|
|
||||||
ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1);
|
ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1);
|
||||||
|
@ -286,7 +287,8 @@ void main(void)
|
||||||
(k_thread_entry_t)app_task,
|
(k_thread_entry_t)app_task,
|
||||||
NULL, NULL, NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
|
NULL, NULL, NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
|
||||||
|
|
||||||
#if defined(CONFIG_SOC_MPS2_AN521)
|
#if defined(CONFIG_SOC_MPS2_AN521) || \
|
||||||
|
defined(CONFIG_SOC_V2M_MUSCA_A)
|
||||||
wakeup_cpu1();
|
wakeup_cpu1();
|
||||||
k_sleep(500);
|
k_sleep(500);
|
||||||
#endif /* #if defined(CONFIG_SOC_MPS2_AN521) */
|
#endif /* #if defined(CONFIG_SOC_MPS2_AN521) */
|
||||||
|
|
20
samples/subsys/ipc/openamp/v2m_musca.overlay
Normal file
20
samples/subsys/ipc/openamp/v2m_musca.overlay
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Linaro Limited
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
/*
|
||||||
|
* shared memory reserved for the inter-processor communication
|
||||||
|
*/
|
||||||
|
zephyr,ipc_shm = &sramx;
|
||||||
|
zephyr,ipc = &mhu0;
|
||||||
|
};
|
||||||
|
|
||||||
|
sramx: memory@20018000 {
|
||||||
|
compatible = "mmio-sram";
|
||||||
|
reg = <0x20018000 0x8000>;
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue