aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-08-11Allow transports to override the selected target (hla configs unification)Paul Fertser
This should allow to share common configs for both regular access and high-level adapters. Use the newly-added functionality in stlink and icdi drivers, amend the configs accordingly. Runtime-tested with a TI tm4c123g board. Change-Id: Ibb88266a4ca25f06f6c073e916c963f017447bad Signed-off-by: Paul Fertser <fercerpav@gmail.com> [gus@projectgus.com: context-specific deprecation warnings] Signed-off-by: Angus Gratton <gus@projectgus.com> [andrew.smirnov@gmail.com: additional nrf51.cfg mods] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Reviewed-on: http://openocd.zylin.com/1664 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-11newdap: Ignore -irlen/-irmask/etc newdap params on SWD or CMSIS-DAPAngus Gratton
Previously the -irlen parameter was required even though it is not a part of the SWD or CMSIS-DAP transports. This may eventually need to be changed for CMSIS-DAP once that supports JTAG as well. Change-Id: Ia02b67840c19c7cf1c7a75063648c0174176a311 Signed-off-by: Angus Gratton <gus@projectgus.com> Reviewed-on: http://openocd.zylin.com/2226 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-04interface/ftdi: Mark flyswatter.cfg as testedAndreas Fritiofson
- Flyswatter + Proxmark3 (Atmel AT91SAM7S256) - works - Flyswatter + Tiva Launchpad (EK-TM4C123GXL) - works Change-Id: I615e0ff9262be6ae1064fb2de8e6e810775e7db4 Tested-by: Ondrej Mikle <ondrej.mikle@nic.cz> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2237 Tested-by: jenkins
2014-08-02drivers/jlink: Revert old workaroundAndreas Fritiofson
This workaround broke usage with at least the I.MX6Q. The comment implies that talking to the J-Link dongle itself should fail if the target isn't reset, which sounds really strange. I'm guessing it just triggered another bug in OpenOCD or Segger FW which might have been fixed since. Revert and wait and see if there are any failure reports. Tested with Kwikstik (J-Link + Kinetis K40), not with the mentioned adapter. Change-Id: I97f555efe079bd99c098bf483491d9509b2363ad Signed-off-by: Roy Spliet <rspliet@mpi-sws.org> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2147 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-08-02drivers/jlink: fix SWD speed config, and set it before sending anythingPaul Fertser
During the initialisation a driver might need to communicate with the target (e.g. sending jtag2swd sequence), so when doing so it should honour the user-specified speed. Change-Id: If84fea6057fda9edcf2c0a653edfbab2500e3cdd [andrew.smirnov@gmail.com: fix khz/hz confusion] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2224 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-02drivers/jtag/jlink: support SWD modePaul Fertser
Quick attempt at SWD support, closely modelled after ftdi. Change-Id: I25140d80c5be7b2f8f0e2ef722a4ba4df0da4cf3 Signed-off-by: Brian Campbell <Brian.Campbell@ed.ac.uk> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2141 Tested-by: jenkins Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-02tcl/board: fix all the remaining boards that were sourcing ft2232 configsPaul Fertser
This was reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751372 . Change-Id: I258f3d40593ff2966ce3ca61c13a23699d1b162f Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2230 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-02Fix some problems with the bin2char utilityAndreas Fritiofson
Don't hardcode the type for the array, just output the array initializer so the includer can choose the type and storage class, zero-terminate at will and so on. Change-Id: I6d5e0710eaaba0a218b3eb32f6569177356f4462 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2176 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-08-02Provide od+sed replacement for the bin2char helperPaul Fertser
Using custom build-time tools is always more problematic, especially for cross-compiling. This alternative implementation assumes "od" (IEEE Std 1003.1-2001) and sed are available which should be the case for any reasonably modern system. Change-Id: I0208f475648c78e7dca127ff4bab60d314b2bf53 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2139 Tested-by: jenkins Reviewed-by: Fatih Aşıcı <fatih.asici@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-07-10tcl/board: add STM32429I-EVAL and STM32439I-EVAL dev boards from ST.Fredrik Hederstierna
Change-Id: I304b6e7bae832391f11d53003299d68e31b0e4ef Signed-off-by: Fredrik Hederstierna <fredrik@hederstierna.com> Reviewed-on: http://openocd.zylin.com/2171 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-07-10tcl/target/stm32l: restore slow clock on resetPaul Fertser
Change-Id: I63eafaa38b188fe50c13ab966be44a3eaa2006b0 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2188 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-10Adding support for the Atmel SAMR21.Thomas Schmid
The Atmel SAMR21 is a Atmel SAMD21 with an Atmel RF233 in one package (two dies). Tested with the SAMR21 Xplained Pro eval kit. Change-Id: I1d79ea05834b925d7ec810527206fe86854e684b Signed-off-by: Thomas Schmid <thomas@rfranging.com> Reviewed-on: http://openocd.zylin.com/2194 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-10drivers/cmsis_dap_usb: Return with ERROR_FAIL if no CMSIS-DAP device is found.Masaki Muranaka
Even if it does not return, the initialization will be failed. But it is better to show why the error is caused. Change-Id: I399c7c94a7156be22723a9715e594061bb414a7e Signed-off-by: Masaki Muranaka <monaka@monami-ya.com> Reviewed-on: http://openocd.zylin.com/2189 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-10mips_m4k.c: make sure fast_data_area is safeOleksij Rempel
If load_image address overlap with fast_data_area, it will caouse different mysterius issues. This patch should prevent it. Change-Id: Ibc95e5aa3ac002a59755029496b6a72616e9287f Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-on: http://openocd.zylin.com/1854 Tested-by: jenkins Reviewed-by: Salvador Arroyo <sarroyofdez@yahoo.es> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-08cfg: Rename leftover cortex_a8 -> cortex_aAndreas Fritiofson
Change-Id: Id11d89ae2fb78854da4284afb7f14d8a892a2e49 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2197 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-04kinetis : Added Kinetis-K Series MDM-AP ID.Nemui Trinomius
Kinetis-K series has ID:0x001C0000 on MDM-AP IDR register. Other Kinetis(L/M/V/E) series have ID:0x001C0020. Change-Id: Iada37038cd239f7331ba80a3673b36bf7e18c555 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/2195 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-07-03cortex_a: target implementation renames cortex_a8 to cortex_aKamal Dasu
A previous commit changes the target name used by tcl scripts. commit d9ba56c295f057e716519a798bf9cdb4898c24f4 target: rename cortex_a8 to cortex_a The current change renames target functions and definitions in the implementation from cortex_a8 to cortex_a. This prepares the implementation to support Cortex-A8, A9, A15-MPCore in one place. Change-Id: I73b5a38a92c12ba5bd3b806fbbb664817575a6d7 Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com> Reviewed-on: http://openocd.zylin.com/1599 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-07-03vsllink: Port to libusb-1.0 APIFatih Aşıcı
Change-Id: I8a9a4dace8e7e8152947094b27b86f9a0d90fa61 Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com> Reviewed-on: http://openocd.zylin.com/1952 Tested-by: jenkins Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-07-03vsllink: Add SWD supportFatih Aşıcı
Tested with stm32f1x, stm32f4x and kl25 targets using SWD transport. Change-Id: I118d07371b53f402ea9ac73f874460a309c05100 Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1947 Tested-by: jenkins
2014-07-03jtag/drivers/opendous: remove ftime() callsPaul Fertser
ftime() is deprecated by POSIX.1-2008 and causes a warning on FreeBSD. The generic OpenOCD LOG_DEBUG implementation already outputs time of an event with a millisecond precision. Change-Id: Ic8e4ea27c268f07554ba519768b9bdfc4343f3e9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2187 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-03drivers/cmsis_dap_usb: restructure init sequence a bitPaul Fertser
This fixes the issue of improper initialisation sequence and in particular makes "cmsis_dap_vid_pid" config specification functional. Not really elegant but it's in line with the ftdi driver and so can be reworked in a uniform way later when the internal API is changed. Change-Id: Ief9fc64ad0ac24e1c66727153f383e4f30a830c7 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2192 Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-03jtag/drivers/cmsis_dap: fix check for hardcoded vids/pidsPaul Fertser
This is intended to fix cmsis_dap_vid_pid command but it doesn't because cmsis-dap has only one transport and it's auto-selected from "interface" command handler (before any other commands are run) and as the result cmsis_dap_usb_open() is called too early. Change-Id: Idaade73797d8df67a6439d096f6abc9736495599 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2191 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-07-03Openocd: svf: Add ability to ignore svf_check_tdo errorsKamal Dasu
Added Openocd commandline argument to ignore_error when the read back TDO does not match to expected value specified with TDO after masking with what is specified in MASK. This allows to continue to play entire SVF file ignoring errors. Error logs clearly show the failure reason and prints read back TDO value. Change-Id: I324f476fc16a003b35e6f2c5b63976431f49d54a Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com> Reviewed-on: http://openocd.zylin.com/2129 Tested-by: jenkins Reviewed-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28Add error handling and remove double readout.Mathias K
Remove double readout of DCB_DHCSR in target poll. The return value of the endreset event is handled and not ignored in target poll. Change-Id: I8fe026418dadcf0b0dcbb09acee871ad950937a2 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/1181 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-06-28jtag/drivers/ftdi: do not touch unavailable reset signalsPaul Fertser
If the current reset_config doesn't specify availability of nTRST or nSRST, just leave them alone, do not try to deassert them ever (asserting would be prevented by the upper layer). Change-Id: I90123c666e05a1c26f1e164625e82d766a3e3744 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2186 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28cfg: add SWD configs for stellaris ftdi based adaptersSpencer Oliver
Tested on hardware. Change-Id: Ib0191e97988dc79e9a62da74bd7fe25f548ff5a2 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2185 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins
2014-06-28tcl/interface/ftdi: add SWD configs for kt-link, olimex, rowley and resistor ↵Paul Fertser
hack Resistor hack is runtime-tested, other configs are based on schematics. Change-Id: I8daffa0434cd41d142fbec7c230a302284f7aa31 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2184 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-06-28jtag/drivers/ftdi: require defining SWD_EN signal for SWD modePaul Fertser
Use a special signal instead of a dedicated swd mask. Amend jtag-lock-pick_tiny_2 config accordingly. Change-Id: Ifb007a0b5434b590c52f936efd5f5458e913e2e4 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2183 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2014-06-28jtag/drivers/ftdi: declare standard JTAG signals on SWD initPaul Fertser
Unfortunately, this means they're available for config files only after selecting swd transport. Change-Id: Ia2afc1f3bfdba8d81efbb8ab964b174c0f7e2811 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2182 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28jtag/drivers/ftdi: add option to declare signal aliasesPaul Fertser
This adds -alias|-nalias options to ftdi_layout_signal command that allow to declare a new signal based on an already defined one. Change-Id: I552578ebcd12ae21957a1c0d3b7e878adeff6df0 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2181 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28Auto-select JTAG transport when appropriatePaul Fertser
I looked through all the target configs after stripping comments and such from them with sed to see what jtag-specific commands can appear first, and it looks like all the meaningful combinations should be covered. Change-Id: I8d543407b7f4ac8aca7354ecd50e841c8a04d5f3 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2179 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28Relax polling check if not in JTAG modeAndreas Fritiofson
Polling was disabled based on global variables jtag_trst and jtag_srst which were never touched in non-JTAG mode. Modify the check and remove the ugly workaround to avoid calls to a possibly uninitialized JTAG subsystem. Change-Id: I3b18c81e0fba7aaf35afe6f08c3fe8fa6f8443fd Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2143 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28cfg: Add SWD support to JTAG-lock-pick Tiny 2Andreas Fritiofson
Change-Id: I61eac507fa6861b7daf603ebca58e8bf3cc699c1 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2136 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28Add FTDI SWD driverAndreas Fritiofson
This is usable on most or all FTDI adapters using a small hardware tweak. TCK goes to SWCLK as expected. TDO should be wired to SWDIO. For TDI there are two options: Either add a 74HC126 or similar tri-state buffer between TDI and SWDIO, with OE controlled by a signal named SWDIO_OE. Or simply connect TDI and SWDIO together via a suitable resistor (220-470 ohms or so depending on the drive capability of the target and adapter). nSRST (and of course Vcc, GND) may be connected too but all other signals should be NC. Change-Id: Id36cf4577439be96bd4e5955c3026236e1cabced Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1958 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28transport: Constify the transports vectorAndreas Fritiofson
Change-Id: I0c874b5d4c97cf781d83bd381d701f770e069f72 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2135 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28swd: Add frequency setting and special/switching sequences to the APIAndreas Fritiofson
Change-Id: I6f3950374f2525a18bbcb9cbd340c447c20fb704 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2134 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28adi_v5: Make sure all bit masks are unsigned and wide enough.Andreas Fritiofson
Also align them with spaces instead of tabs. Change-Id: I1c01412a3ea77b29e8e133f5c92d05ed79d7c0f3 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2133 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28swd: Remove support for turnaround periods other than 1Andreas Fritiofson
ARM deprecated other trn periods in ADIv5.1 and one cycle is the only setting that is guaranteed to be implemented, as well as being the reset value in ADIv5.0. Thus it makes no sense supporting anything else. Change-Id: Iffa16bb0ce74788bca88fd3ace8a026148013d00 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2132 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28swd: Fix park bit polarity according to ADIv5.1 SupplementAndreas Fritiofson
Change-Id: I27293defd3f3c3bf37c9662f88689e85ba593d86 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2131 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28swd: Convert API to asynchronousAndreas Fritiofson
Change-Id: I859568dbb2ad4e92411980751c3f747bd70638b8 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1959 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28adi_v5_cmsis_dap.c: Simplify debugging outputAndrey Smirnov
Name of the function is already a part of the LOG_DEBUG macro, so there's no need to include it in the string itself. Change-Id: I18c3d5b746e9106d55104e490ccf5bc5e85cc380 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2138 Tested-by: jenkins
2014-06-28cortex_m: Do additional initialization during resetAndrey Smirnov
SAM4L requires additional steps to be taken right after SYSRESETREQ is issued in order to function robustly: - CMSIS-DAP DAP driver needs to explicitly check for sticky bit errors since it is possible for adapter to perform successful write opration, report no errors and then, under the hood, do some other things that will result in sticky bit being set. - Debugger needs to wait for security system to finish intialization and assert CDBGPWRUPACK before proceeding This change is related to commit http://openocd.zylin.com/#/c/1995/ Change-Id: I741c95a809bfd60d930cec9482239e4796a62326 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-on: http://openocd.zylin.com/2088 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
2014-06-28adi_v5_cmisis_dap: Separate ABORT from clearing sticky errorsAndrey Smirnov
We don't need to do full blown AP ABORT in case of CMSIS-DAP errors, and the code that was in place was not doing that(issuing AP ABORT) anyway. Change-Id: Ide83b1f8875d725da6cb0d53aae8229f8c6316b3 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2112 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
2014-06-28drivers/cmsis_dap_usb: remove jtag reset hacksPaul Fertser
This should no longer be needed after tcl scripts are fixed to avoid calling jtag subcommands when jtag is not used. Barely tested with an frdm board. Change-Id: I75f02b088e6134562ae634417d97c48e377df6e9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2130 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28tcl: introduce using_(jtag|swd|hla) helpers and use them in reset handlerPaul Fertser
Barely tested with plain SWD transport. Change-Id: I48b59136bf4294ffed737dba01f1b30ef83aa86b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2003 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28swd: Improve parity calculation and move it to types.hAndreas Fritiofson
It could be reused by SWD drivers and in other places. Change-Id: Ieed0cf70c111a73d3a42ed59f46a0cdd177a73d5 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1957 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28adi_v5_swd: Separate sticky error clearing from AP abortAndreas Fritiofson
Swd_queue_ap_abort should set DAPABORT, not only clear sticky errors. However, DAPABORT should not be set as soon as there is a single FAULT/WAIT response. It's an "emergency only" operations for use only when the AP have stalled the transfer for a long time. So these need to be separate functions. Change-Id: I37618447884faad54d846c2b07fa668ad505919d Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1956 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28adi_v5: Remove unused features of the DAP and SWD interfacesAndreas Fritiofson
These features are not currently used so remove or disable them before something starts to. Not having them around simplifies redesign of the APIs. Change-Id: Iad25cc71c48b68a1fa71558141bf14d5ab20d659 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1955 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28adi_v5_swd: Read RDBUFF once after a sequence of AP readsAndreas Fritiofson
Increases performance by a factor of two for long reads. Change-Id: I81a7a83835058560c6a53a43c3cc991100f01766 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1954 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-28adi_v5: Remove strange IDCODE check from dap info handlerAndreas Fritiofson
Otherwise it breaks SWD targets. The check seems really weird anyway since it loops through *all* TAPs after the ADIv5 target but doesn't do anything at all with the result, other than not setting the return values despite returning ERROR_OK. Remove a bogus initialization that was needed because of the odd behaviour of this routine when an IDCODE wasn't found. Change-Id: Ic086352f6af868b3406b00420291a0a671e3acac Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1953 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>