MCUBoot can't find bootable image (nRF52)


Benjamin Lindqvist
 

Hey,

I've been trying to build the mcumgr/smp_svr sample on a nRF52840 DK
(pca10056) by following
https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html,
using Zephyr v1.14.0 and MCUBoot v1.3.0.

I follow the instructions, everything gets built, signed and flashed
fine it seems, but MCUBoot can't find a bootable image. This is how I
signed the image:

./imgtool.py sign \
--key mcuboot/root-rsa-2048.pem \
--header-size 0x200 \
--align 8 \
--version 1.2 \
--slot-size 0x68000 \
$ZEPHYR_BIN_DIR/zephyr.hex \
$ZEPHYR_BIN_DIR/signed.hex

MCUBoot always gets stuck at

Remote debugging using localhost:2331
0x000004fa in main () at ../main.c:202
202 BOOT_LOG_ERR("Unable to find bootable image");

caused by boot_validate_slot(0, NULL) returning an error, in turn caused
by

if (boot_check_header_erased(slot) == 0 || (hdr->ih_flags & IMAGE_F_NON_BOOTABLE)) {

triggering. Has anyone verified the sample for the versions mentioned?