cancel
Showing results for 
Search instead for 
Did you mean: 

Zephyr MCUboot for stm32f446re

MohamedMenazaa
Visitor

I've been trying to get MCUboot working on the nucleo-f446re board with the USB DFU sample for a couple of days now, but I'm stuck!

Here's my MCUboot configuration:
```
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_MCUBOOT_LOG_LEVEL_DBG=y
CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n
CONFIG_BOOT_MAX_IMG_SECTORS=7 ```

This is my MCUboot overlay file:
```
/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};

And here's the board overlay for the USB DFU sample:

/ {
chosen {
zephyr,code-partition = &slot0_partition;
};
};

zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
pinctrl-names = "default";
status = "okay";

cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
```
However, when I try to run it, I get the following log output:
```
*** Booting MCUboot v2.1.0-rc1-146-gf74b77cf7808 ***
*** Using Zephyr OS build v4.0.0 ***
I: Starting bootloader
D: Non-optimal sector distribution, slot0 has -1 usable sectors (1 assigned) but slot1 has 1 assigned
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
E: Image in the primary slot is not valid!
E: Unable to find bootable image
```
Do you know what I might be missing? I'd really appreciate any help or if someone could point me to a working example. Thanks in advance!

0 REPLIES 0