2025-11-13 4:26 AM
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
Solved! Go to Solution.
2025-11-17 12:09 AM
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
2025-11-13 7:14 AM
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.
2025-11-14 1:04 AM - edited 2025-11-14 1:21 AM
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
2025-11-17 12:09 AM
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
2025-11-25 8:05 AM - edited 2025-11-25 8:05 AM
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.