-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysbuild: Add SDP FLPR image to automatic sysbuilds
Add SDP FLPR application image to the build depending on the enabled configuration. Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
- Loading branch information
1 parent
d5706de
commit 746b465
Showing
5 changed files
with
94 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
||
# Update FLPR image KConfig based on main app configuration. | ||
# | ||
# Usage: | ||
# flpr_egpio_update_kconfig() | ||
# | ||
function(flpr_egpio_update_kconfig) | ||
|
||
sysbuild_get(CONFIG_MBOX_BACKEND IMAGE ${DEFAULT_IMAGE} VAR CONFIG_GPIO_NRFE_EGPIO_BACKEND_MBOX KCONFIG) | ||
sysbuild_get(CONFIG_ICMSG_BACKEND IMAGE ${DEFAULT_IMAGE} VAR CONFIG_GPIO_NRFE_EGPIO_BACKEND_ICMSG KCONFIG) | ||
sysbuild_get(CONFIG_PLATFORM IMAGE ${DEFAULT_IMAGE} VAR CONFIG_SOC KCONFIG) | ||
|
||
message(STATUS "eGPIO: Using ${CONFIG_PLATFORM} SoC") | ||
|
||
if(CONFIG_MBOX_BACKEND) | ||
sysbuild_cache_set(VAR egpio_CONFIG_GPIO_NRFE_EGPIO_BACKEND_MBOX APPEND REMOVE_DUPLICATES "y") | ||
if(CONFIG_PLATFORM STREQUAL "nrf54l15") | ||
sysbuild_cache_set(VAR egpio_EXTRA_DTC_OVERLAY_FILE APPEND REMOVE_DUPLICATES "./boards/nrf54l15dk_nrf54l15_cpuflpr_mbox.overlay") | ||
endif() | ||
message(STATUS "eGPIO: Using MBOX backend") | ||
elseif(CONFIG_ICMSG_BACKEND) | ||
sysbuild_cache_set(VAR egpio_CONFIG_GPIO_NRFE_EGPIO_BACKEND_ICMSG APPEND REMOVE_DUPLICATES "y") | ||
if(CONFIG_PLATFORM STREQUAL "nrf54l15") | ||
sysbuild_cache_set(VAR egpio_EXTRA_DTC_OVERLAY_FILE APPEND REMOVE_DUPLICATES "./boards/nrf54l15dk_nrf54l15_cpuflpr_icmsg.overlay") | ||
endif() | ||
sysbuild_cache_set(VAR egpio_CONFIG_IPC_SERVICE APPEND REMOVE_DUPLICATES "y") | ||
sysbuild_cache_set(VAR egpio_CONFIG_IPC_SERVICE_BACKEND_ICMSG APPEND REMOVE_DUPLICATES "y") | ||
message(STATUS "eGPIO: Using ICMSG backend") | ||
endif() | ||
|
||
sysbuild_cache(CREATE APPLICATION egpio CMAKE_RERUN) | ||
|
||
endfunction() | ||
|
||
# If eGPIO FLPR application is enabled, update Kconfigs | ||
if(SB_CONFIG_EGPIO_FLPR_APPLICATION) | ||
flpr_egpio_update_kconfig() | ||
endif() |
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,21 @@ | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
||
menu "SW defined peripherals" | ||
|
||
menuconfig SDP | ||
bool "Software defined peripherals" | ||
|
||
if SDP | ||
|
||
config EGPIO_FLPR_APPLICATION | ||
bool "Nordic eGPIO FLPR application" | ||
help | ||
Include FLPR side eGPIO application in build. | ||
FLPR eGPIO application is an eGPIO driver built for an FLPR core that receives commands | ||
from the app core and controls the pin states based on them. | ||
|
||
endif # SDP | ||
|
||
endmenu |
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,22 @@ | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
||
# If it is enabled, include the eGPIO FLPR application in the build | ||
if(SB_CONFIG_EGPIO_FLPR_APPLICATION) | ||
# Extract soc name from related variables | ||
string(REPLACE "/" ";" split_board_qualifiers "${BOARD_QUALIFIERS}") # Replace all "/" with ";" | ||
list(GET split_board_qualifiers 1 target_soc) # Get the second element of the list, which is the soc name | ||
if((DEFINED ${BOARD_REVISION}) AND NOT ${BOARD_REVISION} STREQUAL "") | ||
string(CONCAT board_target_flpr ${BOARD} "@" ${BOARD_REVISION} "/" ${target_soc} "/cpuflpr") | ||
else() | ||
string(CONCAT board_target_flpr ${BOARD} "/" ${target_soc} "/cpuflpr") | ||
endif() | ||
set(target_soc) # Clear the variable that is no longer needed | ||
|
||
ExternalZephyrProject_Add( | ||
APPLICATION egpio # Add ExternalZephyrProject for the sdp_gpio application | ||
SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/gpio # Specify the path to the application directory | ||
BOARD ${board_target_flpr} # Specify the board for the application | ||
) | ||
endif() |