About the problem of the size of flash occupied by Softdevice Control in ncs.

I use nrf52832 + ncs1.7.0 to develop mesh projects. The current project requires mcuboot + mpsl. But I found that SoftDevice Controller occupies too much flash space, which has exceeded the size of bank0.

The following is the test I did, through CONFIG_BT_LL_SW_SPLIT to choose which protocol stack to use. Compiled projects do not include mcuboot.

The project compiled with Zephyr BluetoothRegistered LE Controller, the flash occupies 167.1KB.

The project compiled with SoftDevice Controller, the flash occupies 219.5KB.

The project compiled with SoftDevice Controller is 52.4KB larger than Zephyr BluetoothRegistered LE Controller.

Is there any way to reduce the size of the flash occupied by the SoftDevice Controller? This is very important to me.

Parents
  • Let me check with the team. Maybe you can share your prj.conf file in the meantime.

    Kenneth

  • Based on nrf\samples\bluetooth\mesh\light, I tested Zephyr Bluetooth Registered LE Controller and SoftDevice Controller occupying the flash size.

    The project compiled with Zephyr Bluetooth LE Controller, the flash occupies 194KB.

    The project compiled with SoftDevice Controller, the flash occupies 248.7KB.

    Here my prj.conf:

    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    # General configuration
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    CONFIG_HWINFO=y
    CONFIG_DK_LIBRARY=y
    
    # Bluetooth configuration
    CONFIG_BT=y
    CONFIG_BT_COMPANY_ID=0x0059
    CONFIG_BT_DEVICE_NAME="Mesh Light"
    CONFIG_BT_L2CAP_TX_MTU=69
    CONFIG_BT_L2CAP_TX_BUF_COUNT=8
    #CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_OBSERVER=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_SETTINGS=y
    CONFIG_BT_TINYCRYPT_ECC=y
    
    # Disable unused Bluetooth features
    CONFIG_BT_CTLR_DUP_FILTER_LEN=0
    CONFIG_BT_CTLR_LE_ENC=n
    CONFIG_BT_DATA_LEN_UPDATE=n
    CONFIG_BT_PHY_UPDATE=n
    CONFIG_BT_CTLR_CHAN_SEL_2=n
    CONFIG_BT_CTLR_MIN_USED_CHAN=n
    CONFIG_BT_CTLR_PRIVACY=n
    
    # Bluetooth mesh configuration
    CONFIG_BT_MESH=y
    CONFIG_BT_MESH_RELAY=y
    CONFIG_BT_MESH_FRIEND=y
    CONFIG_BT_MESH_ADV_BUF_COUNT=13
    CONFIG_BT_MESH_TX_SEG_MAX=10
    CONFIG_BT_MESH_PB_GATT=y
    CONFIG_BT_MESH_GATT_PROXY=y
    CONFIG_BT_MESH_DK_PROV=y
    
    # Bluetooth mesh models
    CONFIG_BT_MESH_ONOFF_SRV=y
    

Reply
  • Based on nrf\samples\bluetooth\mesh\light, I tested Zephyr Bluetooth Registered LE Controller and SoftDevice Controller occupying the flash size.

    The project compiled with Zephyr Bluetooth LE Controller, the flash occupies 194KB.

    The project compiled with SoftDevice Controller, the flash occupies 248.7KB.

    Here my prj.conf:

    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    # General configuration
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    CONFIG_HWINFO=y
    CONFIG_DK_LIBRARY=y
    
    # Bluetooth configuration
    CONFIG_BT=y
    CONFIG_BT_COMPANY_ID=0x0059
    CONFIG_BT_DEVICE_NAME="Mesh Light"
    CONFIG_BT_L2CAP_TX_MTU=69
    CONFIG_BT_L2CAP_TX_BUF_COUNT=8
    #CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_OBSERVER=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_SETTINGS=y
    CONFIG_BT_TINYCRYPT_ECC=y
    
    # Disable unused Bluetooth features
    CONFIG_BT_CTLR_DUP_FILTER_LEN=0
    CONFIG_BT_CTLR_LE_ENC=n
    CONFIG_BT_DATA_LEN_UPDATE=n
    CONFIG_BT_PHY_UPDATE=n
    CONFIG_BT_CTLR_CHAN_SEL_2=n
    CONFIG_BT_CTLR_MIN_USED_CHAN=n
    CONFIG_BT_CTLR_PRIVACY=n
    
    # Bluetooth mesh configuration
    CONFIG_BT_MESH=y
    CONFIG_BT_MESH_RELAY=y
    CONFIG_BT_MESH_FRIEND=y
    CONFIG_BT_MESH_ADV_BUF_COUNT=13
    CONFIG_BT_MESH_TX_SEG_MAX=10
    CONFIG_BT_MESH_PB_GATT=y
    CONFIG_BT_MESH_GATT_PROXY=y
    CONFIG_BT_MESH_DK_PROV=y
    
    # Bluetooth mesh models
    CONFIG_BT_MESH_ONOFF_SRV=y
    

Children
Related