aboutsummaryrefslogtreecommitdiff
path: root/src/jtag
AgeCommit message (Collapse)Author
2012-03-14Automatically prepend v1 mass storage protocol.Mathias K
This patch prepend the v1 mass storage protocol to the command buffer and simplify the usb read/write handling. Change-Id: I709602600e93cd1eb5848fa9f4d15659ba85eb35 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/506 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-13ecosboard: delete bit-rotted eCos codeØyvind Harboe
Change-Id: Iff7943eb9da3f41dcc45492acd0f36cf63b3497f Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/503 Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Tested-by: jenkins
2012-03-13jtag: basic support for P&E Micro OSBDM (aka OSJTAG) adapterJan Dakinevich
This driver provides support for the P&E Micro OSBDM adapter (sometimes named as OSJTAG), mounted on the Freescale TWRK60N512 bord. Thus, it provides a quick start when working with this board. The driver doesn't use BDM commands, but work with OSBDM adapter using only JTAG commands. Change-Id: Ibc3779538e666e07651d3136431e5d44344f3b07 Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com> Reviewed-on: http://openocd.zylin.com/492 Tested-by: jenkins Reviewed-by: Tomas Frydrych <tf+openocd@r-finger.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-29stlink-v1: fix memory writesSzymon Modzelewski
implement stlink_usb_send and use it to fix stlink_usb_write_mem using two calls to stlink_usb_recv is inappropriate since each call issues a SG command on stlink-v1, resulting in errors Change-Id: I24ef9f2dda284e041dc4a532b59968a77eebe702 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/498 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-29stlink-v1: code cleanupSzymon Modzelewski
This patch moves the bulk of the stlink read/write code into the stlink_usb_xfer set of functions and implements stlink_usb_recv in terms of the generic stlink_usb_xfer stlink_usb_xfer will be needed to implement stlink_usb_send without code duplication stlink_usb_xfer: -sends the stlink command -performs a read or write (as requested) -checks the status (v1 only) Change-Id: I0137d52620bd4883d46c9977a9e73f67622000a1 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/477 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-29stlink-v1: fix memory writesSzymon Modzelewski
implement stlink_usb_send and use it to fix stlink_usb_write_mem using two calls to stlink_usb_recv is inappropriate since each call issues a SG command on stlink-v1, resulting in errors Change-Id: I52ff9ee8f5d9ae0d47356477468eb98952205c99 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/478 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-26jtag: use correct tap -ignore-version maskSpencer Oliver
when -ignore-version is used we should mask of the upper 4bits not 8bits. Change-Id: I9ffe24c2aeeb414677357a647609fdf018890194 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/473 Tested-by: jenkins
2012-02-26jtag: fix cmd scan_chain expected_ids bugSpencer Oliver
This fixes scan_chain to correctly print all the expected_ids. Change-Id: I93738980d85e0fe369d40c58b19339424d37ec34 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/474 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-02-22stlink: support expected-id 0Spencer Oliver
This brings the stlink driver inline with the rest of OpenOCD. If the user configures the tap as -expected-id 0 then the IDCODE will be treated as a wildcard and ignored. Change-Id: I99160c69b2b40f5b1f608bb59ab6630894502fd8 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/476 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-02-17stlink: add error status checkMathias K
This patch add the status check. Change-Id: I0fdb9bf66dad5ae416c7aa4c6e19116f846571f9 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/463 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-16Fix typo that result in recursion.Mathias K
Change-Id: Ie1102b4960bcb5acb254eae69b94fe87ab33dd0b Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/462 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-16build: fix automake 1.11.2 issuesSpencer Oliver
automake 1.11.2 throws `pkglibdir' is not a legitimate directory for `DATA' if nobase_dist_pkglib_DATA is used. We work around this issue by defining our own location. Change-Id: I3c29e2df0b67e745283c50d358e31699bd60dc74 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/457 Tested-by: jenkins
2012-02-16Add bootloader mode.Mathias K
This patch add the bootloader define. Change-Id: I280a8a35c3514910dd381de3ab8ad59c9bd74ca1 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/455 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-06doxygen: use correct comment syntaxSpencer Oliver
This issue was caused by uncrustify not correctly converting the doxygen comments. Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Change-Id: Ie6dc3b057a08603b670cb27312e5f0d989426e6c Reviewed-on: http://openocd.zylin.com/431 Tested-by: jenkins
2012-02-06build: cleanup src/jtag/drivers directorySpencer Oliver
Change-Id: I99c08ec0132d5a15250050e718310f1ddd9fe546 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/425 Tested-by: jenkins
2012-02-06build: cleanup src/jtag directorySpencer Oliver
Change-Id: I7caf57ca3d9dfbe152504472a6bb26c2a28b92e8 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/423 Tested-by: jenkins
2012-01-30STLINK: add check for the supported jtag API versionMathias K
This patch add a validation for the supported jtag api version. Change-Id: I0b51350e58e351d6662f4039c0a9e9d0d79ba4ec Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/405 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-27STLINK: Test device version (v1/v2) on usb transfers and add sg supportMathias K
This patch test the device version and differentiate between v1 and v2 devices. Change-Id: Ie79bf2c5534211493b004329fb6d5b9d4ea5453b Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/396 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-27STLINK: swd transport renamed and jtag+swim transport addedMathias K
This patch add jtag support to the stlink driver add two new transport types, JTAG and SWIM. Change-Id: I7089d74250330be5c6a01c24066307641df7d11e Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/393 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-18cmd: add missing usage varsSpencer Oliver
we should have caught them all - hopefully. Change-Id: I35435317fccaf5ad0216244d69f76db6857bb582 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/381 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-12stlink: handle wrong initialization file if no layout was specifiedMathias K
This patch remove the hardcoded default layout and return an error if no layout was specified in the configuration file. Change-Id: I0e7833faa2dc194e727122840bcbdacd321cc4fd Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/369 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-12stlink: add read/write 8bit memoryMathias K
This patch add layout api funtions and implementation to read/write 8bit memory. Change-Id: I8d145eb07e5afa9ce1830578e57d80a80d21e7dc Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/366 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-12stlink: correctly signal stlink_interface_open failureSpencer Oliver
give the user a error msg on open failure. Change-Id: If4a57bac7f3e1746c2a05c7a96747a38da188041 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/368 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-01-12cmd: add missing usage varSpencer Oliver
Change-Id: I0f05d643b0801b19cc3beb88f0d12d7e4c83ef9c Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/356 Tested-by: jenkins
2012-01-12stlink: add dummy speed handlersSpencer Oliver
Change-Id: I0445be7867637728145941b06225dc0acc5380e8 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/355 Tested-by: jenkins
2012-01-04Change return value on error.Mathias K
On wrong parameters a error is signalized to the calling function. Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960 Signed-off-by: Mathias K <kesmtp@freenet.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/282 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-04retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERRORØyvind Harboe
Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/300 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-04build: fix make distSpencer Oliver
add missing files to distribution after previous commit. Change-Id: I0e4b278c090c71d15dd059b6755c9821427cc8ab Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/332 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-01-03ST-LINK USB initial releaseMathias K
ST-Link USB support added. Change-Id: I2812646f2895b1529ff3f911edbdce7fa0051c8f Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/261 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-03Make jim functions public accessible.Mathias K
Change this 2 functions to make it accessible for other tcl interfaces. Change-Id: Idee07fcc779941b037a05a40c021e3fb0b1a4a7a Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/277 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-03add private data pointer to the tap interfaceMathias K
This will give us the ability to add special data structures and new interfaces without rewriting the complete jtag engine. Change-Id: I21a6e1daa96c5f4d111bbb734c7c1fbc2eaee227 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/244 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-23jtag: only if an in_value storage is provided will the captured IR value be ↵Øyvind Harboe
checked added comments and removed bogus assert. Change-Id: Ic7aa56570a84834b1265df03d25a47fd11c4d626 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/297 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-20jtag: make caller always allocate bufferØyvind Harboe
simplifies the API and there is only one remaining user at this point. Is the implementation busted where the check does not actually happen now? Change-Id: I776a43766f5576a08df320f6fe41a2750d101bde Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/264 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-20jtag: retire jtag_alloc_in_value32Øyvind Harboe
no longer used after arm7/9tdmi.c stopped using it. Change-Id: I65bfe67641970e63e8276cbd378aa68f5701a8d9 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/263 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-16Initialize return value.Mathias K
Because no future error checking we will initialize the pointer to a know value. Change-Id: I2466eeb413245a398927ec9f3742c2a9a3d51baf Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/283 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-12-13zy1000: fix crash in JTAG over TCP/IPØyvind Harboe
disable asynchronous callbacks and reads as minidriver requires reads and callbacks to be synchronous. Could possibly be fixed by some design work. Change-Id: I7ca79a551085b2e8ba6928e1762d1baed6e95d4b Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/260 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-12-12jlink libusb-1.0 driver.Mauro Gamba
jlink modified to use the new usb abstaction layer. During the configuration process we can select if use libusb0 or libusb-1.0 library for this driver. Change-Id: I70bc9ee2f89b7597e0f64ea80cad7f1b9070f01b Signed-off-by: Mauro Gamba <maurillo71@gmail.com> Reviewed-on: http://openocd.zylin.com/236 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-02libusb: Fix build issues under cygwin/mingwSpencer Oliver
This fixes issues with the folliwing patch under cygwin/mingw builds. http://openocd.zylin.com/236 Change-Id: I7dd0b2d09cc64568bc99b16aa32e791a8273c5db Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/240 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Mauro Gamba <maurillo71@gmail.com>
2011-11-25Fix unused variables error in amt_jtagaccelEvan Hunter
Change-Id: Ic64cf4e3b5cf8c1ea75a13577728b0cb0d70068e Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/237 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-18usbprog: fix shadowed declaration warningSpencer Oliver
see Trac #38 Change-Id: If86fda797391f10d745384794b68e60380ef0b21 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/204 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-18scripts: notify user of deprecated jtag_* functionsSpencer Oliver
Change-Id: Ia97dda6918e20fb29d6e76d43856eede8fcc60dd Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/203 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-18libusb-1.0 supportMauro Gamba
The configuration script check for libusb-1.0 availability first and only if not found check for libusb-0. So if both libraries are installed on the system the build script will use libusb-1.0 It's possible to force compiling with libusb-0 with the --enable-libusb0 switch. If the driver support only libusb0 the script check anly for it. Change-Id: I7eb045d4e2bd553abefad53f3f4023ff46b0f5f6 Signed-off-by: Mauro Gamba <maurillo71@gmail.com> Reviewed-on: http://openocd.zylin.com/33 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-18Revert "build: fix gcc 4.6.2 warnings"Spencer Oliver
This reverts commit 0ef5a90d93c5a026bcf70132e60e957ae339d1e1 Causes older versions of gcc to break - need to look into a better fix. This passed through the jenkins build as we originally did not build this module - we do now. Change-Id: Iafeac8442b2249269ff45a52ccd3e2870920f635 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/214 Tested-by: jenkins
2011-11-18build: fix gcc 4.6.2 warningsSpencer Oliver
see trac #47 Change-Id: I48a3e963354dfc82209477672c2508c96fb737d6 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/198 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17presto: fix tms_sequence short issueRobert Pasz
fix issue when using tms_sequence short see Trac #31 Change-Id: I22a9cd2af59eae4d8a276dae60b6a99d05af53bb Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/201 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-16bitq: make private functions staticAndreas Fritiofson
Change-Id: I3fabbdbda4ba8ba6557d79b97444fe06f1710b58 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/209 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16bitq: reduce scope of variablesAndreas Fritiofson
Change-Id: Ie1049b9d8ed5e44aee038e9181e423c35b4263c4 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/208 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16bitq: remove the remaining static variablesAndreas Fritiofson
in_mask and in_idx are just another encoding of the same state information that is already kept in bitq_in_state.bit_pos so derive them from that instead of maintaining them separately. Change-Id: I4ac6bbe923698a8c1090a785b8babcbb90f82931 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/207 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16bitq: remove a static variableAndreas Fritiofson
in_buff is only ever set to field->in_value and that pointer is still available when the parsing is restarted so it could just as well be used directly, removing the need for the static variable. Change-Id: I3dd7a8315ed5c5bdc3bfb74044f89492bca9816c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/206 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16bitq: remove dead codeAndreas Fritiofson
field->in_value is already checked so it must be non-null here, which means the else clause can never execute so the entire buffer allocation and handling code is completely dead. Change-Id: Id465012a7e607349401d554fc7a8e5db7e967998 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/205 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>