Skip to main content
Associate
July 16, 2026
Question

Possibility of using MCUBoot middleware directly in STM32CubeMX2

  • July 16, 2026
  • 2 replies
  • 66 views

​@User_MV Thank you for all this information and for the CMake files. This helped me to create an OEMiRoT project exclusively with CMake, dropping the need for any provisioning script.

 

​@Saket_Om I’m looking forward for the possibility of using MCUBoot middleware directly in STM32CubeMX2. We can download it from the “Pack manager”, but it explicitely says “No” in the “Compatible” column (and thus it is not present in the middleware section). So what I did was just a git submodule, using mcuboot’s hal2 branch.

 

A change that I needed to do : increase the memory buffer length of mcuboot, otherwise I was getting errors with MBEDTLS_ERR_MPI_ALLOC_FAILED return code, with an user application of size 0x16000. So I doubled the value of ROT_MBEDTLS_MEM_BUF_LEN, from 0x1000 to 0x2000.

 


As a side note for anyone, make sure to call HAL_RCC_Reset() in either the OEMiRoT, or the user application. ST does it in the user application, but I prefer the other to do it in the OEMiRoT - just before jumping to the user application - which works great.

By the way, you’ll find the ioc2 configuration file for the OEMiRoT project here, as ST did not provide it. The only thing I changed is disabling some inits in mx_system.c because they would otherwise be init’d twice.

2 replies

ST Technical Moderator
July 16, 2026
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
ST Technical Moderator
July 16, 2026

Hello ​@TheBigBadBoy 

Thank you for your feedback.

I reported your request internally.

Internal ticket number: CDM0064398 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om