samples ipc static_vrings: Convert to sysbuild
Convert this sample application build to sysbuild. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
19cc0fe099
commit
adf9e4000f
|
@ -6,27 +6,14 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
|
||||
set(REMOTE_ZEPHYR_DIR ${CMAKE_CURRENT_BINARY_DIR}/ipc_service_remote-prefix/src/ipc_service_remote-build/zephyr)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
|
||||
if("${BOARD}" STREQUAL "nrf5340dk_nrf5340_cpuapp")
|
||||
set(BOARD_REMOTE "nrf5340dk_nrf5340_cpunet")
|
||||
else()
|
||||
if(NOT ("${BOARD}" STREQUAL "nrf5340dk_nrf5340_cpuapp"))
|
||||
message(FATAL_ERROR "${BOARD} is not supported for this sample")
|
||||
endif()
|
||||
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(ipc_service)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(
|
||||
ipc_service_remote
|
||||
SOURCE_DIR ${APPLICATION_SOURCE_DIR}/remote
|
||||
INSTALL_COMMAND "" # This particular build system has no install command
|
||||
CMAKE_CACHE_ARGS -DBOARD:STRING=${BOARD_REMOTE}
|
||||
BUILD_BYPRODUCTS "${REMOTE_ZEPHYR_DIR}/${KERNEL_BIN_NAME}"
|
||||
# NB: Do we need to pass on more CMake variables?
|
||||
BUILD_ALWAYS True
|
||||
)
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# Copyright 2023 Nordic Semiconductor ASA
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
source "share/sysbuild/Kconfig"
|
||||
|
||||
config NET_CORE_BOARD
|
||||
string
|
||||
default "nrf5340dk_nrf5340_cpunet" if $(BOARD) = "nrf5340dk_nrf5340_cpuapp"
|
|
@ -18,6 +18,7 @@ Building the application for nrf5340dk_nrf5340_cpuapp
|
|||
:zephyr-app: samples/subsys/ipc/ipc_service/static_vrings
|
||||
:board: nrf5340dk_nrf5340_cpuapp
|
||||
:goals: debug
|
||||
:west-args: --sysbuild
|
||||
|
||||
Open a serial terminal (minicom, putty, etc.) and connect the board with the
|
||||
following settings:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
sample:
|
||||
name: IPC Service example integration (OpenAMP static_vrings backend) (remote)
|
||||
tests:
|
||||
sample.ipc.static_vrings_remote:
|
||||
platform_allow: nrf5340dk_nrf5340_cpunet
|
||||
integration_platforms:
|
||||
- nrf5340dk_nrf5340_cpunet
|
||||
tags: ipc
|
||||
harness: remote
|
|
@ -6,4 +6,5 @@ tests:
|
|||
integration_platforms:
|
||||
- nrf5340dk_nrf5340_cpuapp
|
||||
tags: ipc
|
||||
sysbuild: true
|
||||
harness: remote
|
||||
|
|
14
samples/subsys/ipc/ipc_service/static_vrings/sysbuild.cmake
Normal file
14
samples/subsys/ipc/ipc_service/static_vrings/sysbuild.cmake
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if("${SB_CONFIG_NET_CORE_BOARD}" STREQUAL "")
|
||||
message(FATAL_ERROR
|
||||
"Target ${BOARD} not supported for this sample. "
|
||||
"There is no remote board selected in Kconfig.sysbuild")
|
||||
endif()
|
||||
|
||||
ExternalZephyrProject_Add(
|
||||
APPLICATION remote
|
||||
SOURCE_DIR ${APP_DIR}/remote
|
||||
BOARD ${SB_CONFIG_NET_CORE_BOARD}
|
||||
)
|
Loading…
Reference in a new issue