The example will guide you through a board provisionning with ST default credential, close the debug port of the board. Then using the debug authentication feature with certificate, we will re-open the debugging link for debuging and also for triggering a platform regression.
- NucleoH7S3L8 board
- USB type C cable
- CubeIDE 1.15.1 (or upper) with STM32H7RSCube V1.0.0 (or upper)
- CubeProgrammer 2.16.0 (or upper)
- Launch Cube IDE
- Go in Menu
File -> Open Projects from file system...
- Select the folder
STM32H7RSWorkShop-Debug_authentication\0-LED blinking project\Test_LED
Finish
- Select the
Test_LED_Boot
- Go in Menu
Run
->Debug As
->1 STM32C/C++ Application
- Select debug configuration
Test_LED_Boot
, thenOK
- Run the application, then stop the debug session
- LED LD2 orange is blinking
- Launch STM32CubeProgrammer
- Select connect mode
Hotplug
, this is a must ! - Click on
Connect
- Select icon for the option byte
OB
- Select
Product State
- Change the value from
39
to17
- Select
Apply
- On the pop-up "Do you want to provision a Deafult DA-Config? ", select
YES
- On the Warning pop-up, click
OK
- On the Message pop-up "OBKey Provisioned successfully....", click
OK
- On the Message pop-up "Secure Option Byte set up succeeded", click
OK
- Change product state value from
17
to72
- Select
Apply
- On the message pop-up : "Warning : Product state requested, verification could not be done", click
OK
- On the message pop-up : "Secure Option Byte set up succeeded", click
OK
- On the message pop-up : "Warning : Connection to device 0x.... is lost", click
OK
- On the message pop-up : "Error : failed to reconnect after reset", click
OK
The device is closed and our LED is blinking ! Device is ready to go on the field.
- Open STM32CubeIDE
- Select the
Test_LED_Boot
- Go in Menu
Debug configurations...
- Select
Test_LED_Boot_Return_from_the_field_analysis
- Select
Debugger
tab
- In debug authentication update
Key path
, thanksBrowse...
- set it to your installation path
...STM32H7RSWorkShop-Debug_authentication\1-Debug_authentication\dbg_auth_pubkey.pem
- In debug authentication update
Certificate path
, thanksBrowse...
- Set it to your installation path
...STM32H7RSWorkShop-Debug_authentication\1-Debug_authentication\dbg_auth_chain.EcdsaP256
-
Click on Debug
-
Close the debug session
Terminate
icon
- Launch STM32CubeProgrammer
- Select the
shield
icon - Select
DA
tab - Click on
Discover
- Click on
Close Debug
- On the message pop-up :
Target successfully locked
, clickOK
-
Click on
Discover
-
Update
Key File path
, thanksBrowse...
-
Set it to your installation path
...STM32H7RSWorkShop-Debug_authentication\1-Debug_authentication\dbg_auth_pubkey.pem
-
Update
Certificate path
, thanksBrowse...
-
set it to your installation path
...STM32H7RSWorkShop-Debug_authentication\1-Debug_authentication\dbg_auth_chain.EcdsaP256
-
Click on
Continue
-
Select
Full regression
-
Select
Execute
-
On the message pop-up :
Debug Authentication Sucess
, clickOK
![Debug config ](./img/regression_done.gif)
- Select icon for the option byte
OB
- Select
Product State
and check the value is39
Open state
![Debug config ](./img/check_reopen.gif)