This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Need help configuring Kconfig options

Hi, 

I am trying to merge some features from nRF desktop into my application. More specifically, the BLE CAF features. 

Now I hit a wall. I am getting a lot of Kconfig errors and have no clue how to deal with them:

Creating solution ble_smart_mask_app.emProject
  C:/Users/lange/ncs/master/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DBOARD_DIR=C:\Users\lange\ncs\master\zephyr\boards\arm\nrf5340dk_nrf5340 -BE:\projects\2021\ble_smart_mask\ble_smart_mask_app\build_nrf5340dk_nrf5340_cpuapp -SE:\projects\2021\ble_smart_mask\ble_smart_mask_app -DNCS_TOOLCHAIN_VERSION=1.5.99 -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Users\lange\ncs\master\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
  -- Application: E:/projects/2021/ble_smart_mask/ble_smart_mask_app
  -- Zephyr version: 2.5.99 (C:/Users/lange/ncs/master/zephyr)
  -- Found Python3: C:/Users/lange/ncs/master/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
  -- Found west (found suitable version "0.10.0", minimum required is "0.7.1")
  -- Board: nrf5340dk_nrf5340_cpuapp
  -- Cache files will be written to: C:/Users/lange/ncs/master/zephyr/.cache
  -- Found dtc: C:/Users/lange/ncs/master/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
  -- Found toolchain: gnuarmemb (C:/Users/lange/ncs/master/toolchain/opt)
  -- Found BOARD.dts: C:/Users/lange/ncs/master/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
  -- Found devicetree overlay: E:/projects/2021/ble_smart_mask/ble_smart_mask_app/boards/nrf5340dk_nrf5340_cpuapp.overlay
  -- Generated zephyr.dts: E:/projects/2021/ble_smart_mask/ble_smart_mask_app/build_nrf5340dk_nrf5340_cpuapp/zephyr/zephyr.dts
  -- Generated devicetree_unfixed.h: E:/projects/2021/ble_smart_mask/ble_smart_mask_app/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/devicetree_unfixed.h
  -- Generated device_extern.h: E:/projects/2021/ble_smart_mask/ble_smart_mask_app/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/device_extern.h
  Parsing C:/Users/lange/ncs/master/zephyr/Kconfig
  Loaded configuration 'C:/Users/lange/ncs/master/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
  Merged configuration 'E:/projects/2021/ble_smart_mask/ble_smart_mask_app/prj.conf'
  -- Configuring incomplete, errors occurred!
  Including boilerplate (Zephyr base): C:/Users/lange/ncs/master/zephyr/cmake/app/boilerplate.cmake
  -- Using NCS Toolchain 1.5.99 for building. (C:/Users/lange/ncs/master/toolchain/cmake)
  unit address and first address in 'reg' (0x77) don't match for /soc/peripheral@50000000/i2c@9000/bme680@76
  
  warning: I2C_1 (defined at drivers/i2c/Kconfig.esp32:18) was assigned the value 'y' but got the
  value 'n'. Check these unsatisfied dependencies: I2C_ESP32 (=n). See
  http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_I2C_1.html and/or look up I2C_1 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: The choice symbol BT_LL_SOFTDEVICE (defined at
  C:/Users/lange/ncs/master/nrfxlib\softdevice_controller/Kconfig:37) was selected (set =y), but
  BT_LL_SW_SPLIT (defined at subsys/bluetooth/controller/Kconfig:96) ended up as the choice selection.
  See http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BT_LL_SOFTDEVICE.html and/or look
  up BT_LL_SOFTDEVICE 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: The choice symbol SETTINGS_FCB (defined at subsys/settings/Kconfig:46) was selected (set
  =y), but SETTINGS_NONE (defined at subsys/settings/Kconfig:71) ended up as the choice selection. See
  http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SETTINGS_FCB.html and/or look up
  SETTINGS_FCB 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: ENTROPY_NRF5_RNG (defined at drivers/entropy/Kconfig.nrf5:14) has direct dependencies !ENTROPY_NRF_FORCE_ALT && HAS_HW_NRF_RNG && ENTROPY_GENERATOR with value n, but is currently being y-selected by the following symbols:
   - BT_LLL_VENDOR_NORDIC (defined at subsys/bluetooth/controller/Kconfig.ll_sw_split:8), with value y, direct dependencies SOC_COMPATIBLE_NRF && BT_LL_SW_SPLIT && BT_CTLR && BT_HCI && BT (value: y), and select condition SOC_COMPATIBLE_NRF && BT_LL_SW_SPLIT && BT_CTLR && BT_HCI && BT (value: y)
  
  error: Aborting due to Kconfig warnings
  
  CMake Error at C:/Users/lange/ncs/master/zephyr/cmake/kconfig.cmake:264 (message):
    command failed with return code: 1
  Call Stack (most recent call first):
    C:/Users/lange/ncs/master/zephyr/cmake/app/boilerplate.cmake:555 (include)
    C:/Users/lange/ncs/master/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    C:/Users/lange/ncs/master/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  
  error: cmake failed
  create_nordic_project.py failed (1)

This is my prj.conf, I have commented the options I believe I do not need:

#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
################################################################################
# Application Configuration

#CONFIG_DESKTOP_INIT_LOG_MOTION_EVENT=n
#CONFIG_DESKTOP_INIT_LOG_HID_REPORT_EVENT=n
#CONFIG_DESKTOP_INIT_LOG_HID_REPORT_SENT_EVENT=n

#CONFIG_DESKTOP_HID_REPORT_DESC="configuration/common/hid_report_desc.c"

#CONFIG_DESKTOP_HID_MOUSE=y
#CONFIG_DESKTOP_HID_STATE_ENABLE=y

#CONFIG_DESKTOP_MOTION_BUTTONS_ENABLE=y
#CONFIG_DESKTOP_MOTION_UP_KEY_ID=0
#CONFIG_DESKTOP_MOTION_DOWN_KEY_ID=3
#CONFIG_DESKTOP_MOTION_LEFT_KEY_ID=2
#CONFIG_DESKTOP_MOTION_RIGHT_KEY_ID=1

CONFIG_CAF=y
CONFIG_CAF_PM_EVENTS=y

#CONFIG_CAF_BUTTONS=y
#CONFIG_CAF_BUTTONS_PM_EVENTS=y
#CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y

#CONFIG_CAF_LEDS=y
#CONFIG_CAF_LEDS_PM_EVENTS=y

CONFIG_CAF_BLE_STATE=y
CONFIG_CAF_BLE_BOND_SUPPORTED=y

CONFIG_CAF_BLE_ADV=y
CONFIG_CAF_BLE_ADV_PM_EVENTS=y
CONFIG_CAF_BLE_ADV_DIRECT_ADV=n
CONFIG_CAF_BLE_ADV_FAST_ADV=y
CONFIG_CAF_BLE_ADV_SWIFT_PAIR=y

#CONFIG_DESKTOP_USB_ENABLE=y

#CONFIG_DESKTOP_POWER_MANAGER_ENABLE=y

#CONFIG_DESKTOP_BLE_USE_DEFAULT_ID=y

#CONFIG_DESKTOP_BLE_SECURITY_FAIL_TIMEOUT_S=10
#CONFIG_DESKTOP_BLE_LOW_LATENCY_LOCK=y

#CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y

#CONFIG_DESKTOP_HFCLK_LOCK_ENABLE=y

################################################################################
# Zephyr Configuration

#CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
#CONFIG_ISR_STACK_SIZE=1536
#CONFIG_MAIN_STACK_SIZE=768
#CONFIG_IDLE_STACK_SIZE=512
#CONFIG_BT_RX_STACK_SIZE=2048
#CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
#CONFIG_BT_HCI_TX_STACK_SIZE=1536

#CONFIG_BOOT_BANNER=n

#CONFIG_NUM_COOP_PRIORITIES=10
#CONFIG_NUM_PREEMPT_PRIORITIES=11

#CONFIG_HEAP_MEM_POOL_SIZE=512

#CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
#CONFIG_SYSTEM_CLOCK_NO_WAIT=y

#CONFIG_PM_POLICY_APP=y

#CONFIG_HW_STACK_PROTECTION=y
#CONFIG_RESET_ON_FATAL_ERROR=n

#CONFIG_GPIO=y

#CONFIG_SERIAL=n
#CONFIG_CONSOLE=n
#CONFIG_UART_CONSOLE=n

#CONFIG_HWINFO=y

#CONFIG_FLASH=y
#CONFIG_FLASH_PAGE_LAYOUT=y
#CONFIG_FLASH_MAP=y
#CONFIG_FCB=y

CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y

#CONFIG_REBOOT=y

#CONFIG_SPEED_OPTIMIZATIONS=y

#CONFIG_PWM=y

#CONFIG_LED=y
#CONFIG_LED_PWM=y

#CONFIG_USB=y
#CONFIG_USB_NRFX=y
#CONFIG_USB_DEVICE_STACK=y
#CONFIG_USB_DEVICE_MANUFACTURER="Nordic Semiconductor ASA"
#CONFIG_USB_DEVICE_PRODUCT="Mouse nRF52 Desktop"
#CONFIG_USB_DEVICE_VID=0x1915
#CONFIG_USB_DEVICE_PID=0x52DE
#CONFIG_USB_DEVICE_REMOTE_WAKEUP=y
#CONFIG_USB_DEVICE_HID=y
#CONFIG_USB_DEVICE_LOG_LEVEL_OFF=y
#CONFIG_USB_DRIVER_LOG_LEVEL_OFF=y
#CONFIG_USB_HID_POLL_INTERVAL_MS=1


CONFIG_BT=y
CONFIG_BT_SETTINGS=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
#CONFIG_BT_MAX_PAIRED=2
#CONFIG_BT_ID_MAX=3
CONFIG_BT_LL_SOFTDEVICE=y

# Bluetooth appearance
CONFIG_BT_DEVICE_NAME="Smart Mask"
CONFIG_BT_DEVICE_APPEARANCE=832

CONFIG_BT_CTLR=y
CONFIG_BT_CTLR_CONN_PARAM_REQ=n
CONFIG_BT_CTLR_LLPM=y
CONFIG_BT_CTLR_TX_PWR_0=y
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
CONFIG_BT_CONN_TX_MAX=4

#CONFIG_BT_DATA_LEN_UPDATE=n
#CONFIG_BT_AUTO_PHY_UPDATE=n

CONFIG_BT_PERIPHERAL=y
#CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
#CONFIG_BT_PERIPHERAL_PREF_MAX_INT=6
#CONFIG_BT_PERIPHERAL_PREF_SLAVE_LATENCY=99
#CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400

#CONFIG_BT_CONN_PARAM_UPDATE_TIMEOUT=1000

#CONFIG_BT_WHITELIST=y

#CONFIG_BT_GATT_UUID16_POOL_SIZE=27
#CONFIG_BT_GATT_CHRC_POOL_SIZE=7
#CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y
#CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=n

# CONFIG_BT_DIS=y
# CONFIG_BT_DIS_MANUF="Nordic Semiconductor ASA"
# CONFIG_BT_DIS_MODEL="Mouse nRF52 Desktop"
# CONFIG_BT_DIS_PNP=y
# CONFIG_BT_DIS_PNP_VID_SRC=2
# CONFIG_BT_DIS_PNP_VID=0x1915
# CONFIG_BT_DIS_PNP_PID=0x52DE
# CONFIG_BT_DIS_PNP_VER=0x0100

# CONFIG_BT_HIDS_INPUT_REP_MAX=1
# CONFIG_BT_HIDS_OUTPUT_REP_MAX=0
# CONFIG_BT_HIDS_FEATURE_REP_MAX=1
# CONFIG_BT_HIDS_ATTR_MAX=19
# CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y
# CONFIG_BT_CONN_CTX=y

CONFIG_ENTROPY_CC3XX=n

CONFIG_EVENT_MANAGER=y
CONFIG_LINKER_ORPHAN_SECTION_PLACE=y

################################################################################

CONFIG_ASSERT=y
#CONFIG_ASSERT_LEVEL=2

# Logger configuration
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_STRDUP_BUF_COUNT=10

# CONFIG_LOG=y
# CONFIG_LOG_DEFAULT_LEVEL=2
# CONFIG_LOG_BACKEND_RTT=y
# CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
# CONFIG_LOG_MODE_OVERFLOW=y
# CONFIG_LOG_PRINTK=y
# CONFIG_LOG_PRINTK_MAX_STRING_LENGTH=256
# CONFIG_LOG_BUFFER_SIZE=4096
# CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256
# CONFIG_LOG_STRDUP_BUF_COUNT=64
# CONFIG_LOG_STRDUP_MAX_STRING=64
# CONFIG_LOG_BACKEND_SHOW_COLOR=n
# CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n
# CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024

#CONFIG_CONSOLE=y
#CONFIG_USE_SEGGER_RTT=y
#CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
#CONFIG_RTT_CONSOLE=y
#CONFIG_UART_CONSOLE=n

# I2C
CONFIG_I2C=y
CONFIG_I2C_1=y

# Configuration required by BME680
CONFIG_SENSOR=y
CONFIG_BME680=y

If I disable some more options (which I do need in the end) I am able to get rid of all but one warning: 

warning: ENTROPY_NRF5_RNG (defined at drivers/entropy/Kconfig.nrf5:14) has direct dependencies !ENTROPY_NRF_FORCE_ALT && HAS_HW_NRF_RNG && ENTROPY_GENERATOR with value n, but is currently being y-selected by the following symbols:

Any tips on what to do? Sifting through all the options is going to take a huge amount of time so I was really hoping there would be a better way... I only really want to add the BLE CAF events functionality to my project.

Kind regards,

Stefan

ps, I run the master branch from ncs-toolchain-master-20210504-3e85a62

Parents
  • Update: I was able to narrow it down to 

    CONFIG_BT_CTLR=y

    Should I enable this option? It seems to be the default for many boards?

  • Interesting development:

    'Rebuild Solution' works fine, but 'Build Solution' now gives this error. Not sure how to fix this? Perhaps I am missing the rpmsg sample in my project?

  • Hi,

    CONFIG_BT_CTLR should be disabled for the application core, since the network core is used for the bluetooth controller.

    You are getting a warning regarding SETTINGS_FCB not being chosen. If you want Settings with FCB you should uncomment all these lines, comment them all out if you don't want it:

    #CONFIG_FLASH=y
    #CONFIG_FLASH_PAGE_LAYOUT=y
    #CONFIG_FLASH_MAP=y
    #CONFIG_FCB=y
    
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_FCB=y

    Regarding the last error, where have you placed your project, and what does its CMakeLists.txt look like? Are you trying to add hci_rpmsg as a child image?

    Also, may I ask why you are using the master branch instead of the latest release (v1.5.1)? You are likely to have fewer issues when using the stable releases.

  • Hi, thank your for your response. 

    My project is placed under the following location:

    E:\projects\2021\ble_smart_mask

    My sdk location is at:

    C:\Users\lange\ncs\master

    CMakeLists.txt:

    #
    # Copyright (c) 2019 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    cmake_minimum_required(VERSION 3.13.1)
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project("BLE smart mask")
    
    # Include application event headers
    zephyr_library_include_directories(src/events)
    zephyr_library_include_directories(configuration)
    
    # Application sources
    # NORDIC SDK APP START
    target_sources(app PRIVATE src/main.c)
    
    target_sources(app PRIVATE
    		src/events/config_event.c
    		src/events/sensor_packet_event.c
    		src/events/bme680_measurement_event.c
    		src/events/trigger_measurement_event.c
    )
    
    target_sources(app PRIVATE
    		src/modules/bme680.c
    		src/modules/sensor.c
    #		src/modules/ble_bond.c
    )
    # NORDIC SDK APP END

    Are you trying to add hci_rpmsg as a child image?

    I'm not sure. I thought segger would do that for me if I set the right options in prj.conf. But I am very new to this environment so I am still learning. To be honest, I spend a whole day reading documentation and I am still a little confused. I just need the correct config to use BLE on nRF5340 Slight smile

    Regarding the use of the master branch, I am using it because I want to use the CAF BLE functionality in my project. It is unfortunately not present in release v1.5.1. I received the zip containing the master branch from a nordic engineer. All I did was install it through the toolchain manager. 

  • Just to update you, I have also tried to compile the peripheral_lbs sample and I am getting the same error as with my own app. As a sanity check I also tested the peripheral_lbs sample using the v1.5.1 toolchain again  and it compiles/loads fine. So this is pointing to an issue with the master toolchain, not my app configuration. 

  • Another update, I did the following:

    - Followed all the steps at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html#installing-ses

    - At first I had the manually installed toolchain installed under C:\users. I got the same error as before. So I moved both project and toolchain to C:\ toplevel. It's now compiling and uploading again.

    Updated prj.conf

    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    ################################################################################
    # Application Configuration
    
    CONFIG_CAF=y
    CONFIG_CAF_PM_EVENTS=y
    
    # CONFIG_CAF_BUTTONS=y
    # CONFIG_CAF_BUTTONS_PM_EVENTS=y
    # CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y
    
    # CONFIG_CAF_LEDS=y
    # CONFIG_CAF_LEDS_PM_EVENTS=y
    
    CONFIG_CAF_BLE_STATE=y
    CONFIG_CAF_BLE_BOND_SUPPORTED=y
    
    CONFIG_CAF_BLE_ADV=y
    CONFIG_CAF_BLE_ADV_DEF_PATH="C:/ble_smart_mask/ble_smart_mask_app/configuration/ble_adv_def.h"
    CONFIG_CAF_BLE_ADV_PM_EVENTS=y
    #CONFIG_CAF_BLE_ADV_DIRECT_ADV=n
    CONFIG_CAF_BLE_ADV_FAST_ADV=y
    # CONFIG_CAF_BLE_ADV_SWIFT_PAIR=y
    
    ################################################################################
    # Zephyr Configuration
    
    # CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
    # CONFIG_ISR_STACK_SIZE=1536
    # CONFIG_MAIN_STACK_SIZE=768
    # CONFIG_IDLE_STACK_SIZE=512
    # CONFIG_BT_RX_STACK_SIZE=2048
    #CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
    #CONFIG_BT_HCI_TX_STACK_SIZE=1536
    
    # from rpmsg 5340 sample
    #CONFIG_BT_HCI_RAW=y
    #CONFIG_BT_MAX_CONN=16
    #CONFIG_BT_CTLR_ASSERT_HANDLER=y
    #CONFIG_BT_HCI_RAW_RESERVE=1
    
    #CONFIG_NRF_802154_SER_RADIO=y
    #CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2
    #CONFIG_DEBUG_INFO=y
    #CONFIG_EXCEPTION_STACK_TRACE=y
    #CONFIG_SERIAL=n
    #CONFIG_UART_CONSOLE=n
    
    # CONFIG_NUM_COOP_PRIORITIES=10
    # CONFIG_NUM_PREEMPT_PRIORITIES=11
    
    # CONFIG_HEAP_MEM_POOL_SIZE=512
    
    # CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
    # CONFIG_SYSTEM_CLOCK_NO_WAIT=y
    
    # CONFIG_PM_POLICY_APP=y
    
    # CONFIG_HW_STACK_PROTECTION=y
    # CONFIG_RESET_ON_FATAL_ERROR=n
    
    # CONFIG_GPIO=y
    
    # CONFIG_SERIAL=n
    # CONFIG_CONSOLE=n
    # CONFIG_UART_CONSOLE=n
    
    # CONFIG_HWINFO=y
    
    # CONFIG_FLASH=y
    # CONFIG_FLASH_PAGE_LAYOUT=y
    # CONFIG_FLASH_MAP=y
    # CONFIG_FCB=y
    
    # CONFIG_SETTINGS=y
    # CONFIG_SETTINGS_FCB=y
    
    # CONFIG_REBOOT=y
    
    # CONFIG_SPEED_OPTIMIZATIONS=y
    
    # CONFIG_PWM=y
    
    # CONFIG_LED=y
    # CONFIG_LED_PWM=y
    
    
    CONFIG_BT=y
    #CONFIG_BT_SETTINGS=y
    #CONFIG_BT_SMP=y
    #CONFIG_BT_SIGNING=y
    #CONFIG_BT_MAX_PAIRED=2
    #CONFIG_BT_ID_MAX=3
    #CONFIG_BT_LL_SOFTDEVICE=y
    
    # Bluetooth appearance
    CONFIG_BT_DEVICE_NAME="Smart Mask"
    CONFIG_BT_DEVICE_APPEARANCE=832
    
    #CONFIG_BT_CTLR=y
    #CONFIG_BT_CTLR_CONN_PARAM_REQ=n
    #CONFIG_BT_CTLR_LLPM=y
    #CONFIG_BT_CTLR_TX_PWR_0=y
    #CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    #CONFIG_BT_CONN_TX_MAX=4
    
    #CONFIG_BT_DATA_LEN_UPDATE=n
    #CONFIG_BT_AUTO_PHY_UPDATE=n
    
    CONFIG_BT_PERIPHERAL=y
    # CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
    # CONFIG_BT_PERIPHERAL_PREF_MAX_INT=6
    # CONFIG_BT_PERIPHERAL_PREF_SLAVE_LATENCY=99
    # CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400
    
    # CONFIG_BT_CONN_PARAM_UPDATE_TIMEOUT=1000
    
    # CONFIG_BT_WHITELIST=y
    
    # CONFIG_BT_GATT_UUID16_POOL_SIZE=27
    # CONFIG_BT_GATT_CHRC_POOL_SIZE=7
    # CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y
    # CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=n
    
    # CONFIG_BT_DIS=y
    # CONFIG_BT_DIS_MANUF="Nordic Semiconductor ASA"
    # CONFIG_BT_DIS_MODEL="Mouse nRF52 Desktop"
    # CONFIG_BT_DIS_PNP=y
    # CONFIG_BT_DIS_PNP_VID_SRC=2
    # CONFIG_BT_DIS_PNP_VID=0x1915
    # CONFIG_BT_DIS_PNP_PID=0x52DE
    # CONFIG_BT_DIS_PNP_VER=0x0100
    
    # CONFIG_BT_HIDS_INPUT_REP_MAX=1
    # CONFIG_BT_HIDS_OUTPUT_REP_MAX=0
    # CONFIG_BT_HIDS_FEATURE_REP_MAX=1
    # CONFIG_BT_HIDS_ATTR_MAX=19
    # CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y
    # CONFIG_BT_CONN_CTX=y
    
    # CONFIG_ENTROPY_CC3XX=n
    
    # Configuration required by Event Manager
    CONFIG_EVENT_MANAGER=y
    CONFIG_LINKER_ORPHAN_SECTION_PLACE=y
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    CONFIG_REBOOT=y
    
    ################################################################################
    
    CONFIG_ASSERT=y
    #CONFIG_ASSERT_LEVEL=2
    
    # Logger configuration
    CONFIG_LOG=y
    CONFIG_LOG_DEFAULT_LEVEL=4
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_LOG_STRDUP_BUF_COUNT=10
    CONFIG_BOOT_BANNER=n
    
    # CONFIG_LOG=y
    # CONFIG_LOG_DEFAULT_LEVEL=2
    # CONFIG_LOG_BACKEND_RTT=y
    # CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
    # CONFIG_LOG_MODE_OVERFLOW=y
    # CONFIG_LOG_PRINTK=y
    # CONFIG_LOG_PRINTK_MAX_STRING_LENGTH=256
    # CONFIG_LOG_BUFFER_SIZE=4096
    # CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256
    # CONFIG_LOG_STRDUP_BUF_COUNT=64
    # CONFIG_LOG_STRDUP_MAX_STRING=64
    # CONFIG_LOG_BACKEND_SHOW_COLOR=n
    # CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n
    # CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
    
    # CONFIG_CONSOLE=y
    # CONFIG_USE_SEGGER_RTT=y
    # CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
    # CONFIG_RTT_CONSOLE=y
    # CONFIG_UART_CONSOLE=n
    
    # I2C
    CONFIG_I2C=y
    CONFIG_I2C_1=y
    
    # Configuration required by BME680
    CONFIG_SENSOR=y
    CONFIG_BME680=y
    
    

    My sensor is working again now, except I still have no bluetooth. The log shows the following:

    [00:00:00.424,316] <dbg> nrf5340dk_nrf5340_cpuapp.remoteproc_mgr_boot: Network MCU released.
    [00:00:00.432,464] <inf> event_manager: e: config_event init_val_1=3
    [00:00:00.432,495] <inf> bme680s: Config event
    [00:00:00.432,495] <inf> bme680s: Device 0x20000488 name is BME680
    

    My guess is it says 'Network MCU released' because I did not configure something correctly BT related Slight smile

  • Another update: network MCU released message is normal.

    I was missing a crucial bit of code in my main application, namely:

    #define MODULE main
    #include <caf/events/module_state_event.h>
    
    /* Let CAF know main module is ready */
    module_set_state(MODULE_STATE_READY);

    May I suggest this information is added to the following documentation:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/caf/ble_state.html

    I can report it's now working great Slight smile (although the toolchain is still unreliable!)

Reply Children
Related