diff --git a/.checkpatch.conf b/.checkpatch.conf index 50e60a6bd9..f193ac065b 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -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 diff --git a/CODEOWNERS b/CODEOWNERS index 618a174541..73f066d18c 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -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 @@ -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 @@ -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 diff --git a/doc/s115/s115_9.0.0-1.prototype_release-notes.rst b/components/softdevice/s115/doc/s115_9.0.0-1.prototype_release-notes.rst similarity index 100% rename from doc/s115/s115_9.0.0-1.prototype_release-notes.rst rename to components/softdevice/s115/doc/s115_9.0.0-1.prototype_release-notes.rst diff --git a/doc/s115/s115_9.0.0-2.prototype_release-notes.rst b/components/softdevice/s115/doc/s115_9.0.0-2.prototype_release-notes.rst similarity index 100% rename from doc/s115/s115_9.0.0-2.prototype_release-notes.rst rename to components/softdevice/s115/doc/s115_9.0.0-2.prototype_release-notes.rst diff --git a/doc/s115/s115_9.0.0-3.prototype_migration-document.main.rst b/components/softdevice/s115/doc/s115_9.0.0-3.prototype_migration-document.main.rst similarity index 100% rename from doc/s115/s115_9.0.0-3.prototype_migration-document.main.rst rename to components/softdevice/s115/doc/s115_9.0.0-3.prototype_migration-document.main.rst diff --git a/doc/s115/s115_9.0.0-3.prototype_migration-document.rst b/components/softdevice/s115/doc/s115_9.0.0-3.prototype_migration-document.rst similarity index 100% rename from doc/s115/s115_9.0.0-3.prototype_migration-document.rst rename to components/softdevice/s115/doc/s115_9.0.0-3.prototype_migration-document.rst diff --git a/doc/s115/s115_9.0.0-3.prototype_release-notes.main.rst b/components/softdevice/s115/doc/s115_9.0.0-3.prototype_release-notes.main.rst similarity index 100% rename from doc/s115/s115_9.0.0-3.prototype_release-notes.main.rst rename to components/softdevice/s115/doc/s115_9.0.0-3.prototype_release-notes.main.rst diff --git a/doc/s115/s115_9.0.0-3.prototype_release-notes.rst b/components/softdevice/s115/doc/s115_9.0.0-3.prototype_release-notes.rst similarity index 100% rename from doc/s115/s115_9.0.0-3.prototype_release-notes.rst rename to components/softdevice/s115/doc/s115_9.0.0-3.prototype_release-notes.rst diff --git a/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_license-agreement.txt b/components/softdevice/s115/s115_9.0.0-3.prototype_license-agreement.txt similarity index 100% rename from subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_license-agreement.txt rename to components/softdevice/s115/s115_9.0.0-3.prototype_license-agreement.txt diff --git a/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_migration-document.pdf b/components/softdevice/s115/s115_9.0.0-3.prototype_migration-document.pdf similarity index 100% rename from subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_migration-document.pdf rename to components/softdevice/s115/s115_9.0.0-3.prototype_migration-document.pdf diff --git a/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex b/components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex similarity index 100% rename from subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex rename to components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l05_softdevice.hex diff --git a/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex b/components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex similarity index 100% rename from subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex rename to components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l10_softdevice.hex diff --git a/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex b/components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex similarity index 100% rename from subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex rename to components/softdevice/s115/s115_9.0.0-3.prototype_nrf54l15_softdevice.hex diff --git a/subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_release-notes.pdf b/components/softdevice/s115/s115_9.0.0-3.prototype_release-notes.pdf similarity index 100% rename from subsys/softdevice/hex/s115/s115_9.0.0-3.prototype_release-notes.pdf rename to components/softdevice/s115/s115_9.0.0-3.prototype_release-notes.pdf diff --git a/doc/s115/ble_api.dox b/components/softdevice/s115/s115_API/doc/ble_api.dox similarity index 100% rename from doc/s115/ble_api.dox rename to components/softdevice/s115/s115_API/doc/ble_api.dox diff --git a/include/s115/ble.h b/components/softdevice/s115/s115_API/include/ble.h similarity index 100% rename from include/s115/ble.h rename to components/softdevice/s115/s115_API/include/ble.h diff --git a/include/s115/ble_err.h b/components/softdevice/s115/s115_API/include/ble_err.h similarity index 100% rename from include/s115/ble_err.h rename to components/softdevice/s115/s115_API/include/ble_err.h diff --git a/include/s115/ble_gap.h b/components/softdevice/s115/s115_API/include/ble_gap.h similarity index 100% rename from include/s115/ble_gap.h rename to components/softdevice/s115/s115_API/include/ble_gap.h diff --git a/include/s115/ble_gatt.h b/components/softdevice/s115/s115_API/include/ble_gatt.h similarity index 100% rename from include/s115/ble_gatt.h rename to components/softdevice/s115/s115_API/include/ble_gatt.h diff --git a/include/s115/ble_gattc.h b/components/softdevice/s115/s115_API/include/ble_gattc.h similarity index 100% rename from include/s115/ble_gattc.h rename to components/softdevice/s115/s115_API/include/ble_gattc.h diff --git a/include/s115/ble_gatts.h b/components/softdevice/s115/s115_API/include/ble_gatts.h similarity index 100% rename from include/s115/ble_gatts.h rename to components/softdevice/s115/s115_API/include/ble_gatts.h diff --git a/include/s115/ble_hci.h b/components/softdevice/s115/s115_API/include/ble_hci.h similarity index 100% rename from include/s115/ble_hci.h rename to components/softdevice/s115/s115_API/include/ble_hci.h diff --git a/include/s115/ble_ranges.h b/components/softdevice/s115/s115_API/include/ble_ranges.h similarity index 100% rename from include/s115/ble_ranges.h rename to components/softdevice/s115/s115_API/include/ble_ranges.h diff --git a/include/s115/ble_types.h b/components/softdevice/s115/s115_API/include/ble_types.h similarity index 100% rename from include/s115/ble_types.h rename to components/softdevice/s115/s115_API/include/ble_types.h diff --git a/include/s115/nrf_error.h b/components/softdevice/s115/s115_API/include/nrf_error.h similarity index 100% rename from include/s115/nrf_error.h rename to components/softdevice/s115/s115_API/include/nrf_error.h diff --git a/include/s115/nrf_error_sdm.h b/components/softdevice/s115/s115_API/include/nrf_error_sdm.h similarity index 100% rename from include/s115/nrf_error_sdm.h rename to components/softdevice/s115/s115_API/include/nrf_error_sdm.h diff --git a/include/s115/nrf_error_soc.h b/components/softdevice/s115/s115_API/include/nrf_error_soc.h similarity index 100% rename from include/s115/nrf_error_soc.h rename to components/softdevice/s115/s115_API/include/nrf_error_soc.h diff --git a/include/s115/nrf_sd_def.h b/components/softdevice/s115/s115_API/include/nrf_sd_def.h similarity index 100% rename from include/s115/nrf_sd_def.h rename to components/softdevice/s115/s115_API/include/nrf_sd_def.h diff --git a/include/s115/nrf_sd_isr.h b/components/softdevice/s115/s115_API/include/nrf_sd_isr.h similarity index 100% rename from include/s115/nrf_sd_isr.h rename to components/softdevice/s115/s115_API/include/nrf_sd_isr.h diff --git a/include/s115/nrf_sdm.h b/components/softdevice/s115/s115_API/include/nrf_sdm.h similarity index 100% rename from include/s115/nrf_sdm.h rename to components/softdevice/s115/s115_API/include/nrf_sdm.h diff --git a/include/s115/nrf_soc.h b/components/softdevice/s115/s115_API/include/nrf_soc.h similarity index 100% rename from include/s115/nrf_soc.h rename to components/softdevice/s115/s115_API/include/nrf_soc.h diff --git a/include/s115/nrf_svc.h b/components/softdevice/s115/s115_API/include/nrf_svc.h similarity index 100% rename from include/s115/nrf_svc.h rename to components/softdevice/s115/s115_API/include/nrf_svc.h diff --git a/doc/nrf-bm/gen_docs.py b/doc/nrf-bm/gen_docs.py index efbd876569..21c600c0e4 100644 --- a/doc/nrf-bm/gen_docs.py +++ b/doc/nrf-bm/gen_docs.py @@ -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 diff --git a/doc/nrf-bm/includes/softdevice_flash.txt b/doc/nrf-bm/includes/softdevice_flash.txt index bf9ba31d59..22dda1b254 100644 --- a/doc/nrf-bm/includes/softdevice_flash.txt +++ b/doc/nrf-bm/includes/softdevice_flash.txt @@ -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. diff --git a/subsys/softdevice/CMakeLists.txt b/subsys/softdevice/CMakeLists.txt index 7a52984340..44164fefb9 100644 --- a/subsys/softdevice/CMakeLists.txt +++ b/subsys/softdevice/CMakeLists.txt @@ -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/) + +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() diff --git a/subsys/softdevice/Kconfig b/subsys/softdevice/Kconfig index 94c5290eb8..d64b95b1a1 100644 --- a/subsys/softdevice/Kconfig +++ b/subsys/softdevice/Kconfig @@ -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 diff --git a/sysbuild/Kconfig.bm b/sysbuild/Kconfig.bm index 3ff8714ae7..88bfe6e3ce 100644 --- a/sysbuild/Kconfig.bm +++ b/sysbuild/Kconfig.bm @@ -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. diff --git a/tests/lib/ble_adv/CMakeLists.txt b/tests/lib/ble_adv/CMakeLists.txt index d67f68ba93..7aa79bd49e 100644 --- a/tests/lib/ble_adv/CMakeLists.txt +++ b/tests/lib/ble_adv/CMakeLists.txt @@ -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 @@ -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) diff --git a/tests/lib/ble_qwr/CMakeLists.txt b/tests/lib/ble_qwr/CMakeLists.txt index a0be70c567..1347b178ee 100644 --- a/tests/lib/ble_qwr/CMakeLists.txt +++ b/tests/lib/ble_qwr/CMakeLists.txt @@ -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") +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") 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)