stm32f4: Add option erase command

--
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
>From d488dffe4dab4e5188c750489006260745a9e25a Mon Sep 17 00:00:00 2001
From: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Date: Mon, 15 Apr 2013 15:26:58 +0200
Subject: stm32f4: Add option erase command
This commit is contained in:
Uwe Bonnes 2013-04-15 15:28:02 +02:00 committed by Gareth McMullin
parent 9c95f039cf
commit 6b7babf624
1 changed files with 5 additions and 1 deletions

View File

@ -331,10 +331,14 @@ static bool stm32f4_cmd_option(target *t, int argc, char *argv[])
ADIv5_AP_t *ap = adiv5_target_ap(t);
if ((argc == 3) && !strcmp(argv[1], "write")) {
if ((argc == 2) && !strcmp(argv[1], "erase")) {
stm32f4_option_write(t, 0x0fffaaed);
}
else if ((argc == 3) && !strcmp(argv[1], "write")) {
val = strtoul(argv[2], NULL, 0);
stm32f4_option_write(t, val);
} else {
gdb_out("usage: monitor option erase\n");
gdb_out("usage: monitor option write <value>\n");
}