boards: st: nucleo_f207zg: Rework flash partition

STM32F2 series flash layout is as follows:
	{.pages_count = 4, .pages_size = KB(16)},
	{.pages_count = 1, .pages_size = KB(64)},
	{.pages_count = 7, .pages_size = KB(128)}

Since NVS subsys requires 2 sectors of max 32K in total, provide a
flash partition which respects this constraint using 2 of the 16K sectors
in the beginning of the layout.

Provide a compatible flash partition usable with mcuboot, but keep the
storage partition commented as its usage is not compatible with use w/o
mcuboot enabled (in this case main image starts as offset 0 which conflicts
with storage partition).

Note that it isn't possible either to get main image starting directly
in the 128K sectors w/o bootloader as boot flash address can't be
configured.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou 2024-10-21 15:08:10 +02:00 committed by Benjamin Cabé
parent aad4c69068
commit 8da1aa13fc

View file

@ -197,12 +197,32 @@ zephyr_udc0: &usbotg_fs {
#address-cells = <1>;
#size-cells = <1>;
/* Last sector of size 128KB at the end of 1MB flash is set
* for storage.
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 DT_SIZE_K(32)>;
read-only;
};
/*
* nvs subsystem requires 2 sectors with a max total of 32K
* On F2 series, the only option is to use the following
* partition, which is compatible with mcuboot usage.
* Keep it commented in order it is not used by CI.
*
* storage_partition: partition@8000 {
* label = "storage";
* reg = <0x8000 DT_SIZE_K(32)>;
* };
*/
storage_partition: partition@e0000 {
label = "storage";
reg = <0x000e0000 DT_SIZE_K(128)>;
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x20000 DT_SIZE_K(448)>;
};
slot1_partition: partition@90000 {
label = "image-1";
reg = <0x90000 DT_SIZE_K(448)>;
};
};
};