aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/stm32f1x.c
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2012-09-06 20:04:22 +0100
committerFreddie Chopin <freddie.chopin@gmail.com>2012-09-07 06:17:07 +0000
commit552e027f6867059302267e4d52624a6da158844a (patch)
tree41813fe2e787ef3dd6cb6793e39627f322a793a6 /src/flash/nor/stm32f1x.c
parente26ddb627ba035ab9bfc9c54a5585865a6c89132 (diff)
downloadriscv-openocd-552e027f6867059302267e4d52624a6da158844a.zip
riscv-openocd-552e027f6867059302267e4d52624a6da158844a.tar.gz
riscv-openocd-552e027f6867059302267e4d52624a6da158844a.tar.bz2
stlink: issue error for stm32 option writing
The stlink interface currently does not support 16bit read/writes. Until a fix is included we issue a error that this is unsupported. Change-Id: I4552cf2bd3b29e90ecc905325b743c08e2b92d67 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/808 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Diffstat (limited to 'src/flash/nor/stm32f1x.c')
-rw-r--r--src/flash/nor/stm32f1x.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index baf6b27..f077fe5 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);