cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H563 OEMiROT Non-Secure Application flash size

JungerGott
Associate II

Hello,

starting from the example application of the OEMiRot boot project, I noticed that the NS application size is limited to 640kB in the flash_layout.h  (#define FLASH_NS_PARTITION_SIZE (0xA0000) /* 640 KB for NS partition */)

Since there is 1MB avalaible in the slot, I would like to increase this size from 640kB to 896kB. A first naive change is just to change the define from 0xA0000 to 0xE0000 which leads to the state that the bootloader doesn't find a bootable image anymore.
How do I set a larger non-secure application size to have a benefit of the 1MB flash slot?

 

Best regards,
Stefan

1 ACCEPTED SOLUTION

Accepted Solutions
JungerGott
Associate II

Hi,

I solved the problem. There was a not updated OEMiROT_NS_Code_Image.xml file where the fields "Firmware download area offset" and "Firmware area size" weren't correctly updated. It was necessary to copy manually the folder "Images" from the bootloader project location to the project location.

 

BR,
Stefan

 

View solution in original post

4 REPLIES 4
Bubbles
ST Employee

hi @JungerGott,

you probably need to resize also the secure partition (shrink it). Have you already seen all the documentation?

I recommend to start reading here: 

Security:How to adapt a user application to ROT for STM32H5 - stm32mcu

Security:OEMiRoT OEMuRoT for STM32H5 - stm32mcu

Security:OEMiRoT STM32H5 How to Introduction - stm32mcu

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.

JungerGott
Associate II

Hello Bubbles,

thanks. I can't shrink the secure partition because it's already small (24kB) and this partition is located right before the non-secure partition, so it should have no impact on it.

I already know these documents but there isn't mentioned how to handle different partition sizes.

Just saw, that if I change the non-secure partition size to an even smaller value, the bootloader also doesn't start the application anymore. Obviously the size itself is somewhere used/checked in the bootloader project?

BR,
Stefan 

JungerGott
Associate II

Hi,

I solved the problem. There was a not updated OEMiROT_NS_Code_Image.xml file where the fields "Firmware download area offset" and "Firmware area size" weren't correctly updated. It was necessary to copy manually the folder "Images" from the bootloader project location to the project location.

 

BR,
Stefan

 

Hi @JungerGott,

thanks for sharing your solution!

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.