flash/stm32l4x: introduce 'stm32l4x trustzone [enable|disable]' command

this command will help to enable/disable or display the TrustZone security,
using the TZEN option bit.

Note: This command works only with devices with TrustZone, eg. STM32L5.
Note: This command will perform an OBL_Launch after modifying the TZEN.

Change-Id: I4aef15bf57d09c1658d37858143d23b1d43de1f0
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5542
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
Tarek BOCHKATI
2020-03-25 22:47:08 +01:00
committed by Oleksij Rempel
parent 1bce8d3d80
commit 84291d0269
2 changed files with 118 additions and 17 deletions

View File

@@ -7400,6 +7400,14 @@ write protected areas in a specific @var{device_bank}
Forces a re-load of the option byte registers. Will cause a system reset of the device.
The @var{num} parameter is a value shown by @command{flash banks}.
@end deffn
@deffn Command {stm32l4x trustzone} num [@option{enable} | @option{disable}]
Enables or disables Global TrustZone Security, using the TZEN option bit.
If neither @option{enabled} nor @option{disable} are specified, the command will display
the TrustZone status.
@emph{Note:} This command works only with devices with TrustZone, eg. STM32L5.
@emph{Note:} This command will perform an OBL_Launch after modifying the TZEN.
@end deffn
@end deffn
@deffn {Flash Driver} {str7x}