command: fix the mode for command "jtag configure"
commit3117a318d42606cbcfd39559e144f6f6b0313fe9
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 7 Feb 2019 08:56:10 +0000 (7 09:56 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 7 Feb 2019 19:01:15 +0000 (7 19:01 +0000)
treedf0de411a0d2502e4d5907a717f67c55eaf5a82e
parent20ceec69a2ca038847c6b4cf604f0b79cc004ba7
command: fix the mode for command "jtag configure"

Before commit 877cec20dca6e78f9f029f0f173879cda101a6c2 ("command:
check command mode for native jim commands") all the jim commands
were erroneously treated as they had mode COMMAND_ANY.
The commit above fixes the code in order to check the mode and
permit running the commands only if the mode is respected.

Those jim commands that have incorrect mode were not detected nor
fixes because the wrong mode was masked by the missing mode check.
After the commit above, the wrong mode triggers error in several
existing configuration scripts.
A complete list of commands that now does not run anymore as
CONFIG_ANY is reported in ticket 225, but most of them have the
mode set correctly.
At least two instances of command "jtag configure" have the wrong
mode.

Fix the mode to CONFIG_ANY for command "jtag configure" in files
src/jtag/aice/aice_transport.c and src/jtag/tcl.c

Change-Id: I3f96c5fd24d7d463712cbaf1295284fe0dc56b23
Ticket: https://sourceforge.net/p/openocd/tickets/225/
Reported-by: Bill Paul <wpaul@users.sourceforge.net>
Fixes: 877cec20dca6 ("command: check command mode for native jim commands")
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4886
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
src/jtag/aice/aice_transport.c
src/jtag/tcl.c