Possibility of using MCUBoot middleware directly in STM32CubeMX2
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.
