flash/nor/stm32l4x: Change 'option_read' output

Remove the verbose command output to enable processing with Tcl.

Change-Id: I97c2ffbd7bbbb3064a98f8977373f6c48272e71e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9000
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink
2025-07-13 19:56:45 +00:00
committed by Antonio Borneo
parent 9a5212560b
commit 20ca4f4bee
2 changed files with 5 additions and 8 deletions

View File

@@ -8486,10 +8486,8 @@ is the register offset of the Option byte to read.
For example to read the FLASH_OPTR register:
@example
stm32l4x option_read 0 0x20
# Option Register (for STM32L4x): <0x40022020> = 0xffeff8aa
# Option Register (for STM32WBx): <0x58004020> = ...
# The correct flash base address will be used automatically
> stm32l4x option_read 0 0x20
0xffeff8aa
@end example
The above example will read out the FLASH_OPTR register which contains the RDP

View File

@@ -2441,19 +2441,18 @@ COMMAND_HANDLER(stm32l4_handle_option_read_command)
if (retval != ERROR_OK)
return retval;
uint32_t reg_offset, reg_addr;
uint32_t reg_offset;
uint32_t value = 0;
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], reg_offset);
reg_addr = stm32l4_get_flash_reg(bank, reg_offset);
retval = stm32l4_read_flash_reg(bank, reg_offset, &value);
if (retval != ERROR_OK)
return retval;
command_print(CMD, "Option Register: <0x%" PRIx32 "> = 0x%" PRIx32, reg_addr, value);
command_print(CMD, "0x%" PRIx32, value);
return retval;
return ERROR_OK;
}
COMMAND_HANDLER(stm32l4_handle_option_write_command)