diff --git a/samples/subsys/ipc/openamp/CMakeLists.txt b/samples/subsys/ipc/openamp/CMakeLists.txt index 67a3ba6ace3..b9d1d0ee9d9 100644 --- a/samples/subsys/ipc/openamp/CMakeLists.txt +++ b/samples/subsys/ipc/openamp/CMakeLists.txt @@ -14,6 +14,8 @@ elseif("${BOARD}" STREQUAL "mps2_an521") set(BOARD_REMOTE "mps2_an521_nonsecure") elseif("${BOARD}" STREQUAL "v2m_musca") set(BOARD_REMOTE "v2m_musca_nonsecure") +elseif("${BOARD}" STREQUAL "v2m_musca_b1") + set(BOARD_REMOTE "v2m_musca_b1_nonsecure") else() message(FATAL_ERROR "${BOARD} was not supported for this sample") endif() diff --git a/samples/subsys/ipc/openamp/README.rst b/samples/subsys/ipc/openamp/README.rst index fe3b143762a..701dbae09ad 100644 --- a/samples/subsys/ipc/openamp/README.rst +++ b/samples/subsys/ipc/openamp/README.rst @@ -34,6 +34,14 @@ Building the application for v2m_musca :board: v2m_musca :goals: debug +Building the application for v2m_musca_b1 +***************************************** + +.. zephyr-app-commands:: + :zephyr-app: samples/subsys/ipc/openamp + :board: v2m_musca_b1 + :goals: debug + Open a serial terminal (minicom, putty, etc.) and connect the board with the following settings: diff --git a/samples/subsys/ipc/openamp/remote/CMakeLists.txt b/samples/subsys/ipc/openamp/remote/CMakeLists.txt index 0561d91e55c..74a2fd71d9f 100644 --- a/samples/subsys/ipc/openamp/remote/CMakeLists.txt +++ b/samples/subsys/ipc/openamp/remote/CMakeLists.txt @@ -7,7 +7,8 @@ cmake_minimum_required(VERSION 3.13.1) if(("${BOARD}" STREQUAL "lpcxpresso54114_m0") OR "${BOARD}" STREQUAL "mps2_an521_nonsecure" - OR "${BOARD}" STREQUAL "v2m_musca_nonsecure") + OR "${BOARD}" STREQUAL "v2m_musca_nonsecure" + OR "${BOARD}" STREQUAL "v2m_musca_b1_nonsecure") message(INFO " ${BOARD} compile as slave in this sample") else() message(FATAL_ERROR "${BOARD} was not supported for this sample") diff --git a/samples/subsys/ipc/openamp/remote/src/main.c b/samples/subsys/ipc/openamp/remote/src/main.c index 66b03816d2a..86d44d5da23 100644 --- a/samples/subsys/ipc/openamp/remote/src/main.c +++ b/samples/subsys/ipc/openamp/remote/src/main.c @@ -74,7 +74,8 @@ static u32_t virtio_get_features(struct virtio_device *vdev) static void virtio_notify(struct virtqueue *vq) { #if defined(CONFIG_SOC_MPS2_AN521) || \ - defined(CONFIG_SOC_V2M_MUSCA_A) + defined(CONFIG_SOC_V2M_MUSCA_A) || \ + defined(CONFIG_SOC_V2M_MUSCA_B1) u32_t current_core = sse_200_platform_get_cpu_id(); ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1); diff --git a/samples/subsys/ipc/openamp/sample.yaml b/samples/subsys/ipc/openamp/sample.yaml index 2f0a083ecfe..e17964e6c57 100644 --- a/samples/subsys/ipc/openamp/sample.yaml +++ b/samples/subsys/ipc/openamp/sample.yaml @@ -4,7 +4,7 @@ sample: name: OpenAMP example integration tests: sample.ipc.openamp: - platform_whitelist: lpcxpresso54114_m4 mps2_an521 v2m_musca + platform_whitelist: lpcxpresso54114_m4 mps2_an521 v2m_musca v2m_musca_b1 tags: ipm harness: console harness_config: diff --git a/samples/subsys/ipc/openamp/src/main.c b/samples/subsys/ipc/openamp/src/main.c index 31f43289911..08c24f92c90 100644 --- a/samples/subsys/ipc/openamp/src/main.c +++ b/samples/subsys/ipc/openamp/src/main.c @@ -85,7 +85,8 @@ static void virtio_set_features(struct virtio_device *vdev, static void virtio_notify(struct virtqueue *vq) { #if defined(CONFIG_SOC_MPS2_AN521) || \ - defined(CONFIG_SOC_V2M_MUSCA_A) + defined(CONFIG_SOC_V2M_MUSCA_A) || \ + defined(CONFIG_SOC_V2M_MUSCA_B1) u32_t current_core = sse_200_platform_get_cpu_id(); ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1); @@ -288,7 +289,8 @@ void main(void) NULL, NULL, NULL, K_PRIO_COOP(7), 0, K_NO_WAIT); #if defined(CONFIG_SOC_MPS2_AN521) || \ - defined(CONFIG_SOC_V2M_MUSCA_A) + defined(CONFIG_SOC_V2M_MUSCA_A) || \ + defined(CONFIG_SOC_V2M_MUSCA_B1) wakeup_cpu1(); k_sleep(500); #endif /* #if defined(CONFIG_SOC_MPS2_AN521) */ diff --git a/samples/subsys/ipc/openamp/v2m_musca_b1.overlay b/samples/subsys/ipc/openamp/v2m_musca_b1.overlay new file mode 100644 index 00000000000..a2473c4cc09 --- /dev/null +++ b/samples/subsys/ipc/openamp/v2m_musca_b1.overlay @@ -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@20060000 { + compatible = "mmio-sram"; + reg = <0x20060000 0x8000>; + }; +};