aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-08-11Allow transports to override the selected target (hla configs unification)Paul Fertser9-6/+99
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 Gratton1-1/+8
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-02drivers/jlink: Revert old workaroundAndreas Fritiofson1-22/+0
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 Fertser1-1/+3
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 Fertser1-10/+255
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-02Fix some problems with the bin2char utilityAndreas Fritiofson6-32/+28
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 Fertser5-70/+17
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-10Adding support for the Atmel SAMR21.Thomas Schmid1-0/+13
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 Muranaka1-0/+5
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 Rempel1-0/+12
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-04kinetis : Added Kinetis-K Series MDM-AP ID.Nemui Trinomius1-1/+2
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 Dasu3-399/+400
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ı4-129/+102
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ı4-30/+236
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 Fertser1-18/+4
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 Fertser1-28/+41
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 Fertser1-0/+2
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 Dasu1-4/+16
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 K1-10/+7
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 Fertser1-2/+4
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-28jtag/drivers/ftdi: require defining SWD_EN signal for SWD modePaul Fertser1-26/+14
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 Fertser1-0/+31
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 Fertser1-1/+14
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 Fertser1-0/+26
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 Fritiofson2-3/+3
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-28Add FTDI SWD driverAndreas Fritiofson1-4/+255
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 Fritiofson4-7/+7
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 Fritiofson1-0/+103
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 Fritiofson1-28/+28
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 Fritiofson4-8/+4
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 Fritiofson1-1/+1
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 Fritiofson5-190/+160
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 Smirnov1-8/+8
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 Smirnov2-2/+43
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 Smirnov1-29/+27
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 Fertser1-75/+0
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 Fertser2-6/+23
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 Fritiofson2-12/+20
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 Fritiofson1-12/+15
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 Fritiofson6-205/+5
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 Fritiofson3-3/+34
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 Fritiofson1-20/+4
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>
2014-06-28adi_v5_swd: Improve SWD supportFatih Aşıcı4-20/+121
Fix bug in parity calculation macro. Cache and update the selected DP bank when necessary. Add aborts when the Ack code signals a failure (we should really only clear the sticky bits, but this will do for now). Change-Id: I38a4da136ba1d9e989b33c1875a80c0b1b2be874 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/1950 Tested-by: jenkins
2014-06-22jtag/drivers/jlink: better diagnostics for RCLK problemsPaul Fertser1-1/+2
The JLink protocol description doesn't really specify it for JTAG-level commands but the real life evidence is that 0x01 error code means "Adaptive clocking timeout" as it does for e.g. WRITE_MEM_ARM79. Change-Id: I4e3b568742814271919f92d202713968c8fcccfb Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2169 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22flash: samd: add SAMD10 and SAMD11 part IDsAndrey Yurovsky1-0/+32
Add part IDs for the new SAMD10 and SAMD11 parts within the Atmel SAMD family, they have the same Flash controller as the other samd parts and should be supported by the at91samd driver. Compile-tested only. Change-Id: I493ae96a7d7e8d19e607fd9a4b6544a982be42b3 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/2170 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22target: arm_adi_v5: added types and subtypes based on latest coresight ↵Jiri Kastner1-0/+50
documentation while investigating coresight components, i've found some new partnumbers and devtypes. Change-Id: Ie68032b0b21d542c2084f80db38b06f5cd4c7591 Signed-off-by: Jiri Kastner <cz172638@gmail.com> Reviewed-on: http://openocd.zylin.com/2166 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22openrisc: add support for JTAG Serial PortFranck Jullien6-7/+419
Change-Id: I623a8c74bcca2edb5f996b69c02d73a6f67b7d34 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/2162 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22openrisc: restore current JTAG module while polling the CPUFranck Jullien1-1/+10
Change-Id: I93827afaa164d23a93bdddbfa864624b18473f45 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/2163 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22flash/nor/tcl.c: fix formatting in "rejected" error messagePaul Fertser1-1/+1
The error message (with the usage field unpopulated) looks like this, obviously missing at least a space before Usage: Error: 'fm3' driver rejected flash bank at 0x00000000Usage (null) Change-Id: I2a625676e784d02942823f972a201f7f4f810c68 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2161 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-06-22svf: Only read TDO back from the device if we actually need to look at the bits.Joshua Wise1-2/+2
This results in a 90% speedup on USB-Blaster, which serializes repeated TDI input against TDO readback; program time on an 5CGXFC5C6F27 part was dropped from 2m30s to 9s. Signed-off-by: Joshua Wise <joshua@joshuawise.com> Change-Id: I92d5a8b800492283d619328549235b610528c338 Reviewed-on: http://openocd.zylin.com/2145 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>