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

Zephyr with MCUboot

Hi,

I encounter the problem when using the mcuboot with zephyr 1.11 is that the system keep rebooting.

mcuboot: https://github.com/runtimeco/mcuboot

mcuboot build steps:

cd boot/zephyr

$ mkdir build && cd build

$ cmake -GNinja -DBOARD=nrf52840_pca10056 -DCONF_VALIDATE_SLOT0=NO ..

$ ninja

To copy the zephyr.hex to be zephyr_boot.hex

One code change to remove the MAGIC number checking.

zephyr build steps:

$ cd samples/hello_world

$ mkdir build && cd build

$ cmake -GNinja -DBOARD=nrf52840_pca10056 ..

$ ninja menuconfig     -> to enable the "CONFIG_BOOTLOADER_MCUBOOT"

$ ninja

To copy the zephyr.hex to be zephyr_app.hex

Hex file merge, I use the nordic toolsets for the merge and programming.

$ mergehex -m zephyr_boot.hex zephyr_app.hex -o zephyr_all.hex

$ nrfjprog --eraseall -f nrf52

$ nrfjprog --program zephyr_all.hex -f nrf52

$ nrfjprog --reset -f nrf52

The console log is here, the system keep rebooting forever.

--------------

***** BOOTING ZEPHYR OS v1.11.99 - BUILD: Mar 31 2018 03:50:24 *****
[MCUBOOT] [INF] main: Starting bootloader
[MCUBOOT] [INF] boot_status_source: Image 0: magic=unset, copy_done=0xff, image_ok=0xff
[MCUBOOT] [INF] boot_status_source: Scratch: magic=unset, copy_done=0x0, image_ok=0xff
[MCUBOOT] [INF] boot_status_source: Boot source: slot 0
[MCUBOOT] [INF] boot_swap_type: Swap type: none
[MCUBOOT] [INF] main: Bootloader chainload address offset: 0xc000
[MCUBOOT] [INF] main: Jumping to the first image slot
***** BOOTING ZEPHYR OS v1.11.99 - BUILD: Mar 31 2018 03:50:24 *****
[MCUBOOT] [INF] main: Starting bootloader
[MCUBOOT] [INF] boot_status_source: Image 0: magic=unset, copy_done=0xff, image_ok=0xff
[MCUBOOT] [INF] boot_status_source: Scratch: magic=unset, copy_done=0x0, image_ok=0xff
[MCUBOOT] [INF] boot_status_source: Boot source: slot 0
[MCUBOOT] [INF] boot_swap_type: Swap type: none
[MCUBOOT] [INF] main: Bootloader chainload address offset: 0xc000
[MCUBOOT] [INF] main: Jumping to the first image slot
***** BOOTING ZEPHYR OS v1.11.99 - BUILD: Mar 31 2018 03:50:24 *****

-------------------------

Any suggestion?

Related