Hello,
I am looking to have two applications in flash and switch between them using MCU boot using an nRF52832. The ultimate goal is to do BLE MESH DFU into external flash for larger applications but I thought I'd start with a simple switching between two applications already present in flash using MCU boot.
I have found this Zephyr example in the connect SDK - C:\ncs\v2.3.0-rc1\zephyr\tests\boot
This looks like it'll fulfil my initial task of switching. The application builds successfully, however the MCU does not switch between the the applications. Example UNCHANGED.
Terminal Log:
****** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 *** Booting Zephyr OS build v3.2.99-ncs2-rc1 *** Launching primary slot application on nrf52dk_nrf52832 .. .. ..
main.c application 1
#include <zephyr/kernel.h> #include <zephyr/sys/reboot.h> #include <zephyr/dfu/mcuboot.h> /* Main entry point */ void main(void) { printk("Launching primary slot application on %s\n", CONFIG_BOARD); /* Perform a permanent swap of MCUBoot application */ boot_request_upgrade(1); printk("Secondary application ready for swap, rebooting\n"); sys_reboot(SYS_REBOOT_COLD); }
main.c application 2
#include <zephyr/kernel.h>
/* Main entry point */
void main(void)
{
while(1){
printk("Swapped application booted on %s\n\n\n\n", CONFIG_BOARD);
}
}
Any thought?