Hello,
I'm using the frdm_rw612 board for this test. My IDE is vscode with the MCUxpresso plugin. I'm trying to compile my firmware to be "mcuboot ready" meaning I would like to be able to do the OTA with it.
First, I followed this tutorial: https://community.nxp.com/t5/Zephyr-Project-Knowledge-Base/Zephyr-app-with-MCUboot-in-VS-Code/ta-p/2...
It's working as expected. The current partitions organization being what I found in the boards\nxp\frdm_rw612\frdm_rw612_common.dtsi file:
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/*
* Partition sizes must be aligned
* to the flash security sub-region size of 128KB.
*/
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(128)>;
};
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x00020000 DT_SIZE_K(640)>;
};
slot0_ns_partition: partition@C0000 {
label = "image-0-non-secure";
reg = <0x000C0000 DT_SIZE_M(3)>;
};
slot1_partition: partition@3C0000 {
label = "image-1";
reg = <0x003C0000 DT_SIZE_K(640)>;
};
slot1_ns_partition: partition@460000 {
label = "image-1-non-secure";
reg = <0x00460000 DT_SIZE_M(3)>;
};
storage_partition: partition@760000 {
label = "storage";
reg = <0x00760000 (DT_SIZE_M(57) - DT_SIZE_K(384))>;
};
};
From my understanding, the hello-world example is so small it can fit inside the small (640kB) secure partition.
Unfortunately, when I do the same thing for my current firmware (which has Wifi, Bluetooth etc.) I cannot compile because it says it overloads the partition:
[...]/arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
[...]/arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 1682828 bytes
To sumup:
I can compile and flash mcuboot. I also can correctly flash the hello-world example (I can see from the UART it can correctly load this hello-world app). On the other hand, I cannot compile my "big" firmware.
How can I generate an image with a minimal secure partition that will only jump in the non secure area where my main firmware will be?
I want to keep your current partition structure because I'll use in the future this secure partition.
Thank you,