Building and using mcumgr with Zephyr

Configuration

The samples/smp_svr/zephyr/prj.conf file provides a good starting point for configuring an application to use mcumgr. The major configuration settings are described below:

SettingDescriptionDefault
CONFIG_MCUMGREnable the mcumgr management library.n
CONFIG_MCUMGR_CMD_FS_MGMTEnable mcumgr handlers for file managementn
CONFIG_MCUMGR_CMD_IMG_MGMTEnable mcumgr handlers for image managementn
CONFIG_MCUMGR_CMD_LOG_MGMTEnable mcumgr handlers for log managementn
CONFIG_MCUMGR_CMD_OS_MGMTEnable mcumgr handlers for OS managementn

Building

Your application must specify mcumgr as a link-time dependency. This is done by adding the following to your application's CMakeLists.txt file:

zephyr_link_libraries(
    MCUMGR
)

Known issues

If the Bluetooth stack runs out of ACL transmit buffers while a large mcumgr response is being sent, the buffers never get freed. This appears to trigger a net_buf leak in the stack.