From 9ed6707716b72a88ba6b31219b766c1562aec8d0 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Fri, 17 Jul 2020 14:57:23 -0700 Subject: Further deprecate `-rtos riscv`. (#499) * Further deprecate `-rtos riscv`. Now using `-rtos riscv` will result in a failure, which you can (until the end of this year) bypass by adding `enable_rtos_riscv` to the configuration. Change-Id: Ic714c303dc1b00c19e8956609730c0f83c845cb6 * Make checkpatch happy. Change-Id: I0469ec37d38ad2eadf25efb5b2b7ac88391c0f51 --- src/target/target.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/target/target.c') diff --git a/src/target/target.c b/src/target/target.c index bccafbf..ad33fa4 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5948,6 +5948,17 @@ COMMAND_HANDLER(handle_fast_load_command) return retval; } +bool enable_rtos_riscv; +COMMAND_HANDLER(handle_enable_rtos_riscv_command) +{ + if (CMD_ARGC != 0) { + LOG_ERROR("Command takes no arguments"); + return ERROR_COMMAND_SYNTAX_ERROR; + } + enable_rtos_riscv = true; + return ERROR_OK; +} + static const struct command_registration target_command_handlers[] = { { .name = "targets", @@ -5964,6 +5975,14 @@ static const struct command_registration target_command_handlers[] = { .chain = target_subcommand_handlers, .usage = "", }, + { + .name = "enable_rtos_riscv", + .handler = handle_enable_rtos_riscv_command, + .mode = COMMAND_CONFIG, + .usage = "enable_rtos_riscv", + .help = "Allow the use of `-rtos riscv` for just a little longer, " + "until it will be completely removed at the end of 2020." + }, COMMAND_REGISTRATION_DONE }; -- cgit v1.1