openocd.git
11 years agoAdd abort when JTAG-DP transaction times out. 15/1115/3
Evan Hunter [Thu, 17 Jan 2013 10:23:55 +0000 (18:23 +0800)]
Add abort when JTAG-DP transaction times out.

Fixes system hang for devices that don't ignore
transactions to bad addresses.

Change-Id: Ia98344d7efc12951ef79dbc82b8f792b70a22cee
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/1115
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoarm_adi_v5: fix mem_ap_read_buf_u32() JTAG nastiness.. 77/1277/4
mike brown [Mon, 18 Mar 2013 17:19:14 +0000 (17:19 +0000)]
arm_adi_v5: fix mem_ap_read_buf_u32() JTAG nastiness..

Moved JTAG code out of transport-neutral file (arm_adi_v5.c) into
transport specific file (adi_v5_jtag.c).
Added ap_block_read to dap_ops interface (arm_adi_v5.h) to support
the move.

Change-Id: I796d3984f138aad052b97c77ac9c12ffd1158f74
Signed-off-by: mike brown <mike@theshedworks.org.uk>
Reviewed-on: http://openocd.zylin.com/1277
Tested-by: jenkins
Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agogdb server: Fix buffer overrun - sprintf appends a terminating null to the data which... 12/1312/2
Evan Hunter [Tue, 2 Apr 2013 06:35:23 +0000 (17:35 +1100)]
gdb server: Fix buffer overrun - sprintf appends a terminating null to the data which was overrunning the supplied buffer.

Fixes regression introduced in commit 07dcd5648d146d38f9ffa619f0737587e592d0b6

Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Change-Id: Iec64233c0da5a044fb984c4b1803309cb636efe9
Reviewed-on: http://openocd.zylin.com/1312
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoti_icdi: add icdi_usb_query result check 79/1279/2
Spencer Oliver [Tue, 19 Mar 2013 14:14:51 +0000 (14:14 +0000)]
ti_icdi: add icdi_usb_query result check

Change-Id: I0b40586677a77ee6ae46fe120a677616bde22d1e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1279
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agodocs: update incorrect urls 48/1248/3
Spencer Oliver [Sat, 16 Mar 2013 20:38:38 +0000 (20:38 +0000)]
docs: update incorrect urls

These were missed when git was moved to the new SF platform during Nov 2012.

Change-Id: I7b4ae9dea010d95f9bf4c26841b5b724f41768be
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1248
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
11 years agodocs: remove unnecessary whitespace 45/1245/2
Spencer Oliver [Thu, 14 Mar 2013 22:03:00 +0000 (22:03 +0000)]
docs: remove unnecessary whitespace

Change-Id: I11bad3de145d941b61e9bd4920bc3281ece91ab3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1245
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agodocs: fix html anchor xref links 44/1244/2
Spencer Oliver [Thu, 14 Mar 2013 21:38:19 +0000 (21:38 +0000)]
docs: fix html anchor xref links

makeinfo has a long outstanding bug that means @anchors are not correctly
formatted for split html, see:
http://lists.gnu.org/archive/html/bug-texinfo/2012-06/msg00000.html

The issue relates to using spaces or hyphens in the @anchor name.
Issue also reported via Trac #44

Change-Id: Id72e23375dd167674b2ae5b314e8242b90a72a5f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1244
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agoat91sam3: Wrong PLLA frequency calculations 07/1307/2
Thomas Schmid [Sat, 23 Mar 2013 19:13:46 +0000 (13:13 -0600)]
at91sam3: Wrong PLLA frequency calculations

The command 'at91sam3 info' ignores PLLA DIV values >1. This patch fixes it.
Tested on a SAM3S4C chip.

Change-Id: I051f41bb3dcefe1ac785fbcb48477a807daa16a2
Signed-off-by: Thomas Schmid <thomas.schmid@gmail.com>
Reviewed-on: http://openocd.zylin.com/1307
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
11 years agortos: fixed handling of qThreadExtraInfo packets 08/1308/2
Christian Gudrian [Sun, 24 Mar 2013 11:46:58 +0000 (12:46 +0100)]
rtos: fixed handling of qThreadExtraInfo packets

The commit "gdbserver: use common hexify/unhexify routines" [3d62c3d]
mis-replaced a call to "str_to_hex" with a call to "unhexify". "hexify"
should have been used instead.

Change-Id: I5f5904b1b422f819a6308e2c0740ea43d22c7d0b
Signed-off-by: Christian Gudrian <christian.gudrian@gmx.de>
Reviewed-on: http://openocd.zylin.com/1308
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
11 years agotarget: fix broken Cortex-R4 support 46/1246/2
Spencer Oliver [Fri, 15 Mar 2013 16:59:32 +0000 (16:59 +0000)]
target: fix broken Cortex-R4 support

This regression was caused due to the recent addition of R4 support and
the removal of the bulk_write_memory handler.

Change-Id: Ide692737f235c0e9906becb6f3502ba52c5907aa
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1246
Tested-by: jenkins
11 years agotarget: Retire target_bulk_write_memory() 14/1214/2
Andreas Fritiofson [Fri, 8 Mar 2013 20:13:42 +0000 (21:13 +0100)]
target: Retire target_bulk_write_memory()

The only caller was arm_nandwrite(). Replace that call with
target_write_buffer() instead, which in turn may end up calling the same
bulk_write_memory target API function.

Change-Id: If34c7474df5cf14af3b732fb4774816818f28e79
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1214
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agotarget: Add default implementation of bulk_write_memory 13/1213/2
Andreas Fritiofson [Fri, 8 Mar 2013 00:17:18 +0000 (01:17 +0100)]
target: Add default implementation of bulk_write_memory

Remove dummy implementations from all targets except arm7_9 and mips, which
are the only ones with real implementations. Replace with a single default
implementation simply calling target_write_memory().

Change-Id: I9228104240bc0b50661be20bc7909713ccda2164
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1213
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoarch: Added ARMv7R and Cortex-R4 support 58/358/6
Evan Hunter [Thu, 11 Oct 2012 22:45:33 +0000 (09:45 +1100)]
arch: Added ARMv7R and Cortex-R4 support

Rewrite to merge Cortex-A and Cortex-R code

Change-Id: I4541557980d43d1bba6e8d1bfeb04f536ed25a00
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/358
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoadi_v5: search for Debug and Memory AP support 09/909/6
Evan Hunter [Thu, 11 Oct 2012 22:07:45 +0000 (09:07 +1100)]
adi_v5: search for Debug and Memory AP support

Adds dap_find_ap() function.

Change-Id: I6643025624009b12d4936de67a605da52c07be49
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/909
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agocortex_a : optimize apb read/write access. 03/903/7
Evan Hunter [Tue, 23 Oct 2012 04:48:41 +0000 (15:48 +1100)]
cortex_a : optimize apb read/write access.

Rewrite: Adheres more closely to 'fast read/write' examples in TRM.
up to 50x faster

Change-Id: Ieb4da57d8367628f3e7306827a5b1f0ab550e641
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/903
Tested-by: jenkins
Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agojtag: add support for some probes that are mostly compatible with opendous 87/687/10
Stefan Mahr [Tue, 5 Jun 2012 21:22:38 +0000 (23:22 +0200)]
jtag: add support for some probes that are mostly compatible with opendous

This patch adds support for usbprog-jtag and usbvlab that are mostly compatible
to opendous except for IN and OUT endpoints and usb transfer mode.

Change-Id: I44557c2449fe7473295038efa6ae4fc8d80ec7bf
Signed-off-by: Stefan Mahr <stefan.mahr@sphairon.com>
Reviewed-on: http://openocd.zylin.com/687
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agojtag: usb_blaster: fix allocation of usb_blaster_device_desc 24/1224/2
Stefan Mahr [Tue, 12 Mar 2013 10:00:50 +0000 (11:00 +0100)]
jtag: usb_blaster: fix allocation of usb_blaster_device_desc

usb_blaster_device_desc was allocated, but never freed.

Change-Id: I764bd092c71b8c260b98aab0e7a1710fd7bfa9fd
Signed-off-by: Stefan Mahr <stefan.mahr@sphairon.com>
Reviewed-on: http://openocd.zylin.com/1224
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: jenkins
11 years agojtag: parport: avoid freeing read-only memory section 23/1223/2
Stefan Mahr [Tue, 12 Mar 2013 09:43:21 +0000 (10:43 +0100)]
jtag: parport: avoid freeing read-only memory section

If command parport_cable is not executed, parport_cable points to
const char array in read-only memory as default. On exit free()
will try to free this read-only memory. This patch uses strdup to
allocate memory when defining default setting.

Change-Id: I290e707ac6a37e9dc1b45c85ca51d8bd6aac6761
Signed-off-by: Stefan Mahr <stefan.mahr@sphairon.com>
Reviewed-on: http://openocd.zylin.com/1223
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agojtag: opendous: fix tap buffer overflow 16/1216/2
Stefan Mahr [Sat, 9 Mar 2013 16:50:54 +0000 (17:50 +0100)]
jtag: opendous: fix tap buffer overflow

Appending bits to TAP buffer doesn't check if there's enough space left.
This patch adds this check to fix TAP overflow error.

Change-Id: If80d5ab4a24983ad24f3cab31f9676d1590ebf5d
Signed-off-by: Stefan Mahr <stefan.mahr@sphairon.com>
Reviewed-on: http://openocd.zylin.com/1216
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agotarget: Remove read_memory_imp 19/1219/2
Andreas Fritiofson [Sun, 10 Mar 2013 13:39:31 +0000 (14:39 +0100)]
target: Remove read_memory_imp

Change-Id: Idc6ef3b075ccbb5945df8fea746011cb17175d8f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1219
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agotarget: Remove write_memory_imp 18/1218/2
Andreas Fritiofson [Sun, 10 Mar 2013 12:16:14 +0000 (13:16 +0100)]
target: Remove write_memory_imp

Change-Id: I5d933bc19443bba8a0193c90471fdd0614324a92
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1218
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agotarget: Remove soft_reset_halt_imp 17/1217/2
Andreas Fritiofson [Sun, 10 Mar 2013 11:50:29 +0000 (12:50 +0100)]
target: Remove soft_reset_halt_imp

Change-Id: I12c907584ef73de570eba2dcfeb8477cabc6098f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1217
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agodoc: opendous interface based on ft2232H 98/1098/4
Rodrigo Melo [Thu, 27 Dec 2012 22:50:52 +0000 (19:50 -0300)]
doc: opendous interface based on ft2232H

It was listed in the ft2232 based cables supported. Moreover, the
ft2232_channel option, which was added to support this cable, was explained.

Change-Id: I82ebc7bc10d6472f96ab150e78d623a617edccd2
Signed-off-by: Rodrigo Melo <rmelo@inti.gob.ar>
Reviewed-on: http://openocd.zylin.com/1098
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agointerface: opendous_ftdi config file added 96/1096/4
Rodrigo Melo [Thu, 27 Dec 2012 22:37:15 +0000 (19:37 -0300)]
interface: opendous_ftdi config file added

This config file add support to the opendous cable based on the chip ft2232H,
using the ft2232 interface driver.

Change-Id: I8171a0c475af8d61e081844ee86466a392138fb0
Signed-off-by: Rodrigo Melo <rmelo@inti.gob.ar>
Reviewed-on: http://openocd.zylin.com/1096
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoft2232: ft2232_channel option added 95/1095/5
Rodrigo Melo [Thu, 27 Dec 2012 22:31:21 +0000 (19:31 -0300)]
ft2232: ft2232_channel option added

With this option a different channel of the ft2232 chip can be selected using
a previously existing layout. It was made for a partner called Salvador
Tropea.

Change-Id: Ia0dedb2f50e232d089e73788735edc8f47ee23e6
Signed-off-by: Rodrigo Melo <rmelo@inti.gob.ar>
Reviewed-on: http://openocd.zylin.com/1095
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agodoc: Added MIPS target document 04/904/7
Drasko DRASKOVIC [Sun, 7 Oct 2012 22:41:36 +0000 (00:41 +0200)]
doc: Added MIPS target document

This document explains MIPS EJTAG operations
implementations within OpenOCD.

Change-Id: Ieaf01f8bc5a97d7b0f2c847bac5fbb2ccf8ba088
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Reviewed-on: http://openocd.zylin.com/904
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoKinetis: Flash command function matches datasheet 92/1192/6
Alex Austin [Sun, 3 Mar 2013 10:08:18 +0000 (04:08 -0600)]
Kinetis: Flash command function matches datasheet

The kinetis datasheets specify the flash registers as bytes rather
than as words, as the previous implementation did.  This also makes
a few code sections slightly less endian-magical.

Change-Id: If8f4adfc7f4341085ae5b6eacbf7d74bbd74cf08
Signed-off-by: Alex Austin <alex.austin@spectrumdsi.com>
Reviewed-on: http://openocd.zylin.com/1192
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoKinetis: Symbolic names for Addresses and Commands 91/1191/6
Alex Austin [Sun, 3 Mar 2013 01:19:15 +0000 (19:19 -0600)]
Kinetis: Symbolic names for Addresses and Commands

Change-Id: I2165b66c37bd1608139b5dd00f48124161e13ef0
Signed-off-by: Alex Austin <alex.austin@spectrumdsi.com>
Reviewed-on: http://openocd.zylin.com/1191
Tested-by: jenkins
Reviewed-by: Christopher Kilgour <techie@whiterocker.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agodocs: add gerrit http password url 07/1207/3
Spencer Oliver [Thu, 7 Mar 2013 12:12:26 +0000 (12:12 +0000)]
docs: add gerrit http password url

Add url to show where the http password is configured.
Also add note that password can also be saved to url git config.

Change-Id: I3c1a022580e5f73372b0c50e8d1d2f0b1498966f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1207
Tested-by: jenkins
11 years agotcl: add flash programming helper 99/1199/3
Spencer Oliver [Wed, 6 Mar 2013 15:29:15 +0000 (15:29 +0000)]
tcl: add flash programming helper

This adds a program proc that simplifies using OpenOCD as a standalone
programmer.

Change-Id: I6ece492cd878c170b734e8bb2e09fe8c4557d5a6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1199
Tested-by: jenkins
Reviewed-by: Jörg Fischer <turboj@gmx.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agortos: fixes warning 09/1209/3
Øyvind Harboe [Thu, 7 Mar 2013 11:56:19 +0000 (12:56 +0100)]
rtos: fixes warning

Change-Id: I45db15b16b52c71009d8830985f42ac88eabe160
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/1209
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agogdb: use stdio functions to convert parameters 28/1128/4
Spencer Oliver [Thu, 7 Mar 2013 16:00:45 +0000 (16:00 +0000)]
gdb: use stdio functions to convert parameters

This reduces the number of gdb conversion routines we have to maintain.

Change-Id: Ia43d6cac86cbe4f76fe0875b9d9c16ac340296db
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1128
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agointerface: opendous_ftdi config file added 97/1097/4
Rodrigo Melo [Thu, 27 Dec 2012 22:39:46 +0000 (19:39 -0300)]
interface: opendous_ftdi config file added

This config file add support to the opendous cable based on the chip ft2232H,
using the ftdi interface driver.

Change-Id: I4491f99d7b14f7078a04583ef0c4acd8692c4349
Signed-off-by: Rodrigo Melo <rmelo@inti.gob.ar>
Reviewed-on: http://openocd.zylin.com/1097
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agodocs: use doxygen keywords for formatting 10/1210/2
Spencer Oliver [Thu, 7 Mar 2013 12:21:46 +0000 (12:21 +0000)]
docs: use doxygen keywords for formatting

Rather than use bold fonts etc, use the correct keywords so doxygen formats
better.

Change-Id: Id9d63f0fc3465665376d7a536c4d6da71998f40e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1210
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agocfg: add Netgear DG834v3 configuration 89/1189/2
Spencer Oliver [Thu, 28 Feb 2013 15:39:15 +0000 (15:39 +0000)]
cfg: add Netgear DG834v3 configuration

Change-Id: I3f4880d8b07b9623544b94d316b37e6d0ae97020
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1189
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoflash: fix stm32 failed probe using incorrect flash size 87/1187/2
Spencer Oliver [Wed, 27 Feb 2013 12:48:11 +0000 (12:48 +0000)]
flash: fix stm32 failed probe using incorrect flash size

This fixes an issue if the device is manually probed after the initial probe
fails due to being unable to read flash size register. In this situation the
driver assumes the user has overridden the flash size when infact this may
not be the case.

It also seems on the older stm32f1 devices the flash register is not readable
when locked, this does not seem to apply to the newer parts - f0, f3, f4.

Change-Id: I125f872fcb2d962ca6705f97b62d957e2b31303b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1187
Tested-by: jenkins
Reviewed-by: Johan Almquist <johan.almquist@assaabloy.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agostm32: update stm32f1x driver for f0x and f3x option bytes 84/1184/2
Spencer Oliver [Tue, 26 Feb 2013 11:57:02 +0000 (11:57 +0000)]
stm32: update stm32f1x driver for f0x and f3x option bytes

The stm32f0 and stm32f3 share the same option byte location, but the format
differs.

Adding an option_offset fixes the broken options_read cmd and incorrectly
setting Hardware Watchdog when unlocking a f3x device.

Change-Id: I82d66b6198294ea9eedb44ca8b2fb368c0cb15e8
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1184
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agoti-icdi: catch failed icdi_send_cmd 80/1180/2
Spencer Oliver [Mon, 25 Feb 2013 15:45:12 +0000 (15:45 +0000)]
ti-icdi: catch failed icdi_send_cmd

warnings detected by clang.

Change-Id: I1532bcc12a8ab7446646dfb2a7afa8894ff03679
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1180
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agocfg: add basic support of Freescale i.MX6 series targets 35/1135/2
Vladimir Zapolskiy [Fri, 8 Feb 2013 00:12:49 +0000 (02:12 +0200)]
cfg: add basic support of Freescale i.MX6 series targets

This change adds a simple target configuration for Freescale
single/dual/quad core i.MX6 SoCs, only one core is configured by default.

Change-Id: I853dd27f4c6765b7f731be2ddea82e85d496c6a4
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-on: http://openocd.zylin.com/1135
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agotarget: use common target_name to access target::cmd_name member 82/1182/2
Spencer Oliver [Mon, 25 Feb 2013 16:52:00 +0000 (16:52 +0000)]
target: use common target_name to access target::cmd_name member

Change-Id: I203b89ef25a072c3b00b504483d5f2a83477fad6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1182
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agospeed up ftdi by reorder to out-in 42/942/3
Peter Henn [Sun, 28 Oct 2012 21:08:37 +0000 (22:08 +0100)]
speed up ftdi by reorder to out-in

When the ftdi driver calls finally the mpsse_flush function, it first
initiate the USB in and finally the corresponding USB out transaction.
Because data in is requested too early the USB device will always answer
the first USB in by a NAK. That can prevented by a simple reordering of
the out and then the in transfer and can improve the Jtag performance for
high JTAG clock rates.

Change-Id: I17abf1487c914c92e2e447ee6d30562ef629f327
Signed-off-by: Peter Henn <Peter.Henn@web.de>
Reviewed-on: http://openocd.zylin.com/942
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
11 years agoChange reset configuration. 86/1186/3
Mathias K [Wed, 27 Feb 2013 13:01:21 +0000 (14:01 +0100)]
Change reset configuration.

This patch change the default reset config from SYSRESETREQ to the working
VECTRESET.

Change-Id: I21a9a74b9c0c68cfa3a6e6dac9b123acc98a93cb
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/1186
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoMove back off timer to target struct 79/1179/4
Mathias K [Mon, 25 Feb 2013 17:15:15 +0000 (18:15 +0100)]
Move back off timer to target struct

Move the global target back off timer to the target struct. This will
fix the wrong error handling with multi target devices like smp systems.

Change-Id: Ia327182ed5d13ca87323700017a8c40ecc6b25a3
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/1179
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoAdd the target name to debug output for better understanding and error identification. 78/1178/4
Mathias K [Mon, 25 Feb 2013 17:12:30 +0000 (18:12 +0100)]
Add the target name to debug output for better understanding and error identification.

Change-Id: I1054debea6cd3a6548aadeae2d84000a0039814e
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/1178
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoUpdate HACKING info 47/747/4
Freddie Chopin [Tue, 17 Jul 2012 07:49:37 +0000 (09:49 +0200)]
Update HACKING info

Inform about possibility of discarding negative review in Gerrit when specific conditions are met.

Change-Id: I432b6c93cefc368fa22ce1096bea4cd174e03816
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/747
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agogdbserver: use common hexify/unhexify routines 05/1105/3
Spencer Oliver [Thu, 31 Jan 2013 17:01:19 +0000 (17:01 +0000)]
gdbserver: use common hexify/unhexify routines

Change-Id: I9989b625666e9c60ec9867cf6f4d94f41c998c3f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1105
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agoFix buffer overflow in versaloon interface 36/1136/3
Joerg Fischer [Sun, 10 Feb 2013 20:45:30 +0000 (21:45 +0100)]
Fix buffer overflow in versaloon interface

The USB buffer will need space for both TMS and TDI buffers.
Each holds tap_buffer_size bytes maximum, so tap_buffer_size must be
smaller than half of usb buf_size.

Change-Id: Id8f39936a894cbd98deb89eec5a859aef1e2b783
Signed-off-by: Joerg Fischer <turboj@gmx.de>
Reviewed-on: http://openocd.zylin.com/1136
Tested-by: jenkins
Reviewed-by: simon qian <simonqian.openocd@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agotarget: hla correctly use target events 34/1134/2
Spencer Oliver [Thu, 7 Feb 2013 12:12:18 +0000 (12:12 +0000)]
target: hla correctly use target events

Because we were always running using target state TARGET_RUNNING target
algorithm's were a bit verbose compared to other targets.

This brings the hla target inline with the other targets.

Change-Id: I3a257fdc878b87660fac8b5eca22b421eee5b349
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1134
Tested-by: jenkins
11 years agoarmv7m: update to use correct register core_cache 38/1138/2
Spencer Oliver [Thu, 14 Feb 2013 16:35:40 +0000 (16:35 +0000)]
armv7m: update to use correct register core_cache

The was missed when the armv7m was moved over to using the std arm
core_cache, probably because it is disabled by default.

Change-Id: I2f5a18ef6dd783b36e8c29f4c52379104bda4583
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1138
Tested-by: jenkins
11 years agostm32: add support for stm32l1x 256k high density single bank devices 40/1140/2
Johan Almquist [Tue, 19 Feb 2013 09:58:14 +0000 (10:58 +0100)]
stm32: add support for stm32l1x 256k high density single bank devices

Added support for new ST devices in the stm32lx portfolio, with device
id 0x427. These have 256k flash, but in a single bank compared to
device id 0x436 which is a dual bank flash.

Change-Id: Iafdfe990f24bd04b0d6e00385ee70690f3bf8d5f
Signed-off-by: Johan Almquist <johan.almquist@assaabloy.com>
Reviewed-on: http://openocd.zylin.com/1140
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agostm32: add support for the STM32Lx 384kb dual bank flash 25/1125/9
Johan Almquist [Thu, 24 Jan 2013 12:49:08 +0000 (13:49 +0100)]
stm32: add support for the STM32Lx 384kb dual bank flash

This update adds support for the STM32Lx 384kb dual bank flash. Previously there was a problem when writing an
image that was larger than 192Kb. That lead to openocd printing out two error messages like
"Error: access denied / write protected" and "Error: invalid program address". The reason was that the stm32lx
driver tried to write half pages which overlapped into the next flash bank.
A new configuration file stm32lx_dual_bank.cfg can be used for stm32lx chips with dual bank flash (256kb or 384kb devices).
A sanity check was added for probed flash size values to fix the issue seen on some ST samples that answered incorrectly.

Change-Id: I69e25131983d88613be8606b438f98870c5f1e52
Signed-off-by: Johan Almquist <johan.almquist@assaabloy.com>
Reviewed-on: http://openocd.zylin.com/1125
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agostm32: enable flash bank size override 32/1132/3
Spencer Oliver [Tue, 5 Feb 2013 16:41:30 +0000 (16:41 +0000)]
stm32: enable flash bank size override

It has been seen on some stm32 targets that the flash size register that
is probed by the driver may contain an invalid size.

This change enables the user to override the probed value.

Change-Id: I09359e59a96f9133d3d939670957d32a830a944e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1132
Tested-by: jenkins
Reviewed-by: Johan Almquist <johan.almquist@assaabloy.com>
11 years agojtag_interface: .speed can be NULL when not needed 31/1131/5
Franck Jullien [Sun, 3 Feb 2013 17:15:13 +0000 (18:15 +0100)]
jtag_interface: .speed can be NULL  when not needed

adapter_init (core.c) won't check speed configuration
of the selected interface if it's not needed (.speed = NULL).

When it's not needed, we can now omit adapter_khz in
init scripts and we don't have to implement dummy handlers
for speed_div and khz functions.

It also removes calls to adapter_khz in interface configuration
files when not used anymore.

Change-Id: I6eb1894385503fede542a368f297cec6565eed44
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1131
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoarmv7m: use ARM_MODE_THREAD core mode for algoorithm's 08/1108/4
Spencer Oliver [Fri, 1 Feb 2013 15:50:20 +0000 (15:50 +0000)]
armv7m: use ARM_MODE_THREAD core mode for algoorithm's

This makes sure we are using privileged mode when executing any loaders.

Change-Id: I18bf32ec92e1c76a66ab25e3712652bc3650b332
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1108
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoarmv7m: restore core mode after executing algorithm 07/1107/4
Spencer Oliver [Thu, 10 Jan 2013 14:04:36 +0000 (14:04 +0000)]
armv7m: restore core mode after executing algorithm

Make sure we restore the core mode after executing any algorithm.

We also now check that we actually need to swap the core mode, we may
already be in the correct mode.

Change-Id: Ia48af2c108e0f9868aae241bf25f60323503f092
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1107
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoarmv7m: use generic arm read/write_core_reg 69/969/8
Spencer Oliver [Wed, 9 Jan 2013 11:04:17 +0000 (11:04 +0000)]
armv7m: use generic arm read/write_core_reg

Change-Id: I0c15acc1278d2972269d294078495e6b069c830b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/969
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoarmv7m: use generic register core_cache 68/968/7
Spencer Oliver [Thu, 8 Nov 2012 15:25:51 +0000 (15:25 +0000)]
armv7m: use generic register core_cache

This removes the armv7m::core_cache and uses the generic arm::core_cache.

Change-Id: If854281b31486cea8be005008f6a71a691b4c208
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/968
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoarmv7m: remove unused armv7m_regtype 67/967/6
Spencer Oliver [Thu, 8 Nov 2012 14:50:05 +0000 (14:50 +0000)]
armv7m: remove unused armv7m_regtype

This simplifies the armv7m_core_reg structure ready for the move to using
the generic struct arm_reg.

Change-Id: I8edb9d77cc54965d49cd2e754568ebcea4cf6964
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/967
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoarmv7m: use generic arm::core_mode 66/966/6
Spencer Oliver [Thu, 10 Jan 2013 12:48:15 +0000 (12:48 +0000)]
armv7m: use generic arm::core_mode

To simplify things change over to using the generic core_mode struct rather
than maintaining a armv7m specific one.

Change-Id: Ibf32b785d896fef4f33307fabe0d8eb266f7086f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/966
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agohelper: hexify correctly handle signed chars 24/1124/3
Spencer Oliver [Mon, 28 Jan 2013 11:45:51 +0000 (11:45 +0000)]
helper: hexify correctly handle signed chars

The current implementation of hexify was not correctly handling signed chars.

This function is currently used by the ti-icdi driver and as such was causing
random write issues.

As a note perhaps a better long term fix would be to change to using uint8_t
buffers rather than char. This will require changes to the ti-icdi driver
aswell.

Change-Id: I572e69ff2b99227a7d412de056458c0393794b03
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1124
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agortos: fix error message 23/1123/2
Freddie Chopin [Sun, 27 Jan 2013 16:08:23 +0000 (17:08 +0100)]
rtos: fix error message

Probably a copy&paste error or remainings of some older version.

Change-Id: Ifb81a9a1fe8242f3b114cd0686dd264fbaad4920
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/1123
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
11 years agortos: do not use LOG_OUTPUT 04/1104/2
Spencer Oliver [Thu, 3 Jan 2013 16:43:27 +0000 (16:43 +0000)]
rtos: do not use LOG_OUTPUT

LOG_OUTPUT is not intended for general output so use the correct LOG_*
functions instead.

Change-Id: I48d0fe765637024dbafc68f2ea08219d3ff42754
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1104
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agortos: Fix regression preventing use of first RTOS & clean up rtos_qsymbol() 86/986/4
Evan Hunter [Thu, 3 Jan 2013 16:29:18 +0000 (16:29 +0000)]
rtos: Fix regression preventing use of first RTOS & clean up rtos_qsymbol()

ThreadX support was not working due to it being first in the list of RTOS - regression.
Auto-detect off, an RTOS was always be marked as successfully detected, even if symbols are not found.
Lines 223-227 were unnecessary as they are done in rtos_try_next()
Added lots of comments
Improved readability by separating: GDB not finding a symbol vs no more symbols being available

Regression caused by patch which was allowed only 52 minutes for review : http://openocd.zylin.com/895

Change-Id: Ib4decb01db595ddb3796837c6d8338ce6b9a91ca
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/986
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agojtag: only change state if necessary 14/1114/2
Spencer Oliver [Wed, 16 Jan 2013 11:57:57 +0000 (11:57 +0000)]
jtag: only change state if necessary

All the other drivers will only change the state if required.
This brings all the other drivers inline with this behaviour.

The original issue relates to problems on xscale commit 7989000e0969c1ccf69acbc3ce649a020bc1ee66

Change-Id: Ifc90ec2eef68a70a14f37c00931a07982bfa200c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1114
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agolibusb: idProduct of USB device may be zero 91/1091/3
Hsiangkai Wang [Wed, 26 Dec 2012 09:32:10 +0000 (17:32 +0800)]
libusb: idProduct of USB device may be zero

There is no constraint about idProduct in USB spec.  So, pids[i] may be 0 for USB devices.

Change-Id: I19d8974f4e7082e8b7e1f2d33c019ac4e61bc1e2
Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com>
Reviewed-on: http://openocd.zylin.com/1091
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agohla: enable DWT component and fix watchpoints 22/1122/2
Spencer Oliver [Fri, 25 Jan 2013 15:32:42 +0000 (15:32 +0000)]
hla: enable DWT component and fix watchpoints

The makes sure the DWT component is always enabled so that watchpoints
work as expected.

This does need merging into the existing cortex_m logic, however at the
moment this is non trivial.

Change-Id: Ic6cccd1badb51f70a2ca8ea9ab6923788a94c1bf
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1122
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agoflash: add stm32lx loader Hard Fault workaround 10/1010/5
Spencer Oliver [Fri, 4 Jan 2013 11:46:00 +0000 (11:46 +0000)]
flash: add stm32lx loader Hard Fault workaround

An issue has been seen with the stm32lx flash driver that if a
power cycle/reset is applied after a erase, any ram loader will Hard Fault
on execution.

A similar issue is mentioned in the errata for the device.
Two solution's seem to workaround this issue:
1, Handle the exception, this means adding exception vectors to the loader
   and changing the exception address using nvic vtor register.
2. falling back to using slower direct page writes - approx 50% slower.

Using solution 1 would mean restrictions are placed on the loader location.
Solution 2 was chosen mainly as it was simpler too implement.

Change-Id: I429f06b5a3e3b1d8de90071a88a7df11fc9b46a7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1010
Tested-by: jenkins
11 years agoflash: reduce stm32lx loader timeout 09/1009/5
Spencer Oliver [Fri, 7 Dec 2012 11:24:21 +0000 (11:24 +0000)]
flash: reduce stm32lx loader timeout

Waiting 20secs is a bit much excessive, we could probably reduce to 5.

Change-Id: Iffb97adb99c2541a075fe78dbc88a53ddf340214
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1009
Tested-by: jenkins
11 years agoflash: cleanup stm32lx driver 08/1008/5
Spencer Oliver [Fri, 4 Jan 2013 21:15:59 +0000 (21:15 +0000)]
flash: cleanup stm32lx driver

Handle any leading bytes upto the next 128 byte page, enabling us to safely
use the faster page write.

Rather than use a separate word/byte write to program any trailing bytes
we use a combined write function.

Use memcpy for byte writes and change loader to using bytes.

Change-Id: Ie0164a30388f018dd00e752cf5ff87d4f96ced97
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1008
Tested-by: jenkins
11 years agodocs: update stm32f1x/stm32f2x driver info 90/990/5
Spencer Oliver [Sun, 30 Dec 2012 20:01:37 +0000 (20:01 +0000)]
docs: update stm32f1x/stm32f2x driver info

As we use the two ST flash drivers for multiple stm32 variants update the
docs as to which targets use which driver.

Change-Id: I84943ff45482a22b3d3dd8491bb4242d79415939
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/990
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoflash: stm32f2x support write protection 89/989/5
Spencer Oliver [Tue, 20 Nov 2012 12:53:22 +0000 (12:53 +0000)]
flash: stm32f2x support write protection

Change-Id: I42662681104bb06e28148229464ae144c4a54538
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/989
Tested-by: jenkins
11 years agoflash: add stm32f2x flash lock/unlock cmds 88/988/5
Spencer Oliver [Fri, 4 Jan 2013 11:22:00 +0000 (11:22 +0000)]
flash: add stm32f2x flash lock/unlock cmds

Change-Id: I35344cc47fa4f0a49c034455c5abf479faa0344a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/988
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agobuild: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS 17/1117/2
Spencer Oliver [Fri, 18 Jan 2013 15:56:25 +0000 (15:56 +0000)]
build: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS

automake-1.13 has now deprecated AM_CONFIG_HEADER, use the correct
AC_CONFIG_HEADERS instead.

Change-Id: I8adaec64cbad7f7318ff69091176c30b707cbb0b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1117
Tested-by: jenkins
Reviewed-by: Mikko Viitamäki <mikko.viitamaki@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
11 years agoflash: EFM32 GG/LG page size detection fix 16/1116/2
Roman D [Fri, 18 Jan 2013 06:53:43 +0000 (10:53 +0400)]
flash: EFM32 GG/LG page size detection fix

Fixed flash page size detection according to EFM32 GG/LG errata.
MEM_INFO_PAGE_SIZE register containts invalid value in devices with
revision number lower than 18 and should not be used.

Change-Id: Idb2832246efcbbec2fd98a5c458f72a36df386fb
Signed-off-by: Roman D <me@iamroman.org>
Reviewed-on: http://openocd.zylin.com/1116
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoopendous: Inhibit unnecessary state transitions 13/1113/3
Roman Reichel [Tue, 15 Jan 2013 22:13:08 +0000 (23:13 +0100)]
opendous: Inhibit unnecessary state transitions

When current tap state and end state are the same, transitions are added which is not what should happen.
The usbprog driver was already patched like this long time ago.

Change-Id: I339e87156bdc7b5c83c10c14025b749605d3871a
Signed-off-by: Roman Reichel <romanreichel@aol.de>
Reviewed-on: http://openocd.zylin.com/1113
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoflash: EFM32 flash implementation 06/1106/6
Roman D [Thu, 10 Jan 2013 08:31:45 +0000 (12:31 +0400)]
flash: EFM32 flash implementation

Limited (no page unprotect, no block writes) implementation of EFM32
flash support. Verified with EFM32 development kit and STLink V2 adapter
using SWD.

Change-Id: I3db2054d9aa628a1fe4814430425db3c9959c71c
Signed-off-by: Roman D <me@iamroman.org>
Reviewed-on: http://openocd.zylin.com/1106
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agodoc: Add documentation for the ftdi driver 99/1099/2
Andreas Fritiofson [Fri, 28 Dec 2012 02:22:22 +0000 (03:22 +0100)]
doc: Add documentation for the ftdi driver

Change-Id: I1ade2eb187b404141051d9f59ba06e8e6e5d51aa
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1099
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agohla: support setting DCB_DEMCR on resume 03/1103/2
Spencer Oliver [Wed, 2 Jan 2013 17:25:51 +0000 (17:25 +0000)]
hla: support setting DCB_DEMCR on resume

This is only minimal support to enable use to catch a Hard Fault in
the stm32l flash bootloader.

Change-Id: I21d6a11893e2f1d173ebff1a651d6f52bf6eec32
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1103
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
11 years agoflash: allow stm32f1x options_write args in any order 92/992/2
Spencer Oliver [Tue, 20 Nov 2012 16:05:46 +0000 (16:05 +0000)]
flash: allow stm32f1x options_write args in any order

Currently we have to supply the arg's to this cmd in a set order, this
change fixes that issue.

Change-Id: I14a15732e1917a91009e1ac14fba39ca1523c739
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/992
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoflash: use correct stm32f1x option read mask 91/991/2
Spencer Oliver [Tue, 20 Nov 2012 15:17:46 +0000 (15:17 +0000)]
flash: use correct stm32f1x option read mask

Make sure we do not mask out the BFB2 boot bank bit, as this is used on
the larger XL devices.

Change-Id: Iacfdf874140e409e0c4ca9b9aee8f5c2f90dc9be
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/991
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agostm32f1x: fix stm32f0/f3 broken unlock 84/984/3
Spencer Oliver [Mon, 19 Nov 2012 12:46:33 +0000 (12:46 +0000)]
stm32f1x: fix stm32f0/f3 broken unlock

The STM32F0 and F3 devices use a different default RDP to configure a
unlocked device, make sure we use that.

Change-Id: I170779461412c4c202c2cfc8d90baedb7e388150
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/984
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agostm32f1x: preserve user option byte data 83/983/4
Spencer Oliver [Tue, 20 Nov 2012 15:29:57 +0000 (15:29 +0000)]
stm32f1x: preserve user option byte data

The user is able to use 2bytes of the options byte data for whatever
purpose they wish. Make sure we preserve this during an option erase/write.

Change-Id: Ibf951b11c59a148e671b1eb47fdc9b4f49ccae15
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/983
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoflash: stm32f1x: write option bytes using the loader 80/480/7
Szymon Modzelewski [Fri, 16 Nov 2012 15:38:10 +0000 (15:38 +0000)]
flash: stm32f1x: write option bytes using the loader

Some debuggers (stlink) can't issue 16 bit writes and have to use a
loader to write flash memory.

Currently the loader is not used for option bytes, causing
stm32x_write_options to fail silently on such hardware.

Fix this by using stm32x_write_block to write option bytes as well.

Change-Id: I49c29d53ab5e162463cb349d4c89bef96467e587
Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com>
Reviewed-on: http://openocd.zylin.com/480
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agodoc: Clarify the topic field in the commit comment template 01/1101/2
Andreas Fritiofson [Fri, 28 Dec 2012 23:14:44 +0000 (00:14 +0100)]
doc: Clarify the topic field in the commit comment template

Change-Id: Iea1f3b665b011ca3748800048039d3f6b33d7756
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1101
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Tomasz CEDRO <cederom@tlen.pl>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
11 years agoflash: stm32lx fallback to slow memory writes when no working area 07/1007/2
Spencer Oliver [Fri, 7 Dec 2012 11:08:33 +0000 (11:08 +0000)]
flash: stm32lx fallback to slow memory writes when no working area

The current stm32lx driver will fail if no working area is
provided - fallback to using slow writes if this is the case.

Change-Id: I92b1535fec4aebc855c63ce2c54b10f168f3c07e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1007
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agocfg: increase stm32l-discovery working area 06/1006/2
Spencer Oliver [Thu, 6 Dec 2012 15:43:39 +0000 (15:43 +0000)]
cfg: increase stm32l-discovery working area

This part has 16k ram so make it all available.

Change-Id: Ifeb7bc850bfe4f68d0affb8f6a0931b4327e7257
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1006
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agocfg: stm32l use minimum family ram size for working area 05/1005/2
Spencer Oliver [Thu, 6 Dec 2012 15:39:36 +0000 (15:39 +0000)]
cfg: stm32l use minimum family ram size for working area

The smallest pert in the family has 10k RAM, so use that as a default
for the working area.

Change-Id: I78be0d14a254c109ac15a7163552c6132f810416
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1005
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agocfg: enable stlink stm32l HSI 04/1004/2
Spencer Oliver [Tue, 4 Dec 2012 11:32:49 +0000 (11:32 +0000)]
cfg: enable stlink stm32l HSI

Switch to using the internal HSI when a reset init is called, this also
matches the std stm32l cfg.

Read (verify) speed is increased from 17 to 120 KiB/s.

Change-Id: Ic94ba85949ffdefa17b7be45eef14e30f941d107
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1004
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoflash: add new stm32l HD variant 03/1003/2
Spencer Oliver [Tue, 4 Dec 2012 10:15:59 +0000 (10:15 +0000)]
flash: add new stm32l HD variant

Updated as per latest RM0038 Rev 6.

Change-Id: Ia11309a1cdc3b8986f808b33a5c565bdc0ba58b0
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1003
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agoflash: format stm32f2x driver defines 87/987/2
Spencer Oliver [Tue, 20 Nov 2012 10:16:54 +0000 (10:16 +0000)]
flash: format stm32f2x driver defines

Change-Id: Ie903996368a8d4313df87839d5ba3f2a102796a3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/987
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
11 years agostlink: print target voltage if supported 80/980/5
Spencer Oliver [Thu, 15 Nov 2012 11:20:20 +0000 (11:20 +0000)]
stlink: print target voltage if supported

The stlink/v2 has the ability to check the target voltage if the firmware
is recent enough (>= J13).

As a debugging aid we check the voltage at startup and issue an error if
this is too low to debug reliably.

Change-Id: I98e251f3880e31049c4307051c30bedd3451cf87
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/980
Tested-by: jenkins
11 years agostlink: add generic open error routine 79/979/4
Spencer Oliver [Thu, 15 Nov 2012 10:10:46 +0000 (10:10 +0000)]
stlink: add generic open error routine

Change-Id: I1cd18896ab2a37255471a2d160befed8dd8fb544
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/979
Tested-by: jenkins
11 years agohelper: improve windows gdb pipe performance 50/1050/2
Spencer Oliver [Wed, 12 Dec 2012 15:42:01 +0000 (15:42 +0000)]
helper: improve windows gdb pipe performance

Reducing the select and MsgWaitForMultipleObjects timeouts to 1ms makes
a 2-300+% increase in the step time of gdb when using pipes under windows OS.

Change-Id: Id7e52cfb2b206347a9caea61672885a3e2b186de
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1050
Tested-by: jenkins
11 years agogdb: fix correct shutdown when using pipes 93/993/3
Spencer Oliver [Thu, 22 Nov 2012 11:49:52 +0000 (11:49 +0000)]
gdb: fix correct shutdown when using pipes

50d5441e2a615fb2c44b41a777e4373901f7a2e6 commit added a regression when
using pipes with GDB, OpenOCD would appear to hang when exiting GDB.

This fixes that behaviour so we shutdown correctly.

Change-Id: I9b337c2bdd41b1966de1c7631118257afcbfa6bd
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/993
Tested-by: jenkins
11 years agoflash: add stm32f2x rev X 01/1001/2
Spencer Oliver [Wed, 5 Dec 2012 20:00:50 +0000 (20:00 +0000)]
flash: add stm32f2x rev X

Updated as per ST RM0033 rev 5

Change-Id: I627fdab69b440b75b8e4f7c474216538fa5273a4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1001
Tested-by: jenkins
11 years agodoc: replace luminary with TI urls's 70/970/7
Spencer Oliver [Thu, 8 Nov 2012 16:16:53 +0000 (16:16 +0000)]
doc: replace luminary with TI urls's

Change-Id: Ic8a768f5a498e78b96421c6137238593c159fd72
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/970
Tested-by: jenkins
11 years agodocs: update docs to include info on TI ICDI 24/924/15
Spencer Oliver [Thu, 8 Nov 2012 16:09:33 +0000 (16:09 +0000)]
docs: update docs to include info on TI ICDI

Change-Id: I3009920f512f76901d187318ee50284db34ab6f7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/924
Tested-by: jenkins
11 years agoicdi: add TI icdi interface 22/922/16
Spencer Oliver [Mon, 12 Nov 2012 15:06:37 +0000 (15:06 +0000)]
icdi: add TI icdi interface

This is the new proprietary interface replacing the older FTDI based adapters.
It is currently fitted to the ek-lm4f232 and Stellaris LaunchPad.

Change-Id: I794ad79e31ff61ec8e9f49530aca9308025c0b60
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/922
Tested-by: jenkins
11 years agohla: add ability to configure read/write buffer size 48/948/3
Spencer Oliver [Thu, 1 Nov 2012 11:19:29 +0000 (11:19 +0000)]
hla: add ability to configure read/write buffer size

Other adapters (TI ICDI) that use this driver can use a larger
read/write buffer size than the original stlink could.

Change-Id: I9beb7748049097cbe29a2340799c450bd74e199d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/948
Tested-by: jenkins
11 years agohla: fix watchpoints not being set 31/931/3
Spencer Oliver [Thu, 25 Oct 2012 15:37:14 +0000 (16:37 +0100)]
hla: fix watchpoints not being set

Watchpoints were not being enabled when the hl adapter target was resumed.
This effects both stlink and icdi interfaces.

Change-Id: Ia9f8a9415be97a467cd099b63b6bc9f7f37d0c0d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/931
Tested-by: jenkins

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)