2021-11-03 03:18 AM
Hi, I want to port SBSFU to my project which was written for the STM32F756VGT microcontroller by Keil.
So I have some questions regarding this situation.
At first, I took the `STM32F769I-Discovery` example of SBSFU as a base project that I need to make my changes to `2_Images_SBSFU` and `2_Images_SECoreBin` projects and also replace my project with `2_Images_UserApp` and also make some changes to it too.
so here I am, I want to change the addresses in mapping_fwimg.h.
2021-11-03 03:46 AM
Hi @ali rostami ,
I'm afraid specifically the STM32F756 doesn't offer much choice. Sectors 5, 6 and 7 are probably the best candidates to have slot 1, slot 0 and the swap area. Should you choose some other MCU, with smaller sectors, the swap size could be smaller.
For explanation of SWAP sector use, see UM2262 appendix B.
BR,
J
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-11-03 04:23 AM
Thanks @JHOUD
Oops, so bad.
so all of my understanding regarding my questions were right?
2021-11-03 08:37 AM
Hi @ali rostami ,
yes, that's right. If you choose 2x256kB sector for firmware slots, you need another 256kB sector for swap.
At least that's the default SBSFU mode of operation where swap is involved. In theory you could try to modify the SBSFU to some other method of image handling where swap was not necessary. With some compromise of course. It depends what you want to achieve and what do you need the second slot for.
BR,
J
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-11-06 06:27 PM
Many, if not the most, use cases doesn't even need 2 images or swap space. Those are necessary only in the case when there is a requirement to always have at least one complete and valid image. If the only requirement is that the user can always restore the device to working state, then a single image without a swap space and a proper bootloader is enough.