cfg: Fix Kinetis kwikstik/kx config
[openocd.git] / tcl / target / swj-dp.tcl
blob4f2b49692bb1582351e0ab23a38d22528aac4d2e
1 # ARM Debug Interface V5 (ADI_V5) utility
2 # ... Mostly for SWJ-DP (not SW-DP or JTAG-DP, since
3 # SW-DP and JTAG-DP targets don't need to switch based
4 # on which transport is active.
6 # declare a JTAG or SWD Debug Access Point (DAP)
7 # based on the transport in use with this session.
8 # You can't access JTAG ops when SWD is active, etc.
10 # params are currently what "jtag newtap" uses
11 # because OpenOCD internals are still strongly biased
12 # to JTAG .... but for SWD, "irlen" etc are ignored,
13 # and the internals work differently
15 # for now, ignore non-JTAG and non-SWD transports
16 # (e.g. initial flash programming via SPI or UART)
18 # split out "chip" and "tag" so we can someday handle
19 # them more uniformly irlen too...)
21 if [catch {transport select}] {
22 echo "Info : session transport was not selected, defaulting to JTAG"
23 transport select jtag
26 proc swj_newdap {chip tag args} {
27 if [using_hla] {
28 eval hla newtap $chip $tag $args
29 } elseif [using_jtag] {
30 eval jtag newtap $chip $tag $args
31 } elseif [using_swd] {
32 eval swd newdap $chip $tag $args
33 } elseif [string equal [transport select] "cmsis-dap"] {
34 eval cmsis-dap newdap $chip $tag $args