nRF54L15 Bare Metal project for BLE Peripheral with GAP and GATT Features.

Hello Nordic Team,
I have referred this post A technical dive into the nRF Connect SDK Bare Metal optionand am aiming to create an empty bare metal project on nrf54L15 for BLE peripheral with GAP read, write, notification and idicate functions. 

I am currently able to create an empty project, add LEDs and run but adding BLE functions is failing in the build generation stage. 

- Can you point to me a step by step guide to create an empty project and add BLE advertisement feature?

- Is there an usage guide for the BLE, RFC and peripheral drivers?
 

 Let me know if you need further details. Appreciate the responses. 

Best regards
Sarma 

Parents Reply Children
  • Hello Simon,
    I have referred these resources. I want to define custom GATT services in my device. I have started with creating an empty baremetal project, bringing up the LEDs on the project and then adding BLE services to this project. 

    LEDs are added. For bringing up BLE stack, I have updated the prj.conf and it looks as follows:


    # for logs, UART and LEDs
    CONFIG_LOG=y
    CONFIG_LOG_BACKEND_BM_UARTE=y
    CONFIG_CLOCK_CONTROL=y

    # #for BLE
    CONFIG_SOFTDEVICE=y
    CONFIG_NRF_SDH=y
    CONFIG_BT=y
    CONFIG_NRF_SECURITY=y


    # SoftDevice
    CONFIG_NRF_SDH=y
    CONFIG_NRF_SDH_BLE=y

    # BLE
    CONFIG_BT=y
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="BM_Voyager"

    # for clock settings
    # Enable and configure clock control
    CONFIG_CLOCK_CONTROL=y
    CONFIG_CLOCK_CONTROL_NRF=y

    My project generation is failing with this error: 

    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/b8b84efebd/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/ncs/nrf-bm/v0.8.0/zephyr/.cache
    -- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
    -- Board: bm_nrf54l15dk, qualifiers: nrf54l15/cpuapp/s115_softdevice
    Parsing C:/ncs/nrf-bm/v0.8.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/Work/bm_fw/bm_voyager/build/_sysbuild/empty.conf'
    Merged configuration 'C:/Work/bm_fw/bm_voyager/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/Work/bm_fw/bm_voyager/build/zephyr/.config'
    Kconfig header saved to 'C:/Work/bm_fw/bm_voyager/build/_sysbuild/autoconf.h'
    --
    ********************************
    * Running CMake for bm_voyager *
    ********************************

    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Work/bm_fw/bm_voyager
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/b8b84efebd/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/ncs/nrf-bm/v0.8.0/zephyr/.cache
    -- Zephyr version: 4.1.99 (C:/ncs/nrf-bm/v0.8.0/zephyr)
    -- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
    -- Board: bm_nrf54l15dk, qualifiers: nrf54l15/cpuapp/s115_softdevice
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b8b84efebd/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b8b84efebd/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/b8b84efebd/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/nrf-bm/v0.8.0/nrf-bm/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts
    -- Generated zephyr.dts: C:/Work/bm_fw/bm_voyager/build/bm_voyager/zephyr/zephyr.dts
    -- Generated pickled edt: C:/Work/bm_fw/bm_voyager/build/bm_voyager/zephyr/edt.pickle
    -- Generated devicetree_generated.h: C:/Work/bm_fw/bm_voyager/build/bm_voyager/zephyr/include/generated/zephyr/devicetree_generated.h

    warning: CLOCK_CONTROL_NRF (defined at drivers/clock_control/Kconfig.nrf:13) was assigned the value
    'y' but got the value 'n'. Check these unsatisfied dependencies: DT_HAS_NORDIC_NRF_CLOCK_ENABLED
    (=n). See docs.zephyrproject.org/.../kconfig.html and/or look up
    CLOCK_CONTROL_NRF in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.


    Parsing C:/ncs/nrf-bm/v0.8.0/zephyr/Kconfig
    warning: default value 10 on BT_LONG_WQ_PRIO (defined at C:/ncs/nrf-bm/v0.8.0/zephyr/subsys/bluetooth/host/Kconfig:25, subsys/bluetooth\host/Kconfig:25) clamped to 0 due to being outside the active ra
    nge ([0, 0])Loaded configuration 'C:/ncs/nrf-bm/v0.8.0/nrf-bm/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_defconfig'
    Merged configuration 'C:/Work/bm_fw/bm_voyager/prj.conf'
    Merged configuration 'C:/Work/bm_fw/bm_voyager/build/bm_voyager/zephyr/.config.sysbuild'


    error: Aborting due to Kconfig warnings

    CMake Error at C:/ncs/nrf-bm/v0.8.0/zephyr/cmake/modules/kconfig.cmake:377 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    C:/ncs/nrf-bm/v0.8.0/nrf/cmake/modules/kconfig.cmake:83 (include)
    C:/ncs/nrf-bm/v0.8.0/zephyr/cmake/modules/zephyr_default.cmake:131 (include)
    C:/ncs/nrf-bm/v0.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/ncs/nrf-bm/v0.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:2 (find_package)

    -- Configuring incomplete, errors occurred!

    CMake Error at cmake/modules/sysbuild_extensions.cmake:530 (message):
    CMake configure failed for Zephyr project: bm_voyager

    Location: C:/Work/bm_fw/bm_voyager
    Call Stack (most recent call first):
    cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
    cmake/modules/sysbuild_default.cmake:21 (include)
    C:/ncs/nrf-bm/v0.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
    C:/ncs/nrf-bm/v0.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    C:/ncs/nrf-bm/v0.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
    template/CMakeLists.txt:10 (find_package)


    -- Configuring incomplete, errors occurred!
    See also "C:/Work/bm_fw/bm_voyager/build/CMakeFiles/CMakeOutput.log".
    ←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b8b84efebd\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b8b84efebd/opt/bin/python.exe '-Bc:\Work\bm_fw\bm_voyager\build' -GNinj
    a -DBOARD=bm_nrf54l15dk/nrf54l15/cpuapp/s115_softdevice -DCONF_FILE=prj.conf '-SC:\ncs\nrf-bm\v0.8.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\Work\bm_fw\bm_voyager'

    I am looking for a refernece bring up a baremetal project by configuring the prj.conf and cMakeLists.txt. Hope this helps. 

    Regards

    CGS

Related