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
4 changes: 1 addition & 3 deletions .checkpatch.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@
--ignore EMBEDDED_FUNCTION_NAME
--ignore MACRO_WITH_FLOW_CONTROL
--exclude ext
--exclude doc/s115
--exclude include/s115
--exclude subsys/softdevice/hex
--exclude components
7 changes: 4 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
# All cmake related files
/cmake/ @nrfconnect/ncs-co-build-system

# External components
/components/softdevice/ @nrfconnect/ncs-dragoon

# All doc related files
/doc/ @nrfconnect/ncs-bm @nrfconnect/ncs-bm-doc
/doc/s115/ @nrfconnect/ncs-bm @nrfconnect/ncs-bm-doc @nrfconnect/ncs-dragoon

# Drivers
/drivers/clock_control/ @nrfconnect/ncs-bm
Expand All @@ -38,7 +40,6 @@
# Include
/include/*.h @nrfconnect/ncs-bm
/include/bluetooth/ @nrfconnect/ncs-bm
/include/s115/ @nrfconnect/ncs-bm @nrfconnect/ncs-dragoon

# Libraries
/lib/ble_adv/ @nrfconnect/ncs-bm
Expand Down Expand Up @@ -73,7 +74,7 @@
/subsys/bm_installs/ @nrfconnect/ncs-pluto
/subsys/logging/ @nrfconnect/ncs-bm
/subsys/mgmt/mcumgr/ @nrfconnect/ncs-pluto
/subsys/softdevice/ @nrfconnect/ncs-bm @nrfconnect/ncs-dragoon
/subsys/softdevice/ @nrfconnect/ncs-bm
/subsys/softdevice_handler/ @nrfconnect/ncs-bm
/subsys/storage/flash_map/ @nrfconnect/ncs-pluto

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/nrf-bm/gen_docs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import shutil
import os
from subprocess import call
Expand All @@ -10,7 +10,7 @@
requirements_path = os.path.join(script_dir, "requirements.txt") # Path to the requirements.txt file
includes_dir = os.path.join(script_dir, "includes") # Path to the includes directory
sample_dir = os.path.join(script_dir, "sample") # Path to the sample directory
pdf_source_dir = os.path.abspath('../../subsys/softdevice/hex/s115') # Path to the PDF source directory
pdf_source_dir = os.path.abspath('../../components/softdevice/s115/') # Path to the PDF source directory
pdf_destination_dir = os.path.join(source_dir, 'pdfs') # Destination directory within _static
images_dir = os.path.join(script_dir, "images") # Path to the images directory

Expand Down
6 changes: 3 additions & 3 deletions doc/nrf-bm/includes/softdevice_flash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ To flash the S115 SoftDevice binary to your device, open the terminal and run th

.. code-block:: console

nrfutil device program --firmware subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex
nrfutil device program --firmware components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex

.. group-tab:: nRF54L10

.. code-block:: console

nrfutil device program --firmware subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex
nrfutil device program --firmware components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex

.. group-tab:: nRF54L05

.. code-block:: console

nrfutil device program --firmware subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex
nrfutil device program --firmware components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex

.. note::
Keep in mind that the flashed SoftDevice variant must be in sync with the board target that you are planning to use in the build configuration of the sample.
Expand Down
5 changes: 3 additions & 2 deletions subsys/softdevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
if (CONFIG_SOFTDEVICE_S115)
zephyr_include_directories(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/)

Copy link
Contributor

@eivindj-nordic eivindj-nordic Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be moved to components/softdevice as well?
(together with Kconfig file)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep it outside of the components directory since all of it will be replaced on each update of the SoftDevice.

That said, there might be a better place to put the files than subsys/softdevice. I just kept them where they were for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why replace the entire directory? Is it not enough to touch the componentes/softdevice/s115 directory? At least you should not touch more than componentes/softdevice, but if we stick to touch only the variant folders we can keep the Kconfig and CMake files here as well. I find it a bit strange and less intuitive to the user that those are in subsys while the rest is in components.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will just replace components/softdevice, other components should not be touched. I want to replace the entire folder in case of future variants in addition to s115. It is possible to work around additional files in components/softdevice that shouldnt be replaced, replacing the whole thing is just simpler.

My idea for the components folder was that it is just a copy of external components and anything sdk-nrf-bm specific should be outside of it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a workaround to not replace CMakeLists.txt or Kconfig files for https://github.com/nrfconnect/sdk-nrfxlib/blob/main/softdevice_controller/CMakeLists.txt, so it is possible to keep the files in components/softdevice.

if(CONFIG_SOFTDEVICE_S115)
zephyr_include_directories("${ZEPHYR_NRF_BM_MODULE_DIR}/components/softdevice/${CONFIG_SOFTDEVICE_VARIANT_STR}/${CONFIG_SOFTDEVICE_VARIANT_STR}_API/include")
endif()
4 changes: 4 additions & 0 deletions subsys/softdevice/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ config SOFTDEVICE_S115
select SOFTDEVICE_DATA_LENGTH_UPDATE
default y

config SOFTDEVICE_VARIANT_STR
string
default "s115" if SOFTDEVICE_S115

endif

endmenu
Expand Down
6 changes: 3 additions & 3 deletions sysbuild/Kconfig.bm
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ endchoice

config SOFTDEVICE_FILE
string
default "$(ZEPHYR_NRF_BM_MODULE_DIR)/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex" if SOFTDEVICE_S115 && SOC_NRF54L05
default "$(ZEPHYR_NRF_BM_MODULE_DIR)/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex" if SOFTDEVICE_S115 && SOC_NRF54L10
default "$(ZEPHYR_NRF_BM_MODULE_DIR)/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex" if SOFTDEVICE_S115 && SOC_NRF54L15
default "$(ZEPHYR_NRF_BM_MODULE_DIR)/components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex" if SOFTDEVICE_S115 && SOC_NRF54L05
default "$(ZEPHYR_NRF_BM_MODULE_DIR)/components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex" if SOFTDEVICE_S115 && SOC_NRF54L10
default "$(ZEPHYR_NRF_BM_MODULE_DIR)/components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex" if SOFTDEVICE_S115 && SOC_NRF54L15
help
Specifies the path to the softdevice hex file.

Expand Down
13 changes: 8 additions & 5 deletions tests/lib/ble_adv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

project(unit_test_ble_adv)

cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble.h)
cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble_gatts.h
set(SOFTDEVICE_VARIANT "s115")
set(SOFTDEVICE_INCLUDE_DIR "${ZEPHYR_NRF_BM_MODULE_DIR}/components/softdevice/${SOFTDEVICE_VARIANT}/${SOFTDEVICE_VARIANT}_API/include")

cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble.h)
cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble_gatts.h
WORD_EXCLUDE
"__STATIC_INLINE")
cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble_gattc.h
cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble_gattc.h
WORD_EXCLUDE
"__STATIC_INLINE")
cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble_gap.h)
cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble_gap.h)

add_compile_definitions(
SVCALL_AS_NORMAL_FUNCTION=1
Expand Down Expand Up @@ -48,7 +51,7 @@ test_runner_generate(src/unity_test.c)
target_sources(app PRIVATE src/unity_test.c)

target_include_directories(app PRIVATE ${ZEPHYR_NRF_BM_MODULE_DIR}/include)
target_include_directories(app PRIVATE ${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115)
target_include_directories(app PRIVATE ${SOFTDEVICE_INCLUDE_DIR})
target_include_directories(app PRIVATE ${ZEPHYR_HAL_NORDIC_MODULE_DIR}/nrfx/mdk)
target_include_directories(app PRIVATE ${ZEPHYR_CMSIS_MODULE_DIR}/CMSIS/Core/Include)

Expand Down
11 changes: 7 additions & 4 deletions tests/lib/ble_qwr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ add_compile_definitions(
CONFIG_BLE_QWR_MAX_ATTR=2
)

cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble.h)
cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble_gatts.h
set(SOFTDEVICE_VARIANT "s115")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and should not duplicate variables unless there's a good reason

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kconfigs dont work for unittests since the dependencies are not satisfied. Kept it as is

set(SOFTDEVICE_INCLUDE_DIR "${ZEPHYR_NRF_BM_MODULE_DIR}/components/softdevice/${SOFTDEVICE_VARIANT}/${SOFTDEVICE_VARIANT}_API/include")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it be easier to put API to components/softdevice/s115/API

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to know the variant to choose the correct include folder, so no big difference. But it might look nicer to not have the variant repeated as many times.


cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble.h)
cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble_gatts.h
WORD_EXCLUDE
"__STATIC_INLINE")
cmock_handle(${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115/ble_gattc.h
cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble_gattc.h
WORD_EXCLUDE
"__STATIC_INLINE")

target_include_directories(app PRIVATE ${ZEPHYR_NRF_BM_MODULE_DIR}/include)
target_include_directories(app PRIVATE ${ZEPHYR_NRF_BM_MODULE_DIR}/include/s115)
target_include_directories(app PRIVATE ${SOFTDEVICE_INCLUDE_DIR})
target_include_directories(app PRIVATE ${ZEPHYR_HAL_NORDIC_MODULE_DIR}/nrfx/mdk)
target_include_directories(app PRIVATE ${ZEPHYR_CMSIS_MODULE_DIR}/CMSIS/Core/Include)

Expand Down