Skip to main content
Associate III
March 17, 2025
Solved

postbuild for OEMiROT project H523

  • March 17, 2025
  • 1 reply
  • 722 views

Hi,

 

I have managed to extract the OEMiROT project from H533 into H523 and compiled it successfully using STM32CRYPTO library since H523 does only have limited cryptography accelerator. I have modified the flash_layout.h to match my application (which is only using the non-secure image with no data image). However, the OEMiROT bootloader firmware itself is configured with secure and non-secure parts.

 

I have been updating the postbuild.sh script to match my project structure. I am at the stage or running AppliCfg.exe and it error out on the flash layout with the following error

[ERR] The script was probably invoked manually with having certain macros nested in flash_layouts.h.
Please revisit the flash_layout.h file and hardcode values for the (NON-)SECURE_IMAGE_OFFSET and (NON-)SECURE_IMAGE_MAX_SIZE macros

I checked these macros and they are matching the ones in map.properties. I also tested with 

MCUBOOT_APP_IMAGE_NUMBER 1 and 2 with the same result

I attached the following files:

1. flash_layout.h

2. map.properties

3. postbuild.log

 

Kind Regards,

Hani

Best answer by hakeila

Hi,

 

I have fixed the issue. The flash memory layout related macros in the image_macros_processed_bl2.c were not matching the defs in flash_layout.h and thus the script error out. I made sure that the defs in image_macros_processed_bl2.c are compatible with the ones in flash_layout.h

 

Sorry for raising this issue unnecessarily 

 

Regards,

Hani

1 reply

hakeilaAuthorBest answer
Associate III
March 18, 2025

Hi,

 

I have fixed the issue. The flash memory layout related macros in the image_macros_processed_bl2.c were not matching the defs in flash_layout.h and thus the script error out. I made sure that the defs in image_macros_processed_bl2.c are compatible with the ones in flash_layout.h

 

Sorry for raising this issue unnecessarily 

 

Regards,

Hani