diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2018-12-07 17:51:49 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2018-12-19 13:14:27 +0000 |
commit | 936dc7cbd93492c1df567c0727bee251427ac270 (patch) | |
tree | 0da422d9217fddf137324196f9668e23f6fcbd1d /src | |
parent | cb5c6477f53c352d5997f84fae6d527d9f2557e7 (diff) | |
download | riscv-openocd-936dc7cbd93492c1df567c0727bee251427ac270.zip riscv-openocd-936dc7cbd93492c1df567c0727bee251427ac270.tar.gz riscv-openocd-936dc7cbd93492c1df567c0727bee251427ac270.tar.bz2 |
target/cortex_m: fix cortex_m reset_config help and check for syntax error
Remove option 'srst' which is not recognized from on-line help and texi.
Check parameter and return syntax error if wrong option is entered.
Change-Id: I87daa423a9f53193a0b015080594820b933628f5
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4795
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/cortex_m.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index bb8c06d..4ce776c 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -2436,7 +2436,9 @@ COMMAND_HANDLER(handle_cortex_m_reset_config_command) LOG_WARNING("VECTRESET is not supported on your Cortex-M core!"); else cortex_m->soft_reset_config = CORTEX_M_RESET_VECTRESET; - } + + } else + return ERROR_COMMAND_SYNTAX_ERROR; } switch (cortex_m->soft_reset_config) { @@ -2478,7 +2480,7 @@ static const struct command_registration cortex_m_exec_command_handlers[] = { .handler = handle_cortex_m_reset_config_command, .mode = COMMAND_ANY, .help = "configure software reset handling", - .usage = "['srst'|'sysresetreq'|'vectreset']", + .usage = "['sysresetreq'|'vectreset']", }, COMMAND_REGISTRATION_DONE }; |