undefined reference to `bootmode_set'

hello 

I am studying DFU with reference to the Academy.

Exercise 1 - DFU over UART - Nordic Developer Academy (nordicsemi.com)

SampleCode of Exercise1 use McuBoot and McuBoot use Button2 to enter Serial Recovery mode.

I want to enter Serial Recovery mode without using the button.

And I found out about Boot Mode with Retention System — Zephyr Project Documentation.

So I tried to call the function "bootmode_set()" on main.c but the message"undefined reference to ’bootmode_set’ appeared in build.

I implemented the code based on  GitHub repository for this course lessens8/inter_less8_exer.

I added CONFIG_RETENTION_BOOT_MODE , CONFIG_MCUBOOT_SERIAL and CONFIG_BOOT_SERIAL_BOOT_MODE to child_image/mcuboot.conf.

I added the following code to src/main.c:

#include <zephyr/retention/bootmode.h>
#include <zephyr/sys/reboot.h>

bootmode_set(BOOT_MODE_TYPE_BOOTLOADER);

Firemware App can’t call bootmode_set()?
Is there something missing or have I modified the wrong file?

please tell me how to enter boot mode on Firmware App.

Parents Reply Children
No Data
Related