jtag: parse command options in 'swd newdap'
commit7a890a8f256f28b1c8b0dde3b62ab81c7c139d55
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 1 Jan 2023 17:26:53 +0000 (1 18:26 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 15 Jan 2023 15:11:50 +0000 (15 15:11 +0000)
treea1c4e140d12a1a6bf830e08f925eb39d8890ee6a
parent69571354f4741f791a4a70c68ca082f765f98c88
jtag: parse command options in 'swd newdap'

The same code is currently used for commands 'jtag newtap' and
'swd newdap' (plus dapdirect versions), but for SWD case the code
skips the parsing of the command line as not every flag is used.
This has the drawback that syntax errors get unchecked.

Move the check about the transport so the command line get always
parsed even when the corresponding flags are not useful.

Change-Id: I596c3beb04e9e8a9ebe6ee68a61395b679d43b3e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7427
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/tcl.c