diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index baf6b2752..f077fe548 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -249,6 +249,14 @@ static int stm32x_erase_options(struct flash_bank *bank) stm32x_info = bank->driver_priv; + /* stlink is currently does not support 16bit + * read/writes. so we cannot write option bytes */ + struct armv7m_common *armv7m = target_to_armv7m(target); + if (armv7m && armv7m->stlink) { + LOG_ERROR("Option bytes currently unsupported for stlink"); + return ERROR_FAIL; + } + /* read current options */ stm32x_read_options(bank);