Try to build peripheral-uart example for nrf54L15-DK without west

Hello at all,

I try to compile the example peripheral_uart for the nrf54L15-DK. The goal is
to compile without west.
My directory structure:

example3
+---boards
+---build
+---modules
+---nrf
+---nrfxlib
+---src
+---zephyr


where I copied everything from the ncs 3.0.2 install. The files below src and the files in the exmaple3 main directory are taken from the  samples/bluetooth/peripheral_uart, to be modified later and evolve towards the application I want to write. This idea comes from here:
devzone.nordicsemi.com/.../building-a-minimal-nordic-connect-sdk-without-west-this-is-not-a-question

The CMakeLists has the following content:

cmake_minimum_required(VERSION 3.20.0)
set(BOARD nrf54l15dk/nrf54l15/cpuapp)
set(ZEPHYR_BASE ${CMAKE_CURRENT_LIST_DIR}/zephyr)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CONF_FILE ${CMAKE_CURRENT_LIST_DIR}/prj_minimal.conf)
find_package(Zephyr REQUIRED HINTS ${ZEPHYR_BASE})

project(my_example)

target_sources(app PRIVATE
  src/main.c
)



I exported the env variables

export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/usr/local/arm-gnu-toolchain-12.2.mpacbti-rel1-x86_64-arm-none-eabi



Inside the build directory, I call cmake and get the output:

Loading Zephyr default modules (Zephyr base (cached)).
-- Application: /home/dirk/projekte/mcuports/nrf54/example3
-- CMake version: 3.25.1
-- Found Python3: /home/dirk/.local/venv/bin/python (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /home/dirk/.cache/zephyr
-- Zephyr version: 4.0.99 (/home/dirk/projekte/mcuports/nrf54/example3/zephyr)
-- Board: nrf54l15dk, qualifiers: nrf54l15/cpuapp
-- Found toolchain: gnuarmemb (/usr/local/arm-gnu-toolchain-12.2.mpacbti-rel1-x86_64-arm-none-eabi)
-- Found Dtc: /usr/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /home/dirk/projekte/mcuports/nrf54/example3/zephyr/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l15_cpuapp.dts
-- Found devicetree overlay: /home/dirk/projekte/mcuports/nrf54/example3/boards/nrf54l15dk_nrf54l15_cpuapp.overlay
-- Generated zephyr.dts: /home/dirk/projekte/mcuports/nrf54/example3/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/dirk/projekte/mcuports/nrf54/example3/build/zephyr/edt.pickle
-- Generated zephyr.dts: /home/dirk/projekte/mcuports/nrf54/example3/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/dirk/projekte/mcuports/nrf54/example3/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/dirk/projekte/mcuports/nrf54/example3/build/zephyr/dts.cmake

warning: SPI (defined at soc/nxp/kinetis/k6x/Kconfig.defconfig:19,
soc/nxp/kinetis/kwx/Kconfig.defconfig:12, soc/gaisler/gr716a/Kconfig.defconfig:17,
drivers/spi/Kconfig:9) was assigned the value 'n' but got the value 'y'. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SPI and/or look up SPI 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.


warning: NRFX_UARTE0 (defined at modules/hal_nordic/nrfx/Kconfig:1033,
drivers/serial/Kconfig.nrfx_uart_instance:32) was assigned the value 'y' but got the value 'n'.
Check these unsatisfied dependencies: (HAS_HW_NRF_UART0 || HAS_HW_NRF_UARTE0) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_UARTE0 and/or look up NRFX_UARTE0 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.


warning: THREAD_STACK_INFO (defined at kernel/Kconfig:189) was assigned the value 'n' but got the
value 'y'. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_THREAD_STACK_INFO and/or
look up THREAD_STACK_INFO 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.


/home/dirk/projekte/mcuports/nrf54/example3/prj_minimal.conf:22: warning: attempt to assign the value 'y' to the undefined symbol BT_NUS

/home/dirk/projekte/mcuports/nrf54/example3/prj_minimal.conf:31: warning: attempt to assign the value 'y' to the undefined symbol DK_LIBRARY

/home/dirk/projekte/mcuports/nrf54/example3/prj_minimal.conf:51: warning: attempt to assign the value 'n' to the undefined symbol NCS_BOOT_BANNER

/home/dirk/projekte/mcuports/nrf54/example3/prj_minimal.conf:94: warning: attempt to assign the value '256' to the undefined symbol MPSL_WORK_STACK_SIZE

warning: HAS_NORDIC_DRIVERS (defined at modules/hal_nordic/Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF54LX (defined at soc/nordic/Kconfig.soc:48, soc/nordic/nrf54l/Kconfig:6), with value y, direct dependencies y (value: y), and select condition SOC_FAMILY_NORDIC_NRF (value: y)

warning: MBEDTLS (defined at modules/mbedtls/Kconfig:19) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO (defined at subsys/bluetooth/host/Kconfig:172), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition !BUILD_WITH_TFM && BT_HCI_HOST && BT_HCI && BT (value: y)
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition !BUILD_WITH_TFM && BT_HCI_HOST && BT_HCI && BT (value: y)
 - BT_CRYPTO (defined at subsys/bluetooth/crypto/Kconfig:4), with value y, direct dependencies BT_HCI && BT (value: y), and select condition !BUILD_WITH_TFM && BT_HCI && BT (value: y)

warning: HAS_CMSIS_CORE (defined at modules/cmsis/Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - CPU_CORTEX_M (defined at arch/arm/core/Kconfig:6), with value y, direct dependencies ARM (value: y), and select condition ARM (value: y)

warning: CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK (defined at soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig:8, modules/cmsis/Kconfig:31) has direct dependencies (SOC_SERIES_IMXRT6XX && SOC_FAMILY_NXP_IMXRT) || (HAS_CMSIS_CORE && 0) with value n, but is currently being y-selected by the following symbols:
 - SOC_FAMILY_NORDIC_NRF (defined at soc/nordic/Kconfig.soc:19, soc/nordic/Kconfig:9), with value y, direct dependencies y (value: y), and select condition ARM (value: y)

warning: HAS_NRFX (defined at modules/hal_nordic/nrfx/Kconfig:4) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF54LX (defined at soc/nordic/Kconfig.soc:48, soc/nordic/nrf54l/Kconfig:6), with value y, direct dependencies y (value: y), and select condition SOC_FAMILY_NORDIC_NRF (value: y)

warning: MBEDTLS_PSA_CRYPTO_C (defined at modules/mbedtls/Kconfig.tls-generic:601) has direct dependencies !BUILD_WITH_TFM && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO (defined at subsys/bluetooth/host/Kconfig:172), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition !BUILD_WITH_TFM && BT_HCI_HOST && BT_HCI && BT (value: y)
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition !BUILD_WITH_TFM && BT_HCI_HOST && BT_HCI && BT (value: y)
 - BT_CRYPTO (defined at subsys/bluetooth/crypto/Kconfig:4), with value y, direct dependencies BT_HCI && BT (value: y), and select condition !BUILD_WITH_TFM && BT_HCI && BT (value: y)

warning: NRFX_CLOCK (defined at modules/hal_nordic/nrfx/Kconfig:16) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF (defined at drivers/clock_control/Kconfig.nrf:13), with value y, direct dependencies DT_HAS_NORDIC_NRF_CLOCK_ENABLED && CLOCK_CONTROL (value: y), and select condition !CLOCK_CONTROL_NRF_FORCE_ALT && DT_HAS_NORDIC_NRF_CLOCK_ENABLED && CLOCK_CONTROL (value: y)

warning: NRFX_GRTC (defined at modules/hal_nordic/nrfx/Kconfig:215) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - NRF_GRTC_TIMER (defined at drivers/timer/Kconfig.nrf_grtc:4), with value y, direct dependencies DT_HAS_NORDIC_NRF_GRTC_ENABLED && SYS_CLOCK_EXISTS (value: y), and select condition DT_HAS_NORDIC_NRF_GRTC_ENABLED && SYS_CLOCK_EXISTS (value: y)

warning: NRFX_SPIM00 (defined at modules/hal_nordic/nrfx/Kconfig:517) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - SPI_NRFX_SPIM (defined at drivers/spi/Kconfig.nrfx:22), with value y, direct dependencies DT_HAS_NORDIC_NRF_SPIM_ENABLED && SPI_NRFX && SPI (value: y), and select condition HAS_HW_NRF_SPIM00 && DT_HAS_NORDIC_NRF_SPIM_ENABLED && SPI_NRFX && SPI (value: y)

warning: NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED (defined at modules/hal_nordic/nrfx/Kconfig:20) has direct dependencies NRFX_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF_K32SRC_XTAL (defined at drivers/clock_control/Kconfig.nrf:36), with value y, direct dependencies <choice CLOCK_CONTROL_NRF_SOURCE> (value: y), and select condition !SOC_SERIES_BSIM_NRFXX && !CLOCK_CONTROL_NRF_FORCE_ALT && <choice CLOCK_CONTROL_NRF_SOURCE> (value: y)

warning: NRFX_RRAMC (defined at modules/hal_nordic/nrfx/Kconfig:435) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_FLASH_NRF_RRAM (defined at drivers/flash/Kconfig.nrf_rram:7), with value y, direct dependencies DT_HAS_NORDIC_RRAM_CONTROLLER_ENABLED && FLASH (value: y), and select condition !BUILD_WITH_TFM && DT_HAS_NORDIC_RRAM_CONTROLLER_ENABLED && FLASH (value: y)

warning: PSA_WANT_ALG_CMAC (defined at modules/mbedtls/Kconfig.psa.auto:35) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_CRYPTO (defined at subsys/bluetooth/crypto/Kconfig:4), with value y, direct dependencies BT_HCI && BT (value: y), and select condition BT_HCI && BT (value: y)

warning: PSA_WANT_ALG_ECB_NO_PADDING (defined at modules/mbedtls/Kconfig.psa.auto:51) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO (defined at subsys/bluetooth/host/Kconfig:172), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)
 - BT_CRYPTO (defined at subsys/bluetooth/crypto/Kconfig:4), with value y, direct dependencies BT_HCI && BT (value: y), and select condition BT_HCI && BT (value: y)

warning: PSA_WANT_ALG_ECDH (defined at modules/mbedtls/Kconfig.psa.auto:55) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_ALG_HMAC (defined at modules/mbedtls/Kconfig.psa.auto:84) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO_PRNG (defined at subsys/bluetooth/host/Kconfig:183), with value y, direct dependencies BT_HOST_CRYPTO && BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HOST_CRYPTO && BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_ALG_SHA_256 (defined at modules/mbedtls/Kconfig.psa.auto:132) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO_PRNG (defined at subsys/bluetooth/host/Kconfig:183), with value y, direct dependencies BT_HOST_CRYPTO && BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HOST_CRYPTO && BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_ECC_SECP_R1_256 (defined at modules/mbedtls/Kconfig.psa.auto:216) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_KEY_TYPE_HMAC (defined at modules/mbedtls/Kconfig.psa.auto:240) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO_PRNG (defined at subsys/bluetooth/host/Kconfig:183), with value y, direct dependencies BT_HOST_CRYPTO && BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HOST_CRYPTO && BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_KEY_TYPE_AES (defined at modules/mbedtls/Kconfig.psa.auto:244) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_HOST_CRYPTO (defined at subsys/bluetooth/host/Kconfig:172), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)
 - BT_CRYPTO (defined at subsys/bluetooth/crypto/Kconfig:4), with value y, direct dependencies BT_HCI && BT (value: y), and select condition BT_HCI && BT (value: y)

warning: PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT (defined at modules/mbedtls/Kconfig.psa.auto:266) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT (defined at modules/mbedtls/Kconfig.psa.auto:271) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)

warning: PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE (defined at modules/mbedtls/Kconfig.psa.auto:276) has direct dependencies PSA_CRYPTO_CLIENT && 0 with value n, but is currently being y-selected by the following symbols:
 - BT_ECC (defined at subsys/bluetooth/host/Kconfig:999), with value y, direct dependencies BT_HCI_HOST && BT_HCI && BT (value: y), and select condition BT_HCI_HOST && BT_HCI && BT (value: y)
Parsing /home/dirk/projekte/mcuports/nrf54/example3/Kconfig
Loaded configuration '/home/dirk/projekte/mcuports/nrf54/example3/zephyr/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l15_cpuapp_defconfig'
Merged configuration '/home/dirk/projekte/mcuports/nrf54/example3/prj_minimal.conf'

error: Aborting due to Kconfig warnings

CMake Error at zephyr/cmake/modules/kconfig.cmake:396 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  nrf/cmake/modules/kconfig.cmake:36 (include)
  zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
  CMakeLists.txt:21 (find_package)


-- Configuring incomplete, errors occurred!



Looking at the first problems (SPI and NRFX_UARTE0), it looks like the board selection and the project configuration is not propagated through the zephyr scripts in the correct way.
I know that there should be -DZEPHYR_MODULES=module1;module2; in some cases,
but is this the case here and which modules?
I assume the following problems have the same root cause.

Kind regards,

Dirk.

Parents
  • Hello Drik,

    The build error and warnings are related mostly to the configurations. That means you are trying to set configuration options that are not available for your board or SDK version.

    These warnings might be more frequent if you edit the Kconfig files manually. The Kconfig GUI and other Kconfig tools give you an overview over dependencies, which allows you to see which Kconfig options have been overridden and why before you build the project.

    How does your prj_minimal.conf look like?

  • I took the prj_minimal.conf from the example:

    #
    # Copyright (c) 2021 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Enable the UART driver
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_SERIAL=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=1536
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_MAX_PAIRED=1
    
    # Enable the NUS service
    CONFIG_BT_NUS=y
    
    # Enable bonding
    CONFIG_BT_SETTINGS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    
    # Enable DK LED and Buttons library
    CONFIG_DK_LIBRARY=y
    
    # Drivers and peripherals
    CONFIG_I2C=n
    CONFIG_WATCHDOG=n
    CONFIG_SPI=n
    CONFIG_GPIO=n
    
    # Power management
    
    # Interrupts
    CONFIG_DYNAMIC_INTERRUPTS=n
    CONFIG_IRQ_OFFLOAD=n
    
    # Memory protection
    CONFIG_THREAD_STACK_INFO=n
    CONFIG_THREAD_CUSTOM_DATA=n
    CONFIG_FPU=n
    
    # Boot
    CONFIG_NCS_BOOT_BANNER=n
    CONFIG_BOOT_BANNER=n
    CONFIG_BOOT_DELAY=0
    
    # Console
    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    CONFIG_STDOUT_CONSOLE=n
    CONFIG_PRINTK=n
    CONFIG_EARLY_CONSOLE=n
    
    # Build
    CONFIG_SIZE_OPTIMIZATIONS=y
    
    # ARM
    CONFIG_ARM_MPU=n
    
    # In order to correctly tune the stack sizes for the threads the following
    # Configurations can enabled to print the current use:
    #CONFIG_THREAD_NAME=y
    #CONFIG_THREAD_ANALYZER=y
    #CONFIG_THREAD_ANALYZER_AUTO=y
    #CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
    #CONFIG_THREAD_ANALYZER_USE_PRINTK=y
    #CONFIG_CONSOLE=y
    #CONFIG_UART_CONSOLE=y
    #CONFIG_SERIAL=y
    #CONFIG_PRINTK=y
    
    # Example output of thread analyzer
    #SDC RX              : unused 800 usage 224 / 1024 (21 %)
    #BT ECC              : unused 216 usage 888 / 1104 (80 %)
    #BT RX               : unused 1736 usage 464 / 2200 (21 %)
    #BT TX               : unused 1008 usage 528 / 1536 (34 %)
    #ble_write_thread_id : unused 688 usage 336 / 1024 (32 %)
    #sysworkq            : unused 1912 usage 136 / 2048 (6 %)
    #MPSL signal         : unused 928 usage 96 / 1024 (9 %)
    #idle 00             : unused 224 usage 96 / 320 (30 %)
    #main                : unused 568 usage 456 / 1024 (44 %)
    CONFIG_BT_RX_STACK_SIZE=1024
    CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
    CONFIG_BT_HCI_TX_STACK_SIZE=640
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
    CONFIG_MPSL_WORK_STACK_SIZE=256
    CONFIG_IDLE_STACK_SIZE=128
    CONFIG_ISR_STACK_SIZE=1024
    CONFIG_BT_NUS_THREAD_STACK_SIZE=512
    
    # Disable features not needed
    CONFIG_TIMESLICING=n
    CONFIG_COMMON_LIBC_MALLOC=n
    CONFIG_LOG=n
    CONFIG_LOG_BACKEND_RTT=n
    CONFIG_ASSERT=n
    
    # Disable Bluetooth features not needed
    CONFIG_BT_DEBUG_NONE=y
    CONFIG_BT_ASSERT=n
    CONFIG_BT_DATA_LEN_UPDATE=n
    CONFIG_BT_PHY_UPDATE=n
    CONFIG_BT_GATT_CACHING=n
    CONFIG_BT_GATT_SERVICE_CHANGED=n
    CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
    CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
    CONFIG_BT_HCI_VS=n
    
    # Disable Bluetooth controller features not needed
    CONFIG_BT_CTLR_PRIVACY=n
    CONFIG_BT_CTLR_PHY_2M=n
    
    # Reduce Bluetooth buffers
    CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=1
    CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
    CONFIG_BT_BUF_EVT_RX_COUNT=2
    
    CONFIG_BT_CONN_TX_MAX=3
    CONFIG_BT_L2CAP_TX_BUF_COUNT=2
    CONFIG_BT_ATT_TX_COUNT=2
    CONFIG_BT_BUF_ACL_TX_COUNT=3
    CONFIG_BT_BUF_ACL_TX_SIZE=27
    

    I am pretty sure, this example did not select a Kinetis-SoC, but maybe it is a default of zephyr (unless some variable is set)?

Reply
  • I took the prj_minimal.conf from the example:

    #
    # Copyright (c) 2021 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Enable the UART driver
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_SERIAL=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=1536
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_MAX_PAIRED=1
    
    # Enable the NUS service
    CONFIG_BT_NUS=y
    
    # Enable bonding
    CONFIG_BT_SETTINGS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    
    # Enable DK LED and Buttons library
    CONFIG_DK_LIBRARY=y
    
    # Drivers and peripherals
    CONFIG_I2C=n
    CONFIG_WATCHDOG=n
    CONFIG_SPI=n
    CONFIG_GPIO=n
    
    # Power management
    
    # Interrupts
    CONFIG_DYNAMIC_INTERRUPTS=n
    CONFIG_IRQ_OFFLOAD=n
    
    # Memory protection
    CONFIG_THREAD_STACK_INFO=n
    CONFIG_THREAD_CUSTOM_DATA=n
    CONFIG_FPU=n
    
    # Boot
    CONFIG_NCS_BOOT_BANNER=n
    CONFIG_BOOT_BANNER=n
    CONFIG_BOOT_DELAY=0
    
    # Console
    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    CONFIG_STDOUT_CONSOLE=n
    CONFIG_PRINTK=n
    CONFIG_EARLY_CONSOLE=n
    
    # Build
    CONFIG_SIZE_OPTIMIZATIONS=y
    
    # ARM
    CONFIG_ARM_MPU=n
    
    # In order to correctly tune the stack sizes for the threads the following
    # Configurations can enabled to print the current use:
    #CONFIG_THREAD_NAME=y
    #CONFIG_THREAD_ANALYZER=y
    #CONFIG_THREAD_ANALYZER_AUTO=y
    #CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
    #CONFIG_THREAD_ANALYZER_USE_PRINTK=y
    #CONFIG_CONSOLE=y
    #CONFIG_UART_CONSOLE=y
    #CONFIG_SERIAL=y
    #CONFIG_PRINTK=y
    
    # Example output of thread analyzer
    #SDC RX              : unused 800 usage 224 / 1024 (21 %)
    #BT ECC              : unused 216 usage 888 / 1104 (80 %)
    #BT RX               : unused 1736 usage 464 / 2200 (21 %)
    #BT TX               : unused 1008 usage 528 / 1536 (34 %)
    #ble_write_thread_id : unused 688 usage 336 / 1024 (32 %)
    #sysworkq            : unused 1912 usage 136 / 2048 (6 %)
    #MPSL signal         : unused 928 usage 96 / 1024 (9 %)
    #idle 00             : unused 224 usage 96 / 320 (30 %)
    #main                : unused 568 usage 456 / 1024 (44 %)
    CONFIG_BT_RX_STACK_SIZE=1024
    CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
    CONFIG_BT_HCI_TX_STACK_SIZE=640
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
    CONFIG_MPSL_WORK_STACK_SIZE=256
    CONFIG_IDLE_STACK_SIZE=128
    CONFIG_ISR_STACK_SIZE=1024
    CONFIG_BT_NUS_THREAD_STACK_SIZE=512
    
    # Disable features not needed
    CONFIG_TIMESLICING=n
    CONFIG_COMMON_LIBC_MALLOC=n
    CONFIG_LOG=n
    CONFIG_LOG_BACKEND_RTT=n
    CONFIG_ASSERT=n
    
    # Disable Bluetooth features not needed
    CONFIG_BT_DEBUG_NONE=y
    CONFIG_BT_ASSERT=n
    CONFIG_BT_DATA_LEN_UPDATE=n
    CONFIG_BT_PHY_UPDATE=n
    CONFIG_BT_GATT_CACHING=n
    CONFIG_BT_GATT_SERVICE_CHANGED=n
    CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
    CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
    CONFIG_BT_HCI_VS=n
    
    # Disable Bluetooth controller features not needed
    CONFIG_BT_CTLR_PRIVACY=n
    CONFIG_BT_CTLR_PHY_2M=n
    
    # Reduce Bluetooth buffers
    CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=1
    CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
    CONFIG_BT_BUF_EVT_RX_COUNT=2
    
    CONFIG_BT_CONN_TX_MAX=3
    CONFIG_BT_L2CAP_TX_BUF_COUNT=2
    CONFIG_BT_ATT_TX_COUNT=2
    CONFIG_BT_BUF_ACL_TX_COUNT=3
    CONFIG_BT_BUF_ACL_TX_SIZE=27
    

    I am pretty sure, this example did not select a Kinetis-SoC, but maybe it is a default of zephyr (unless some variable is set)?

Children
No Data
Related