Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

# Applications
/applications/installer/ @nrfconnect/ncs-eris
/applications/firmware_loader/ @nrfconnect/ncs-eris
/applications/softdevice/ @nrfconnect/ncs-co-build-system

# Boards
/boards/ @nrfconnect/ncs-co-boards @nrfconnect/ncs-bm
Expand Down Expand Up @@ -61,7 +63,6 @@
# Samples
/samples/bluetooth/ @nrfconnect/ncs-bm
/samples/boot/ @nrfconnect/ncs-eris
/applications/firmware_loader/ @nrfconnect/ncs-eris
/samples/peripherals/bm_zms/ @nrfconnect/ncs-bm @rghaddab
/samples/peripherals/ @nrfconnect/ncs-bm

Expand Down
33 changes: 33 additions & 0 deletions applications/softdevice/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr
COMPONENTS zephyr_default:kconfig
REQUIRED HINTS $ENV{ZEPHYR_BASE}
)

project(softdevice)

# Manually include board configuration to enable automatic runners.yaml generation
include(${BOARD_DIR}/board.cmake OPTIONAL)

# Create the runners_yaml_props_target that flash system expects
add_custom_target(runners_yaml_props_target)

# Set hex_file property to point to zephyr.hex in this directory
set_target_properties(runners_yaml_props_target PROPERTIES
hex_file "${CONFIG_SOFTDEVICE_FILE}"
)

# Override the runners.yaml path to use CMAKE_CURRENT_BINARY_DIR/zephyr instead of
# PROJECT_BINARY_DIR, this ensures runners.yaml is generated at <build>/softdevice/zephyr where
# west expects it
set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/zephyr)

# Include flash support to automatically generate runners.yaml
include(${ZEPHYR_BASE}/cmake/flash/CMakeLists.txt)
10 changes: 10 additions & 0 deletions applications/softdevice/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config SOFTDEVICE_FILE
string "SoftDevice file (informative only, do not change)"

source "Kconfig.zephyr"
7 changes: 7 additions & 0 deletions applications/softdevice/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _softdevice_flasher_application:

SoftDevice flasher application
##############################

This is a project used by sysbuild to flash the SoftDevice image automatically when ``west flash`` is invoked.
It is not for user modification or for attempting to build by itself.
1 change: 1 addition & 0 deletions applications/softdevice/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Nothing here
5 changes: 5 additions & 0 deletions doc/nrf-bm/release_notes/release_notes_changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ Boards

* Removed unused peripheral nodes from Devicetree.

Build system
============

* Added automatic flashing of SoftDevice files for projects that do not use MCUboot when ``west flash`` is invoked.

DFU
===

Expand Down
11 changes: 11 additions & 0 deletions sysbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ function(bm_install_setup)
BUILD_ONLY y
)
endif()
else()
if(NOT SB_CONFIG_SOFTDEVICE_NONE)
ExternalZephyrProject_Add(
APPLICATION softdevice
SOURCE_DIR ${ZEPHYR_NRF_BM_MODULE_DIR}/applications/softdevice
)

set_config_string(softdevice CONFIG_SOFTDEVICE_FILE ${SB_CONFIG_SOFTDEVICE_FILE})
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} softdevice)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} softdevice)
endif()
endif()
endfunction()

Expand Down