-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples/drivers/mbox: Convert to sysbuild and add support for nrf5340…
…bsim Convert this sample application build to sysbuild, and add support for the nrf5340bsim target. Signed-off-by: Alberto Escolar Piedras <[email protected]>
- Loading branch information
Showing
8 changed files
with
79 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2023 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source "share/sysbuild/Kconfig" | ||
|
||
config REMOTE_BOARD | ||
string | ||
default "nrf5340dk_nrf5340_cpunet" if $(BOARD) = "nrf5340dk_nrf5340_cpuapp" | ||
default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" | ||
default "adp_xc7k_ae350" if $(BOARD) = "adp_xc7k_ae350" | ||
default "mimxrt595_evk_cm33" if $(BOARD) = "nrf5340dk_nrf5340_cpunet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
samples/drivers/mbox/remote/boards/nrf5340bsim_nrf5340_cpunet.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_MBOX_NRFX_IPC=y | ||
CONFIG_BUILD_OUTPUT_EXE=n |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) 2023 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
ExternalZephyrProject_Add( | ||
APPLICATION remote | ||
SOURCE_DIR ${APP_DIR}/remote | ||
BOARD ${SB_CONFIG_REMOTE_BOARD} | ||
) | ||
|
||
if("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpuapp") | ||
# For the simulated board, the application core build will produce the final executable | ||
# for that, we give it the path to the netcore image | ||
set(NET_LIBRARY_PATH ${CMAKE_BINARY_DIR}/remote/zephyr/zephyr.elf) | ||
set_property(TARGET mbox APPEND_STRING PROPERTY CONFIG | ||
"CONFIG_NATIVE_SIMULATOR_EXTRA_IMAGE_PATHS=\"${NET_LIBRARY_PATH}\"\n" | ||
) | ||
|
||
# Let's build the net core library first | ||
add_dependencies(mbox remote) | ||
|
||
# Let's meet users expectations of finding the final executable in zephyr/zephyr.exe | ||
add_custom_target(final_executable | ||
ALL | ||
COMMAND | ||
${CMAKE_COMMAND} -E copy | ||
${CMAKE_BINARY_DIR}/mbox/zephyr/zephyr.exe | ||
${CMAKE_BINARY_DIR}/zephyr/zephyr.exe | ||
DEPENDS mbox | ||
) | ||
endif() |