cancel
Showing results for 
Search instead for 
Did you mean: 

debug OEMiRoT-Boot project on U083 possible?

Hans_W
Associate

I'm aiming to use the OEMiRoT sample project as a concept for secure updating of a large single-slot application in STM32U083 (need application size at least 160kB for migration from STM32L071). For that I need to give the bootloader a driver for external SPI flash where the encrypted updates can reside that the application downloads. 

The How_to_start_with_OEMiRoT_on_STM32U0 manual doesn't address the concept of debugging OEMiRoT at all. The provisioning procedure works, using RDP level 0 (even with modified code, as I can see an error printout that I added in the bootloader init).
Starting a debugging session after this provisioning results in the debugger not being able to erase the sectors, on the other hand after erasing the chip beforehand (using ob_flash_programming.bat upto the erase part) it succeeds and I can debug, but immediately run into the protection mechanisms generating errors.

Is there any manual how to debug this project and which defines to disable/modify to debug the low level drivers before activating all protections again? To my surprise there isn't even a difference in preprocessor defines for the debug and release builds to automatically disable some of these protections in the debug build.

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello @Hans_W ,

did you try disabling the write protection in boot_hal_cfg.h in the OEMiROT Boot project ?

Something like this

// #define WRP_PROTECT_ENABLE

Normally this should allow you to use debugger on the secure boot without issue, as if is was a simple application.

Best regards

Jocelyn