"sectors" in custom target on STM32WLE5CC

I am using a custom board with the STM32WLE5CC in arm mbed, and so far it is working. I am now adding mcuboot, and that needs bootloader support. If I add "bootloader_supported": true it still does not work. My research found out, that I need to add a "sectors" definition in my custom target. If I do that, it builds just fine. The problem is: what values to put there? I used some numbers copied from a random entry on some other STM. I cannot find any documentation explaining, what “sectors” exactly does and what those numbers mean. All I find is answers to some random questions that go like “put these magic numbers in, and it works”.

For now I entered "sectors": [[134217728,2048]], and it kinda makes sense. 134217728 is the flash start address and 2048 the page size - but could you point me to any documentation on this settings - or to values needed for my specific mcu?



You can find some comment about the sectors information in CMSIS device support pack here:

mbed-os/tools/arm_pack_manager at 0c9be22f58a75c2dee5902525b953aec21e0ace5 · ARMmbed/mbed-os · GitHubinit.py#L87

And CMSIS official document here:

You can also find similar topic here:

The STM32WLE5CC is not listed in the https://github.com/ARMmbed/mbed-os/blob/master/tools/arm_pack_manager/index.json, but you can probably use (or copy and modify) STM32WL55JCIx config.