How to start with OEMiSB on STM32U0

Revision as of 18:40, 17 January 2024 by Registered User

1. Introduction

Theoretical introduction article is available here.
The example solution is provided with the STM32CubeU0 package and consists of 2 parts:

  • Firmware/Projects/NUCLEO-U083RC/Application/ROT/OEMiSB_Boot
  • Firmware/Projects/NUCLEO-U083RC/ Application /OEMiSB_Appli (a simple Toggle LED application.)


2. Using the example

To ease the example generation and loading, a script is provided in the STM32Cube package. The script called “provisioning” is available in \Projects\NUCLEO-U083RC\ROT_Provisioning\OEMiSB.
The script execution is following steps: 1. Configuration management

    • RDP selection
      • 0: In this case the development mode is enabled
      • 1: Production mode is enabled, and debug is possible
      • 2: Production mode is enabled, and debug is not possible
    • Data size selection

2. Image generation

    • Compilation of the application and generating binary file.
    • Editing boot header files automatically.
    • Computing application HASH and generating hash area binary.
    • Compilation of the boot.

3. Provisioning

    • Remove old protections and initialize option bytes.
    • Perform mass erase.
    • Download application, boot and hash.
    • Hardening by enabling HDP and WRP.

The script is useful to automate hash generation, which would have to be manually imported into the binary on each build.