2026-04-09 6:15 PM - last edited on 2026-04-10 10:21 AM by mƎALLEm
Hi,
I use OEMiROT_Appli_TrustZone +OEMiROT_Boot to do some change in order to migrate to my project.
Version: STM32Cube_FW_H5_V1.5.0
1.i change the secure image and non secure image size in flash_layout.h from OEMiROT_Boot.
#define FLASH_S_PARTITION_SIZE (0x20000) /* 128KB for S partition */
#if defined(DEVICE_1M_FLASH_ENABLE)
#define FLASH_NS_PARTITION_SIZE (0x30000) /* 192 KB for NS partition */
#else
#define FLASH_NS_PARTITION_SIZE (0x60000) /* 384 KB for NS partition */
2.then rebuild the OEMiROT_Boot.
it will autocratically change the ld file and image.xls size of OEMiROT_Appli_TrustZone.
3.rebuild OEMiROT_Appli_TrustZone secure ap and non secure app
4.execute STM32Cube_FW_H5_V1.5.0\Projects\NUCLEO-H563ZI\ROT_Provisioning\OEMiROT\provisioning.bat OK
5.reconnet the board with UART . it shows the error as follow:.
INF] TAMPER Activated
[INF] BANK 1 secure flash 0, 27] : OB [0, 14]
[ERR] Unexpected value for secure flash protection
2026-04-30 9:55 AM
Hello @hongjin ,
in your environment, the postbuild updates .sh scripts and not .bat scripts
This explains why configuration is not aligned.
There is a test at beginning of postbuild.sh to check if you are running on windows and then launch the postbuild.bat that will update .bat scripts.
But it may be possible that this test does not work on your configuration
Test is this one: echo ${OS} | grep -i -e windows -e mingw
Best regards
Jocelyn