Associate
August 6, 2025
Solved
Flash write fails when using mcumgr from zephyr to upload an image
- August 6, 2025
- 3 replies
- 874 views
I'm using the nucleo-H753ZI board to test mcuboot.
The setup works and I can successfully run the bootloader and the application in slot0_partition using zephyr sysbuild.
However when trying to upload an image I get the following flash write error:
[00:00:29.758,000] <inf> mcuboot_util: Image index: 0, Swap type: none
[00:00:29.758,000] <inf> mcuboot_util: Image index: 0, Swap type: none
[00:00:29.922,000] <err> flash_stm32h7: Status Bank2: 0x00040000
[00:00:29.922,000] <err> STREAM_FLASH: flash_write error -5 offset=0x00100000
[00:00:29.922,000] <err> mcumgr_img_grp: Irrecoverable error: flash write failed: 12
Here is my flash0 dts:
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(128)>;
};
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x00020000 DT_SIZE_K(896)>;
};
slot1_partition: partition@100000 {
label = "image-1";
reg = <0x00100000 DT_SIZE_K(896)>;
};
storage_partition: partition@1e0000 {
label = "storage";
reg = <0x001e0000 DT_SIZE_K(128)>;
};
};
};
I have also attached the .config file from the build output as reference.
Appreciate any help to get this resolved. I assume it is some KCONFIG settings which is causing this.
I have also attached the .config file from the build output as reference.
Appreciate any help to get this resolved. I assume it is some KCONFIG settings which is causing this.
