how to make new image takes effect

Hello,Nordic team

I am programming with nrf52833 and ncs v2.9.0

I am going to do dfu not by YOUR example(FOTA or UART……)

I flash_write() data to image-1 address,and what should i do to make image-1 take effect(take place of image-0) after reset?Need I config register or other ways?

Best regard

Parents Reply Children
  • But still report   undedined reference  boot_request_upgrade.

    Did you try to call boot_set_pending()? 

  • I try boot_set_pending now,it can pass the complie,but a warning happend.
    warning: implicit declaration of function "boot_set_pending"

    It must be that i am not include the head file,but once i do #include <bootutil/bootutil_public.h>,an ERROR(No such file....) wil happen.Any solution plz?

  • Good new is that boot_set_pending return 0-success.

    Bad new is that the new img is not take effect.

    My primary slot makes led green,and Secondary turn it  into red. boot_set_pending(1) return 0,after reset it is still green.

  • I see the problem now with using the relative include path. You can include "#include <zephyr/dfu/mcuboot.h>" instead and call 

    boot_request_upgrade(1); instead.
  • But do this will makes anoter err happened just like what i have said