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

secure bootloader in NCS v1.6.1

Hi,

I am trying to implement FOTA in my application. I can implement non secure bootloader and run successful

in prj.conf

# Added for FOTA
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUMGR=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_SMP_BT=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

in main.c

// For FOTA
#ifdef CONFIG_MCUMGR_CMD_FS_MGMT
#include <device.h>
#include <fs/fs.h>
#include "fs_mgmt/fs_mgmt.h"
#include <fs/littlefs.h>
#endif
#ifdef CONFIG_MCUMGR_CMD_OS_MGMT
#include "os_mgmt/os_mgmt.h"
#endif
#ifdef CONFIG_MCUMGR_CMD_IMG_MGMT
#include "img_mgmt/img_mgmt.h"
#endif
#ifdef CONFIG_MCUMGR_CMD_STAT_MGMT
#include "stat_mgmt/stat_mgmt.h"
#endif
#ifdef CONFIG_MCUMGR_SMP_BT
#include "mgmt\mcumgr\smp_bt.h"
#endif
#ifdef CONFIG_MCUMGR_CMD_SHELL_MGMT
#include "shell_mgmt/shell_mgmt.h"
#endif
#ifdef CONFIG_MCUMGR_CMD_FS_MGMT
#include "fs_mgmt/fs_mgmt.h"
#endif
...


void main() {
....

.....
...
...

    // For FOTA
        os_mgmt_register_group();
        img_mgmt_register_group();
        smp_bt_register();
    while(1)
    {
    ...
    }
}

And Now I am need to add secure bootloader

generate priv.pem and placed in

and added these line extra in prj.conf

CONFIG_SECURE_BOOT=y
CONFIG_SB_SIGNING_KEY_FILE="priv.pem"

but project getting failed

how to add secure bootloader to our project

and also

How to use Single slot bank instead of using Dual banking

Parents Reply Children
Related