Hi, I'm trying to implement DFU to an existing app, however I wanted to first try to do it along with some tutorial. Found this Add DFU support to your application and this https://getwavecake.com/blog/adding-ota-dfu-to-a-nordic-zephyr-project/ , but it seems that both these tutorials give me the similar warnings and errors that look like this:
warning: implicit declaration of function 'os_mgmt_register_group'; did you mean 'mgmt_register_group'? [-Wimplicit-function-declaration]
212 | os_mgmt_register_group();
| ^~~~~~~~~~~~~~~~~~~~~~
| mgmt_register_group
and
undefined reference to `os_mgmt_register_group'.
Same for img mgmt.
I'm using ncs v2.3.0.
My config looks like this:
# # Copyright (c) 2018 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_BT=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_LBS" # Enable the LBS service CONFIG_BT_LBS=y CONFIG_BT_LBS_POLL_BUTTON=y CONFIG_DK_LIBRARY=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 # Enable mcumgr. CONFIG_MCUMGR=y # Enable most core commands. CONFIG_MCUMGR_CMD_IMG_MGMT=y CONFIG_MCUMGR_CMD_OS_MGMT=y # Ensure an MCUboot-compatible binary is generated. CONFIG_BOOTLOADER_MCUBOOT=y # Allow for large Bluetooth data packets. CONFIG_BT_L2CAP_TX_MTU=252 CONFIG_BT_BUF_ACL_RX_SIZE=256 # Enable the Bluetooth (unauthenticated) and shell mcumgr transports. CONFIG_MCUMGR_SMP_BT=y CONFIG_MCUMGR_SMP_BT_AUTHEN=n # Some command handlers require a large stack. CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
and lines added to lbs sample:
#include <zephyr/mgmt/mcumgr/transport/smp_bt.h> #include <zephyr/mgmt/mcumgr/grp/os_mgmt/os_mgmt.h> #include <zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h> //these lines are located in main function after init_buttons printk("build time: " __DATE__ " " __TIME__ "\n"); os_mgmt_register_group(); img_mgmt_register_group(); smp_bt_register();