Not able to enable BOOT_LOCK through Hex file in STM32G4
Hi,
I am using STM32G431 MCU and PB8-BOOT0 pin is used as UART3 RX, with STM32 cube programmer i am able to change option bytes, but for my production, i need single hex file included with option bytes,
I tried with below method
In .s File added below lines to
SECTION optionbytes :CONST (1)
;-------------------------------------------------
//Check BOOTLOCK
// SEC_SIZE1, Reserved, BOOT_LOCK, Reserved
DC8 0x80, 0xFF, 0xFF, 0xFF
DC8 0x7F, 0x00, 0x00, 0x00
ENDIn .icf file added below lines
define symbol OPTSTART = 0x1FFF7828;
define symbol OPTEND = 0x1FFF782F;
place at address mem: OPTSTART { ro section optionbytes};
BOOT_LOCK option bytes values are appended in hex file as below in 0x1FFF7828 location


But I am seeing no change in option bytes, tried with other option bytes like BOR level, i am seeing the change for BOR, why BOOT_LOCK is not changing.
Thank you.
