openocd.git
8 years agoREADME.Windows: clarify the kernel drivers installation 06/2506/3
Paul Fertser [Tue, 27 Jan 2015 10:37:51 +0000 (13:37 +0300)]
README.Windows: clarify the kernel drivers installation

HID and composite devices need to be mentioned explicitly due to
windows oddities.

Change-Id: I7cdbaa50c60ceb1950c934e0249986d46c875cff
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2506
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
8 years agomanual: reorder flash driver info 70/2770/2
Paul Fertser [Fri, 15 May 2015 10:19:09 +0000 (13:19 +0300)]
manual: reorder flash driver info

Put all the individual driver descriptions to where they really
belong, fix sectioning etc.

Change-Id: I94dc09e9a296ec57db4475f8dfb0a7d62a754aa4
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2770
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
8 years agomanual: fix all overfull and underfull hboxes 69/2769/2
Paul Fertser [Fri, 15 May 2015 10:16:12 +0000 (13:16 +0300)]
manual: fix all overfull and underfull hboxes

Change-Id: Id84f16de5a3d1907e196d13007a312593bb6670a
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2769
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
8 years agomanual: remove the lists of config files 68/2768/2
Paul Fertser [Fri, 15 May 2015 10:13:18 +0000 (13:13 +0300)]
manual: remove the lists of config files

Directory listings are volatile and serve no purpose in the
manual. Just remove them.

Change-Id: I63d54ba209c29eafb6608cf406b8ce5d8e9ee6c8
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2768
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
8 years agoRestore -dev suffix
Paul Fertser [Fri, 24 Apr 2015 15:56:30 +0000 (18:56 +0300)]
Restore -dev suffix

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
8 years agoThe openocd-0.9.0-rc1 release candidate v0.9.0-rc1
Paul Fertser [Fri, 24 Apr 2015 15:12:24 +0000 (18:12 +0300)]
The openocd-0.9.0-rc1 release candidate

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
8 years agoAdd NEWS in preparation for the new release 01/2701/5
Paul Fertser [Thu, 9 Apr 2015 07:55:49 +0000 (10:55 +0300)]
Add NEWS in preparation for the new release

Change-Id: I629158b59ff38f9b82a560f119a391bb97af43f2
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2701
Tested-by: jenkins
8 years agojtag/drivers/ti_icdi: do not segfault when adapter can't be opened 42/2742/2
Paul Fertser [Fri, 24 Apr 2015 14:09:14 +0000 (17:09 +0300)]
jtag/drivers/ti_icdi: do not segfault when adapter can't be opened

Change-Id: Id3af8dfd18b13947bca4f3c89c2516ccbcef60b6
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2742
Tested-by: jenkins
8 years agoxmc4500-application-kit-general: Drop srst_nogate 27/2727/2
Andreas Färber [Thu, 23 Apr 2015 11:14:35 +0000 (13:14 +0200)]
xmc4500-application-kit-general: Drop srst_nogate

Reset stopped working with this setting.

Change-Id: I98e8fafa48e0ab65dce8110870be422edf7b2fdb
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2727
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
8 years agotarget/ti_tms570.cfg: added several JTAG IDs for TMS570LS family 23/2123/8
Jiri Kastner [Fri, 2 May 2014 12:55:36 +0000 (14:55 +0200)]
target/ti_tms570.cfg: added several JTAG IDs for TMS570LS family

from TI datasheets for whole cortex-r4 family added JTAG IDs

TMS570LS1227 16- and 32-Bit RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns192
0x0B95502F

16/32-Bit RISC Flash Microcontroller, TMS5703137-EP (Rev. B)
http://www.ti.com/lit/pdf/spns230
0x0D8A002F
0x2D8A002F
0x3D8A002F

RM48L952 16- and 32-Bit RISC Flash Microcontroller (Rev. B)
http://www.ti.com/lit/pdf/spns177
0x0D8A002F
0x2D8A002F
0x3D8A002F

RM46L852 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns185
0x0B95502F

RM48Lx30 16- and 32-Bit RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns176
0x0B8A002F
0x2B8A002F
0x3B8A002F

RM46Lx30 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns182
0x0B95502F

RM46Lx50 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns184
0x0B95502F

TMS570LS04x/03x 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns186
0x0B97102F

RM42L432 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns180
0x0B97102F

RM46Lx40 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/
0x0B95502F

TMS570LS12x5 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns191
0x0B95502F

RM48Lx40 16- and 32-Bit RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns175
0x0B8A002F
0x2B8A002F
0x3B8A002F

TMS570LS31x4/21x4 16- and 32-Bit RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns165
0x0B8A002F
0x2B8A002F
0x3B8A002F

TMS570LS20216/20206/10216/10206/10116/10106 16/32-Bit RISC Flash Microcontroller (Rev. F)
http://www.ti.com/lit/pdf/spns141
0x0B7B302F

TMS570LS31x5/21x5 16- and 32-Bit RISC Flash Microcontroller (Rev. B)
http://www.ti.com/lit/pdf/spns164
0x0B8A002F
0x2B8A002F
0x3B8A002F

RM48Lx50 16- and 32-Bit RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns174
0x0B8A002F
0x2B8A002F
0x3B8A002F

TMS570LS3137 16- and 32-Bit RISC Flash Microcontroller (Rev. B)
http://www.ti.com/lit/pdf/spns162
0x0B8A002F
0x2B8A002F
0x3B8A002F

TMS570LS12x4 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns190
0x0B95502F

TMS570LS1115 16- and 32-Bit RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns189
0x0B95502F

TMS570LS11x4 16- and 32-BIT RISC Flash Microcontroller (Rev. A)
http://www.ti.com/lit/pdf/spns188
0x0B95502F

Change-Id: Idf53a44851e1bb4bde4a74c64b65d4411e56da7c
Signed-off-by: Jiri Kastner <cz172638@gmail.com>
Tested-by: Jiri Kastner <cz172638@gmail.com>
Reviewed-on: http://openocd.zylin.com/2123
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
8 years agoTI TMS570 USB Kit board config 89/2089/5
Alex Ray [Fri, 4 Apr 2014 06:14:37 +0000 (23:14 -0700)]
TI TMS570 USB Kit board config

Split TMS570 target into LS31/LS21 and LS20/LS10 targets.
Board for the TMS570LS20SUSB Kit, which uses the TMS570 Cortex-R4 MCU from TI.
Tested attaching.

Change-Id: I1a69ac1ed800d0d6b7f9860c19cbd149e3e47620
Signed-off-by: Alex Ray <a@machinaut.com>
Reviewed-on: http://openocd.zylin.com/2089
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
8 years agortos/mqx: prevent crash with -rtos auto 41/2741/3
Paul Fertser [Fri, 24 Apr 2015 11:43:45 +0000 (14:43 +0300)]
rtos/mqx: prevent crash with -rtos auto

Since mqx comes last in the list, with the auto option its
update_threads is called even though it wasn't detected.

This check should be removed from all the rtos helpers and moved to
the generic code, but better do it later all in one go.

Change-Id: If24ab42a58a468d90e9f12028d4c2fb76a9bc2e8
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2741
Tested-by: jenkins
8 years agotarget/cortex_a: examination should be done every time it's asked for 23/2723/2
Paul Fertser [Sun, 19 Apr 2015 21:29:37 +0000 (00:29 +0300)]
target/cortex_a: examination should be done every time it's asked for

It was observed on AM437x that after every reset the target's debug
regions are unpowered. To be able to properly communicate with the
target and perform cortex_a init debug access after a reset event the
examination need to be performed every time, not just on OpenOCD
start.

Change-Id: Idf272e127ee88341e806ee00df154eade573451d
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2723
Tested-by: jenkins
Reviewed-by: Felipe Balbi <balbi@ti.com>
8 years agotarget: try to reexamine even when polling fails 21/2721/2
Paul Fertser [Fri, 17 Apr 2015 10:36:28 +0000 (13:36 +0300)]
target: try to reexamine even when polling fails

After intermittent connection failures or target power failures it
might be necessary to try reexamination even when polling fails. This
should make communication with Cortex-A targets more reliable.

This was runtime tested with stlink attached to an stm32l1 and an FTDI JTAG
adapter attached to an stm32f1 target.

Change-Id: I38c4db8124b7f4bbf53ddda53c13273449f49c15
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2721
Tested-by: jenkins
Reviewed-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agortos: fix print format specifiers 24/2724/2
Paul Fertser [Mon, 20 Apr 2015 09:02:48 +0000 (12:02 +0300)]
rtos: fix print format specifiers

Exposed by arm-none-eabi build.

Change-Id: I657c642249aa83403f93132d1e28713aee692c30
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2724
Tested-by: jenkins
9 years agoconfigure the SWD frequency when setting adapter speed in SWD mode for versaloon 08/2608/2
Simon Qian [Mon, 16 Mar 2015 16:11:09 +0000 (00:11 +0800)]
configure the SWD frequency when setting adapter speed in SWD mode for versaloon

Change-Id: I99cdc11ba1442e4c9efaa0f1de8e7089ec725e14
Signed-off-by: Simon Qian <openocd@versaloon.com>
Reviewed-on: http://openocd.zylin.com/2608
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash: at91samd: add SAML21 support, fix part ID issue 90/2690/2
Andrey Yurovsky [Mon, 30 Mar 2015 19:50:13 +0000 (12:50 -0700)]
flash: at91samd: add SAML21 support, fix part ID issue

This adds support for the new Atmel SAML21 family of low-power Cortex
M0+ devices.  Their Flash controller is essentially the SAMDxx one so
the change consists of adding the new part IDs.  Unfortunately the
device ID logic had a couple of mistakes in it that did not affect
anything on SAMD2x devices (due to 0 values expected there) but that is
a problem on L21, it's therefore addressed here and things should now
match the datasheets.

Tested on Amtel SAML21 Xplained Pro development kit against the included
SAML21J18A there.  Also tested for regressions on a SAMD20 and SAMD21
using their dev kits.

Change-Id: I768f75e064b8656c15148730dacaa4c3acfc4101
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/2690
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agostlink_usb.c: Decode some more errors. 06/2706/2
Uwe Bonnes [Thu, 9 Apr 2015 13:55:17 +0000 (15:55 +0200)]
stlink_usb.c: Decode some more errors.

Change-Id: I637cb63bd39120554aa184eaa48fd00a4852359f
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2706
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash/nor/mdr: add docs, remove memory leak on probe() 94/2694/2
Paul Fertser [Sat, 4 Apr 2015 08:08:15 +0000 (11:08 +0300)]
flash/nor/mdr: add docs, remove memory leak on probe()

This adds the mandatory Info documentation for the driver as well as
the usage field.

As a clean up, this also includes freeing of the allocated memory
which results in a memory leak if probe is invoked multiple times.

Valgrind-tested.

Reported by Dmitry Shpak.

Change-Id: I2b1d9b9e8b069c6665b11d880b40ce19a1b26ce6
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2694
Tested-by: jenkins
Reviewed-by: Дмитрий Шпак <disona@yandex.ru>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash: efm32: Add support for EZR32LG and EZR32WG. 00/2700/2
Marc Schink [Wed, 8 Apr 2015 08:55:22 +0000 (10:55 +0200)]
flash: efm32: Add support for EZR32LG and EZR32WG.

This patch was tested with an EZR32WG Starter Kit.

Change-Id: I0f7c619e715fe30e88e6da3bead0806dd3bce819
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2700
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agodocs: update OpenOCD url's to openocd.org domain 98/2698/2
Spencer Oliver [Tue, 7 Apr 2015 08:40:53 +0000 (09:40 +0100)]
docs: update OpenOCD url's to openocd.org domain

Change-Id: I8b55c8d12773a1c36f2fd2afeecf20a74e890064
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2698
Tested-by: jenkins
9 years agocmsis-dap: print vendor and product id on open failure 08/2708/2
Spencer Oliver [Fri, 10 Apr 2015 10:46:22 +0000 (11:46 +0100)]
cmsis-dap: print vendor and product id on open failure

Change-Id: Iae7ed8d59a722b805536550a8033f5fb7c85c5fc
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2708
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
9 years agodoc/openocd.texi: fix formatting for mrvlqspi driver documentation 05/2705/2
Mahavir Jain [Thu, 9 Apr 2015 13:14:05 +0000 (18:44 +0530)]
doc/openocd.texi: fix formatting for mrvlqspi driver documentation

* also included example for flash usage information

Change-Id: Icf9defc25d38bf24567b1708138b83a8de1e0497
Signed-off-by: Mahavir Jain <mjain@marvell.com>
Reviewed-on: http://openocd.zylin.com/2705
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl/target/stm32f3: fix reset init for stlink 02/2702/5
Paul Fertser [Thu, 9 Apr 2015 12:20:22 +0000 (15:20 +0300)]
tcl/target/stm32f3: fix reset init for stlink

Use mmw to manipulate only selected bits of the word. msb and mwb verify the
memory location and may error on PLLRDY set as a result of PLLON written.

Change-Id: I9a4c1e58f002a1e5e99be1bd34aac27ba65d111d
Reported-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2702
Tested-by: jenkins
9 years agocontrib/itmdump: add a hack to allow direct dumping of specific SWIT, fix timestamp 37/2537/7
Paul Fertser [Mon, 9 Feb 2015 13:51:33 +0000 (16:51 +0300)]
contrib/itmdump: add a hack to allow direct dumping of specific SWIT, fix timestamp

Currently itmdump is not a production-quality code hence this hack
seems to be appropriate.

More robust handling is possible with libswo-based swodec tool that's
available from http://git.zapb.de/ .

This adds a new command line option -d N where N is a stimulus number
you want to dump (counting from 1).

The idea here is that if you're interested to live-monitor just a
single stimulus port, you can use this utility directly. If one wants
to demultiplex the TPIU stream, the following is proposed:

1. Use https://gitorious.org/multiplex/multiplex utility that can
accept binary data from a file/pipe/stdin and arbitrary number of TCP
connections. It simply mirrors all the incoming data to all the
accepted connections;

2. Use socat to connect itmdump to the proxy mentioned in 1. and then
either dump the results to separate files or share via their dedicated
TCP ports.

Example script (inspired by http://openocd.zylin.com/#/c/1662/ ,
enables and disables specific itm ports on demand):

for i in `seq 0 31`; do
  while true; do
    socat -U TCP-LISTEN:$((8000+$i)),reuseaddr \
             SYSTEM:"echo itm port $i on | nc -q0 localhost 4444 > /dev/null; nc localhost 7777 | stdbuf -oL itmdump -d$((i+1))"
    echo itm port $i off | nc -q0 localhost 4444 > /dev/null
  done < /dev/null >&0 2>&0 &
done

Change-Id: Iaeb102436eaa5b106002083f2ffe758fb7bd83e5
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2537
Tested-by: jenkins
9 years agoFix several format specifiers errors exposed by arm-none-eabi 19/2719/2
Paul Fertser [Sun, 15 Mar 2015 07:18:55 +0000 (10:18 +0300)]
Fix several format specifiers errors exposed by arm-none-eabi

Change-Id: I1fe5c5c0b22cc23deedcf13ad5183c957551a1b7
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2719
Tested-by: jenkins
9 years agoboard: ti_am43xx_evm: remove xds100v2 interface 18/2618/4
Felipe Balbi [Wed, 18 Mar 2015 18:12:48 +0000 (13:12 -0500)]
board: ti_am43xx_evm: remove xds100v2 interface

GP and EPOS EVMs do not provide xds100v2 on board,
rather they have a pin header which can be used
to attach any debug pod the user might want.

Change-Id: I61678c50900fbe0fab500ea42f85ecde7a490ded
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2618
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agortos: add instructions and helper code to make FreeRTOS work again 47/2347/4
Andreas Fritiofson [Thu, 16 Apr 2015 11:08:14 +0000 (13:08 +0200)]
rtos: add instructions and helper code to make FreeRTOS work again

Run-time tested with FreeRTOS V8.1.2 (current version).

For the time being I propose this way of dealing with RTOSes that do
not export necessary information on their own.

I also suggest implementing a similar scheme for ChibiOS, exporting
the necessary struct fields' offsets via an OpenOCD-specific helper.

Change-Id: Iacf8b88004d62206215fe80011fd7592438446a3
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2347
Tested-by: jenkins
9 years agoFreeRTOS: Make optional symbols optional 25/2425/4
Andreas Fritiofson [Thu, 16 Apr 2015 08:56:47 +0000 (10:56 +0200)]
FreeRTOS: Make optional symbols optional

xSuspendedTaskList and xTasksWaitingTermination are only available for
some configurations. Missing optional symbols will have their addresses
remaining at zero so the corresponding lists will be skipped when
building the task list.

Change-Id: If330f5038d009298c3a14a4d2756db7105a30bc8
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2425
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoAT91SAM4L: handle reset run/halt in SMAP 04/2604/5
Tomas Vanek [Sat, 14 Mar 2015 11:03:47 +0000 (12:03 +0100)]
AT91SAM4L: handle reset run/halt in SMAP

This is a remake of http://openocd.zylin.com/1966
originally written by Angus Gratton <gus@projectgus.com>

ATSAM4L has a "System Manager Access Port" (SMAP) that holds the CPU
in reset if TCK is low when srst (RESET_N) is deasserted.
Without this change any use of sysresetreq or srst locks the chip
in reset state until power is cycled.

A new function smap_reset_deassert is called as reset-deassert-post event handler.
It optionally prepares reset vector catch and SMAP reset is released then.

Change-Id: Iad736357b0f551725befa2b9e00f3bc54504f3d8
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/2604
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotarget/arm_adi_v5, cortex_m: retry ahbap_debugport_init few times in case of an error 01/2601/4
Paul Fertser [Fri, 13 Mar 2015 14:55:51 +0000 (17:55 +0300)]
target/arm_adi_v5, cortex_m: retry ahbap_debugport_init few times in case of an error

Some targets need arbitrary amount of time (usually not too long)
after reset (both sysresetreq and srst) to do initialisation, and
SWD/JTAG is not available during that. According to PSoC4 docs, the
debugger should try connecting until it succeeds.

Also ahbap_debugport_init might be necessary to perform after using
hardware srst too, so add it there (except for the targets that
support srst_nogate since they are very unlikely to need it).

Change-Id: I3598d5ff7b8e0bf3a5566a57dec4b0b2b243d297
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2601
Tested-by: jenkins
9 years agotarget/cortex_a: emit a clear error message when dbgbase can't be detected 03/2603/4
Paul Fertser [Sat, 14 Mar 2015 05:15:12 +0000 (08:15 +0300)]
target/cortex_a: emit a clear error message when dbgbase can't be detected

In some cases (the most obvious are TI's SoCs) ROM table lacks entries
for the cores, so OpenOCD has no way to determine what debug base to
use. Due to an error fixed in ec9ccaa28849 it wasn't handled properly,
and OpenOCD would continue to try using dbgbase = 0, which happened to
work for e.g. AM437x.

This patch adds a clear indication to the user that to access such a
target, dbgbase must be set manually in the config.

Reported by Felipe Balbi on IRC.

Change-Id: Id8533e708f44b76550eb8b659564f5f45717c298
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2603
Tested-by: jenkins
9 years agoflash/nor/lpc2000: free allocated working area when target_write fails 96/2696/2
Paul Fertser [Sat, 4 Apr 2015 21:16:59 +0000 (00:16 +0300)]
flash/nor/lpc2000: free allocated working area when target_write fails

In some circumstances (e.g. inappropriate jtag clock)
target_write_memory in lpc2000_iap_working_area_init might fail. The
allocated working area should be freed inside
lpc2000_iap_working_area_init in this error case.

This was leading to a weird segfault due to stack corruption later
when reset was executed.

Reported by quitte (Jonas Meyer).

Change-Id: Ia2ed42a9970a4d771727fd516a6eea88e9b859e2
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2696
Tested-by: jenkins
9 years agojtag/adi_v5_jtag: fix infinite recursion in jtagdp_transaction_endcheck() 97/2697/2
Paul Fertser [Mon, 6 Apr 2015 13:04:05 +0000 (16:04 +0300)]
jtag/adi_v5_jtag: fix infinite recursion in jtagdp_transaction_endcheck()

Calling ahbap_debugport_init() is wrong here because the actions
performed by it might lead to jtagdp_transaction_endcheck errors thus
leading to infinite recursion.

The removed code is not needed now because target polling should lead
to reexamination automatically, and both cortex_a and cortex_m call
ahbap_debugport_init() as part of their target examine handler.

This was reported as a real life issue on IRC by Weaselweb with
Cortex-A target. Quitte reports similar results in some circumstances
(adapter_khz too high) with LPC17xx.

Change-Id: I7148022f76a1272b5262d251f2e807ffb1543547
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2697
Tested-by: jenkins
9 years agoflash/nor/lpc2000: properly free working area used in get_lpc2000_part_id() 95/2695/2
Paul Fertser [Sat, 4 Apr 2015 17:50:37 +0000 (20:50 +0300)]
flash/nor/lpc2000: properly free working area used in get_lpc2000_part_id()

The IAP working area needs to be freed here, just like in all the
other driver functions since an automatic local variable is used to
store a pointer to it.

This was reported by quitte (Jonas Meyer) on IRC as a strange totally
unrelated segfault after doing certain operations (leading to target
reset) from GDB. He has provided me with remote access to the specific
machine and configuration that exposed the issue, and after some
debugging it became apparent that a auto local variable (holding the
gdb connection pointer) gets overwritten somehow. Placing an
appropriate breakpoint just before the event and using a watchpoint
made the cause apparent: reset lead to freeing of all working areas,
and there was one holding a pointer to a variable that was auto local
in get_lpc2000_part_id().

Change-Id: I7e634d890135ca0f3b4b311e09e8385a03982bd6
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2695
Tested-by: jenkins
9 years agojtag/startup.tcl: fix regression with autoselecting JTAG 93/2693/3
Paul Fertser [Fri, 3 Apr 2015 04:55:50 +0000 (07:55 +0300)]
jtag/startup.tcl: fix regression with autoselecting JTAG

This regression was introduced with d90b86d8. "transport select" doesn't
throw an error anymore and autoselects the first available transport on
its own.

Reported by moyix on IRC.

Change-Id: I3f303c0372e915931cca4b28af450694abc1a63e
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2693
Tested-by: jenkins
9 years agoChibiOS: fix crash on auto detection 97/2597/2
Richard Braun [Wed, 11 Mar 2015 13:04:15 +0000 (14:04 +0100)]
ChibiOS: fix crash on auto detection

The detection framework assumes rtos->symbols is dynamically allocated,
an assumption that the ChibiOS variant breaks by providing a raw statically
allocated symbol list.

Change-Id: I379bcc2af99006912608ddd3f646ff7085606f47
Signed-off-by: Richard Braun <rbraun@sceen.net>
Reviewed-on: http://openocd.zylin.com/2597
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoTcl exception codes cleanup, shutdown command amendments 00/2600/4
Paul Fertser [Fri, 13 Mar 2015 13:32:53 +0000 (16:32 +0300)]
Tcl exception codes cleanup, shutdown command amendments

This patch might influence openocd Tcl commands behaviour in subtle
ways, please give it a nice testing.

The idea is that if an OpenOCD Tcl command returns an error, an
exception is raised, and then the return code is propogated all the
way up (or to the "catch" if present). This allows to detect
"shutdown" which is not actually an error but has to raise an
exception to stop execution of the commands that follow it in the
script.

openocd_thread special-cases shutdown because it should then terminate
OpenOCD with a success error code, unless shutdown was called with an
optional "error" argument which means terminate with a non-zero exit
code.

Change-Id: I7b6fa8a2e24c947dc45d8def0008b4b007c478b3
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2600
Tested-by: jenkins
Reviewed-by: Juha Niskanen <juha.niskanen@haltian.com>
Reviewed-by: Jens Bauer <jens@gpio.dk>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
9 years agohelper: shutdown command should return with 0 exit status 89/2589/2
Juha Niskanen [Mon, 9 Mar 2015 11:28:34 +0000 (13:28 +0200)]
helper: shutdown command should return with 0 exit status

Commit a35712a85c42 caused a regression where command

openocd -c "echo a1; shutdown; echo a2"

always returned non-zero exit status to operating system,
even when commands before shutdown all succeeded. This patch
attempt to fix this.

Change-Id: I3f478c2c51d100af810ea0171d2fd4c8fcc657f3
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
Reviewed-on: http://openocd.zylin.com/2589
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agojtag/tcl: fix incorrect memcpy in jim_newtap_expected_id 62/2562/4
Paul Fertser [Thu, 26 Feb 2015 17:18:38 +0000 (20:18 +0300)]
jtag/tcl: fix incorrect memcpy in jim_newtap_expected_id

Found by clang static checker.

On the very first call of jim_newtap_expected_id() pTap->expected_ids
and expected_len are null, and there's nothing to copy. This patch
changes this cryptic code to use realloc() instead.

Change-Id: Ic0b5140d08257a906f15b55a2ae64db7bc06d5f1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2562
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Tested-by: jenkins
9 years agoturtelizer2-revC: Tested with real hardware. 84/2584/4
Uwe Bonnes [Sat, 7 Mar 2015 21:59:37 +0000 (22:59 +0100)]
turtelizer2-revC: Tested with real hardware.

Also some hints around deprecated tcl/interface/turtelizer2.cfg added.

Change-Id: Ifa57b49febffaeddd5d8ff0a48833d3544927b10
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2584
Tested-by: jenkins
Reviewed-by: Harald Kipp
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agolpc2000: Removed cmd51_can_xxxxb variables. 07/2607/2
Nemui Trinomius [Mon, 16 Mar 2015 15:00:40 +0000 (00:00 +0900)]
lpc2000: Removed cmd51_can_xxxxb variables.

Current flash driver can fail to write across the sector boundary.
This patch fixes "thisrun_bytes" set to "cmd51_dst_boundary" value instead of "cmd51_can_xxxxb"

Referred to SevenW's post and fix,thanks.
http://sourceforge.net/p/openocd/mailman/openocd-devel/thread/fa32e7d6654df22470dc5f4a3dbc984a%40familiebenschop.nl/#msg33594152

Tested on below listed chips.
LPC810,LPC811,LPC812,LPC824,LPC1115,LPC1343,LPC1347,LPC1227,
LPC1769,LPC1788,LPC54102,LPC4088 and LPC2388.

Change-Id: If1c6a1daa58ca27c405bd959a784e599a7a8f4d4
Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
Reviewed-on: http://openocd.zylin.com/2607
Tested-by: jenkins
Reviewed-by: Jens Bauer <jens@gpio.dk>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl/board: Add Infineon XMC 2Go config 64/2564/3
Andreas Färber [Fri, 27 Feb 2015 23:37:44 +0000 (00:37 +0100)]
tcl/board: Add Infineon XMC 2Go config

Tested with "J-Link Lite-XMC4200 Rev.1 compiled Jan 10 2014 20:31:33".

Change-Id: Iefa9185372341d889db2b5f1f93bce126450b535
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2564
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoAdded Atmel SAM4SA16C chip (chip ID 0x28a70ce0). 25/2625/2
Patrick Noffke [Mon, 23 Mar 2015 18:11:24 +0000 (13:11 -0500)]
Added Atmel SAM4SA16C chip (chip ID 0x28a70ce0).

Change-Id: I45e8e807a36c39940b910b3edb40698c7d8dabd6
Signed-off-by: Patrick Noffke <patrick@noffke.me>
Reviewed-on: http://openocd.zylin.com/2625
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board: Add Infineon XMC1100 Boot Kit config 72/2472/5
Andreas Färber [Sun, 18 Jan 2015 00:28:20 +0000 (01:28 +0100)]
tcl/board: Add Infineon XMC1100 Boot Kit config

Tested with "J-Link Lite-XMC4200 Rev.1 compiled Jul 18 2014 17:28:26".

Change-Id: Icc03172cefe38f2217bf44a73f94f8a6fb93dfba
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2472
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/target: Add Infineon XMC1000 family target config 71/2471/5
Andreas Färber [Sun, 18 Jan 2015 00:02:48 +0000 (01:02 +0100)]
tcl/target: Add Infineon XMC1000 family target config

Basic target config, verified against XMC1100 AA/AB, XMC1200 AA/AB,
XMC1300 AA/AB manuals.

The default adapter_khz was tested with the XMC1100 Boot Kit.

Change-Id: Iff6ed52d875ccb83c0d4ff0d555b90e0f28b860c
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2471
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board: Add Spansion SK-FM4-176L-S6E2CC config 70/2570/3
Andreas Färber [Sun, 1 Mar 2015 20:35:12 +0000 (21:35 +0100)]
tcl/board: Add Spansion SK-FM4-176L-S6E2CC config

Works best after update to firmware v2.3.

Change-Id: Id2d3a0ae28bba014ee5338df9280fe39773c3398
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2570
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/target: Add Spansion FM4 config 69/2569/2
Andreas Färber [Sun, 1 Mar 2015 19:38:36 +0000 (20:38 +0100)]
tcl/target: Add Spansion FM4 config

Assembled by trial-and-error for an S6E2CC.

Change-Id: I317c12d24c9075ce3de286455fa3ee45731c5c81
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2569
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agostartup: Fixed measure_clk to return kHz instead of MHz. 73/2573/6
Ed Beroset [Tue, 3 Mar 2015 20:01:38 +0000 (15:01 -0500)]
startup: Fixed measure_clk to return kHz instead of MHz.

The original code had iterated 10,000,000 times and taken the elapsed
time divided by 10,000, to yield kHz which is mathematically correct
only if we were measuring time in seconds, but we are measuring time in
 milliseconds, so the correct divisor is actually 10,000,000.  Previous
code would report 0.500 for actual measured speed of 500 kHz.

Change-Id: Iba4c4961fe3973e7ccfa6dfa11d606a966ceb50c
Signed-off-by: Ed Beroset <beroset@ieee.org>
Reviewed-on: http://openocd.zylin.com/2573
Tested-by: jenkins
Reviewed-by: Jens Bauer <jens@gpio.dk>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoem357: Corrected EM357 support including errata details 81/2581/3
Ed Beroset [Fri, 6 Mar 2015 01:43:09 +0000 (20:43 -0500)]
em357: Corrected EM357 support including errata details

Original submitted code had only been tested with em358, but testing with
actual em357 revealed errors that this patch corrects.

Change-Id: I70cf31210de8ed84e3755a56e76261ad200322bb
Signed-off-by: Ed Beroset <beroset@ieee.org>
Reviewed-on: http://openocd.zylin.com/2581
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoCortex-A: Don't flush the data/unified cache if MMU is off 29/2429/2
Uwe Kleine-König [Mon, 8 Dec 2014 10:42:04 +0000 (11:42 +0100)]
Cortex-A: Don't flush the data/unified cache if MMU is off

When the SCTLR has C set but M unset (i.e. Caching on, but MMU off) the cache
if effectively off. So only flush the cache if MMU is on, otherwise stale
entries might be committed to memory.

Change-Id: Iaff8b6f25b7a41ba838b91d45684c98f99fc0b27
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-on: http://openocd.zylin.com/2429
Tested-by: jenkins
Reviewed-by: Christopher Head <chead@zaber.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Vladimir Svoboda <ze.vlad@gmail.com>
9 years agoRTOS: Add logging to FreeRTOS and general RTOS 91/2391/5
Evan Hunter [Fri, 21 Nov 2014 17:07:43 +0000 (17:07 +0000)]
RTOS: Add logging to FreeRTOS and general RTOS

Change-Id: I43d14f3b59daae7f90c344abdf71eaa8f74ef7ef
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/2391
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/interface/parport: default to sane value on non-windows systems 72/2572/2
Paul Fertser [Mon, 2 Mar 2015 14:52:47 +0000 (17:52 +0300)]
tcl/interface/parport: default to sane value on non-windows systems

When using ppdev driver 0 is the most appropriate default value as it
corresponds to /dev/parport0. Raw port address is suitable only for
direct access (I think that's parport-giveio on windows).

Reported by danitool on IRC.

Change-Id: I983c22251de6601b433ad31aaf660fb664cee7e9
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2572
Reviewed-by: Andreas Färber <afaerber@suse.de>
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agojtag/core: honour SRST timings in SWD mode 91/2591/2
Paul Fertser [Mon, 9 Mar 2015 15:55:03 +0000 (18:55 +0300)]
jtag/core: honour SRST timings in SWD mode

Since SWD is currently abusing the JTAG command queue for reset and
sleep handling (and all other operations are performed in a different
way), sleep needs to be forced explicitly to ensure correct timings.

Change-Id: I5b0da6cbb7d0560154e4077b261aa6828cefc892
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2591
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board: Add Infineon XMC4500 Relax Kit config 67/2567/3
Jeff Ciesielski [Sat, 28 Feb 2015 01:02:57 +0000 (02:02 +0100)]
tcl/board: Add Infineon XMC4500 Relax Kit config

Tested with "J-Link Lite-XMC4000 Rev.1 compiled Dec  7 2012 19:23:07"
on XMC4500 Relax Lite Kit V1.

Change-Id: Ib680a444fa4cadbf640afba15d607c0e6bd4ab2c
Signed-off-by: Jeff Ciesielski <jeffciesielski@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2567
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board: Add Infineon XMC4200 Application Kit config 66/2566/3
Jeff Ciesielski [Sat, 28 Feb 2015 01:53:17 +0000 (02:53 +0100)]
tcl/board: Add Infineon XMC4200 Application Kit config

Change-Id: I3a946ba3745da651d470cd574222ba5c7147ac9d
Signed-off-by: Jeff Ciesielski <jeffciesielski@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2566
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board: Add Infineon XMC4500 Application Kit configs 81/2481/4
Andreas Färber [Sun, 18 Jan 2015 16:56:38 +0000 (17:56 +0100)]
tcl/board: Add Infineon XMC4500 Application Kit configs

Tested CPU_45A-V2 (General Purpose) with ARM-USB-TINY-H (via SWD) and
with "J-Link Lite-Cortex-M V8 compiled Jul 17 2014 11:40:12" firmware.

Tested CPU_45B-V1-006 (SDRAM) with ARM-USB-TINY-H (via SWD) and
with "J-Link Lite-XMC4200 Rev.1 compiled Jul 18 2014 17:28:26" firmware.

Change-Id: I3451117606551671ec77722f6adf7d7a6a4bd576
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2481
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/target: Add Infineon XMC4000 family config 80/2480/4
Andreas Färber [Sun, 18 Jan 2015 06:14:13 +0000 (07:14 +0100)]
tcl/target: Add Infineon XMC4000 family config

Base config, verified against XMC4500, XMC4400 and XMC4100/XMC4200 manuals.

Change-Id: I10907bdf307bc6d11dc5454bf5391758de49dc30
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2480
Tested-by: jenkins
Reviewed-by: Jeff Ciesielski <jeffciesielski@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl: icepick: add icepick_d_set_coreid 24/2624/2
Felipe Balbi [Thu, 19 Mar 2015 19:59:22 +0000 (14:59 -0500)]
tcl: icepick: add icepick_d_set_coreid

this is just to avoid open coding that in
icepick_d_tapenable. Cleanup only, no functional
changes.

Change-Id: Iabd20291b7bdd95957afa1c74f52171789201227
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2624
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotarget: icepick: call icepick_c_setup 23/2623/2
Felipe Balbi [Thu, 19 Mar 2015 18:16:40 +0000 (13:16 -0500)]
target: icepick: call icepick_c_setup

it also works on icepick_d.

Change-Id: I50c0c81286aae673c94ea77e47454ff48eab1668
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2623
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotarget: icepick: switch over to icepick_c_router 22/2622/2
Felipe Balbi [Thu, 19 Mar 2015 17:59:44 +0000 (12:59 -0500)]
target: icepick: switch over to icepick_c_router

Reusing what's already there to ease maintainability.

Change-Id: I2030581669c644e2d9d9f9968075ab6344445d04
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2622
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: target: am437x: pass coreid 21/2621/2
Felipe Balbi [Wed, 18 Mar 2015 21:01:00 +0000 (16:01 -0500)]
tcl: target: am437x: pass coreid

This commit is only for the sake of completeness as
default coreid is zero. In any case, coreids 1-4 are
used for the different PRU cores inside the SoC.

Change-Id: I775f2f444b1a908ffaf7bdbc43bcc966f19668c4
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2621
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotarget: am437x: use more descriptive names 20/2620/2
Felipe Balbi [Wed, 18 Mar 2015 20:50:53 +0000 (15:50 -0500)]
target: am437x: use more descriptive names

Use more descriptive names for JRC and DAPs
so they more closely match documentation.

For example there's no Cortex A9 DAP, that's
the DebugSS DAP where Cortex A9 target sits. In
that same DAP we have have ETM, STM and both
dual-PRU subsystems.

Change-Id: I0e66ebb6299763f96606fae3e4c62e5785c804f2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2620
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotarget: am437x: fix DebugSS DAP ID 19/2619/2
Felipe Balbi [Wed, 18 Mar 2015 20:23:06 +0000 (15:23 -0500)]
target: am437x: fix DebugSS DAP ID

Main DAP (where Cortex A9 sits) ID is actually
0x46b6902f. Fix it.

Change-Id: Ifa3335186bcf60d264d4ecea477bfe2f5ca10ead
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2619
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: board: add AM437x IDK support 17/2617/3
Felipe Balbi [Tue, 17 Mar 2015 16:34:21 +0000 (11:34 -0500)]
tcl: board: add AM437x IDK support

Add support for Texas Instruments AM437x
Industrial Development Kit support.

Change-Id: I33ed71c7392c3805a86cf2c8adce83c0e8aa323d
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2617
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: am437x: add reset-init event handler 16/2616/3
Felipe Balbi [Mon, 16 Mar 2015 23:50:55 +0000 (18:50 -0500)]
tcl: am437x: add reset-init event handler

this event handler will configure and lock PLLs
and configure DDR so platform is placed in usable
state.

Change-Id: Idd02f4c9789181d69578f8606ac3576ea1dd8a0b
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2616
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: am437x: disable watchdog on reset-end 15/2615/3
Felipe Balbi [Mon, 16 Mar 2015 04:15:15 +0000 (23:15 -0500)]
tcl: am437x: disable watchdog on reset-end

sometimes, watchdog might be left running and
it could expire in the middle of a debug session,
to prevent that, just make sure to disable watchdog
on reset-end if current state is 'halted'.

Change-Id: Ib4f2a2321cba17cd8c56ca3ae63114a563a6de90
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2615
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: am437x: define registers to be used later 14/2614/3
Felipe Balbi [Mon, 16 Mar 2015 20:20:41 +0000 (15:20 -0500)]
tcl: am437x: define registers to be used later

a later commit will implement a proper reset-init
handler to lock pll and configure ddr as we should.

Change-Id: I432cf28a5a944bfa83c20aed7298dbd29df30e38
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2614
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: board: ti_am43xx_evm: follow xds100v2 requirements 13/2613/3
Felipe Balbi [Sat, 14 Mar 2015 00:56:11 +0000 (19:56 -0500)]
tcl: board: ti_am43xx_evm: follow xds100v2 requirements

xds100v2 asks us to call these three commands to
guarantee proper behavior, so do it.

Change-Id: Iecf9c148ce7c2082ef915b46eeb511ceea395cc3
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2613
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: board: ti_am437x_evm: select jtag transport 12/2612/2
Felipe Balbi [Sat, 14 Mar 2015 00:55:36 +0000 (19:55 -0500)]
tcl: board: ti_am437x_evm: select jtag transport

default already is jtag, but this silences a
warning during startup.

Change-Id: I94478327bbb259649500ef74a5b5c10d51e2a517
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2612
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: target: am437x: use entire SRAM area 11/2611/2
Felipe Balbi [Sat, 14 Mar 2015 00:32:01 +0000 (19:32 -0500)]
tcl: target: am437x: use entire SRAM area

According to AM4379 TRM [1], table 2-1 L3 Memory Map,
we have a total of 256KiB and there's no reason not to
use it all.

[1] http://www.ti.com/lit/ug/spruhl7b/spruhl7b.pdf

Change-Id: I117f2afe721bc4e3f0df304d3542e1a91aa69d12
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-on: http://openocd.zylin.com/2611
Tested-by: jenkins
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agotcl: target: am437x.cfg: pass correct dbgbase 02/2602/2
Felipe Balbi [Fri, 13 Mar 2015 22:10:42 +0000 (17:10 -0500)]
tcl: target: am437x.cfg: pass correct dbgbase

Since commit ec9ccaa28849 (arm_adi_v5: make dap_lookup_cs_component()
traverse subtables and handle multicore) AM437x devices can't be used
with OpenOCD anymore. The reason is that dbgbase used to be set to zero
before that commit and that just happens to work with AM437x devices.

A more robust solution is to pass correct dbgbase when creating the
target, which this commit does.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Change-Id: Iaf2617804324de8094b25137943e08b84f14c75f
Reviewed-on: http://openocd.zylin.com/2602
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agotarget/target.c: fixed rp check bug in asynchronous flash write algorithm. 57/2657/2
DmitryShpak [Wed, 25 Mar 2015 11:31:16 +0000 (14:31 +0300)]
target/target.c: fixed rp check bug in asynchronous flash write algorithm.

Bug in read pointer check within flash write algorithm made incorrect check
if block size is more than 4 bytes (bug was detected with 16 bytes block size).

Change-Id: I5b8e7ebca619a0a85ae6e9e496ff792248134d81
Signed-off-by: DmitryShpak <disona@yandex.ru>
Reviewed-on: http://openocd.zylin.com/2657
Tested-by: jenkins
Reviewed-by: Jens Bauer <jens@gpio.dk>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
9 years agojtag/drivers/ftdi.c: removed memory leak 63/2563/3
Mateusz Manowiecki [Thu, 26 Feb 2015 21:06:46 +0000 (22:06 +0100)]
jtag/drivers/ftdi.c: removed memory leak

swd_cmd_queue buffer memory leak removed

Change-Id: Iafcdf034d32a37d577b58b6256c8fd9b064ce228
Signed-off-by: Mateusz Manowiecki <segmentation@fault.pl>
Reviewed-on: http://openocd.zylin.com/2563
Tested-by: jenkins
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agodoc: update RTOS section, add 'mqx' info 92/2592/2
Marian Cingel [Mon, 9 Mar 2015 18:52:29 +0000 (19:52 +0100)]
doc: update RTOS section, add 'mqx' info

Change-Id: I20b93d49d275e6daaf5e39c49b4508c70c6fc56f
Signed-off-by: Marian Cingel <cingel.marian@gmail.com>
Reviewed-on: http://openocd.zylin.com/2592
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoAdd configuration for EFM32 Gecko boards with Segger J-Link. 85/2585/4
Uwe Bonnes [Sun, 8 Mar 2015 14:09:14 +0000 (15:09 +0100)]
Add configuration for EFM32 Gecko boards with Segger J-Link.

Tested with Tiny Gecko.

Change-Id: Iddb87170b6aaaf7f15d3c4517c8661dd6394be8f
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2585
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash/nor: mrvlqspi: fix printf formatting issues 77/2577/2
Mahavir Jain [Thu, 5 Mar 2015 12:12:54 +0000 (17:42 +0530)]
flash/nor: mrvlqspi: fix printf formatting issues

Change-Id: I74cfce7bb8dbc13fbc3005b5a96213417f93a9f2
Signed-off-by: Mahavir Jain <mjain@marvell.com>
Reviewed-on: http://openocd.zylin.com/2577
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Stian Skjelstad <stian@nixia.no>
9 years agotransport: make 'transport select' auto-select the first available transport if not set 51/2551/7
Angus Gratton [Tue, 24 Feb 2015 21:19:15 +0000 (08:19 +1100)]
transport: make 'transport select' auto-select the first available transport if not set

This should allow most of the existing configurations for older
versions to remain compatible without forcing the user to change his
or her config to explicitly select transport.

Also in some circumstances can remove the need to chain a "-c transport
select X" when building custom configs on the command line, which seems
like a common new user pitfall.

Change-Id: Ic87a38c0b9b88e88fb6d106385efce2f39381d3d
Suggested-by: Petteri Aimonen <jpa@git.mail.kapsi.fi>
Signed-off-by: Angus Gratton <gus@projectgus.com>
Reviewed-on: http://openocd.zylin.com/2551
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotarget/adi_v5_swd, cortex_m: properly handle more cases requiring reconnect 96/2596/5
Paul Fertser [Wed, 11 Mar 2015 08:33:55 +0000 (11:33 +0300)]
target/adi_v5_swd, cortex_m: properly handle more cases requiring reconnect

This brings SWD reconnection procedure in line with the ARM
documentation and changes cortex_m reset procedure to make use of it.

The motivation behind this patch is to make SAM4L "reset" and "reset
halt" properly without SRST. The complication here is that EDBG issues
an additional read of DP_RDBUFF automatically right after writing
SYSRESETREQ, that leads to a FAULT which needs to be dealt with
properly. With this patch the very first ahbap_debugport_init DAP
access will make SWD layer properly reinitialise the link before
continuing.

Runtime tested with mbed CMIS-DAP + KL25 only.

Change-Id: Ic506f9db30931dfa60860036b83f73b897975909
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2596
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agodrivers/cmsis-dap: port to common SWD framework 56/2356/9
Paul Fertser [Sun, 26 Oct 2014 07:51:02 +0000 (10:51 +0300)]
drivers/cmsis-dap: port to common SWD framework

Valgrind-tested.

Comparison of flashing performance on an FRDM-KL25Z board running mbed
CMSIS-DAP variant, 5MHz clock, old driver:

wrote 28096 bytes from file demo.elf in 26.833590s (1.023 KiB/s)
verified 27264 bytes in 1.754972s (15.171 KiB/s)

this implementation:

wrote 28096 bytes from file demo.elf in 3.691939s (7.432 KiB/s)
verified 27264 bytes in 0.598987s (44.450 KiB/s)

Also tested "Keil ULINK-ME CMSIS-DAP" with an STM32F100 target, 5MHz
clock, results reading from flash, old driver:

dumped 131072 bytes in 98.445305s (1.300 KiB/s)

this implementation:

dumped 131072 bytes in 8.242686s (15.529 KiB/s)

Change-Id: Ic64d3124b1d6cd9dd1016445bb627c71e189ae95
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2356
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board/twr-k60f120m: remove useless flash bank 0 definition 95/2595/3
Paul Fertser [Tue, 10 Mar 2015 19:27:16 +0000 (22:27 +0300)]
tcl/board/twr-k60f120m: remove useless flash bank 0 definition

Since the very first flash bank is already defined in target/kx.cfg,
there's no sense in repeating it.

Reported and tested by Richard Braun.

Change-Id: I417b7072b5e6675ddbf824446e7581b8b7da8f4b
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2595
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash/nor/kinetis: do not attempt mass-erase in place of a bank erase 94/2594/3
Paul Fertser [Tue, 10 Mar 2015 19:22:36 +0000 (22:22 +0300)]
flash/nor/kinetis: do not attempt mass-erase in place of a bank erase

Many kinetis parts come in multi-bank configuration, so this
optimisation here can't be performed safely.

Investigated and fixed by Richard Braun.

Change-Id: I2b56614b47951595c403a1a8edd3afe11b85679b
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2594
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoarmv7m_trace, stlink: provide APIs to capture trace with an adapter 40/2540/13
Paul Fertser [Tue, 10 Feb 2015 10:32:07 +0000 (13:32 +0300)]
armv7m_trace, stlink: provide APIs to capture trace with an adapter

Change-Id: I9d193dd5af382912e4fe838bd4f612cffd11b295
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2540
Tested-by: jenkins
9 years agoarmv7m: add generic trace support (TPIU, ITM, etc.) 38/2538/14
Paul Fertser [Mon, 9 Feb 2015 14:04:52 +0000 (17:04 +0300)]
armv7m: add generic trace support (TPIU, ITM, etc.)

This provides support for various trace-related subsystems in a
generic and expandable way.

Change-Id: I3a27fa7b8cfb111753088bb8c3d760dd12d1395f
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2538
Tested-by: jenkins
9 years agostm32l1.cfg: Add missing dash to fix f7394049d3 commit. 90/2590/3
Uwe Bonnes [Mon, 9 Mar 2015 13:08:48 +0000 (14:08 +0100)]
stm32l1.cfg: Add missing dash to fix f7394049d3 commit.

Change-Id: Ifeb2d4fc2b43813edbc6fe2cf08bfd4c55cd1e86
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2590
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Stian Skjelstad <stian@nixia.no>
9 years agotcl: Add default hooks for STM32F3x 96/2196/5
Andreas Fritiofson [Thu, 3 Jul 2014 17:33:45 +0000 (19:33 +0200)]
tcl: Add default hooks for STM32F3x

Keep clocks running in low power modes. Stop watchdogs from interfering
with the debug session. Set up PLL and increase clock at reset init.

Change-Id: I984d2018f7d47a1042f1e12894563154fa7b566c
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2196
Tested-by: jenkins
Reviewed-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoflash/nor/stellaris: allow to recover a locked device that can't be examined 52/2552/2
Paul Fertser [Sat, 21 Feb 2015 07:55:41 +0000 (10:55 +0300)]
flash/nor/stellaris: allow to recover a locked device that can't be examined

Change-Id: I28536184053e2d1ba906620e728f7fad6ba39f0a
Reported-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2552
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Ed Beroset <beroset@ieee.org>
9 years agojlink: Add variant "J-Link Lite-XMC4000" 68/2568/2
Andreas Färber [Sat, 28 Feb 2015 01:39:44 +0000 (02:39 +0100)]
jlink: Add variant "J-Link Lite-XMC4000"

Avoids "J-Link hw type unknown 0x10" on the Infineon Relax Lite Kit.

Change-Id: I3091623ead2e84b67ac20d9866307ccbb3f26f66
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2568
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agojlink: Add variant "J-Link Lite-XMC4200" 65/2565/3
Andreas Färber [Sat, 28 Feb 2015 00:23:34 +0000 (01:23 +0100)]
jlink: Add variant "J-Link Lite-XMC4200"

Avoids "J-Link hw type unknown 0x11" on various Infineon boards.

Change-Id: If20b9e21110d2acc02be57f5faf28c5e6a39e2c9
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2565
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoserver, target, cortex_m: add deinit_target to the API to free resources 44/2544/5
Paul Fertser [Wed, 11 Feb 2015 08:08:40 +0000 (11:08 +0300)]
server, target, cortex_m: add deinit_target to the API to free resources

This should facilitate dynamic target creation and removal.

Currently it helps with getting 0 bytes lost report from Valgrind on
exit (after talking to a nucleo board). However, 1,223,886 bytes in
5,268 blocks are still reachable which means the app holds pointers to
that data on exit. The majority comes from the jtag command queue,
there're also many blocks from TCL command registration.

Change-Id: I7523234bb90fffd26f7d29cdd7648ddd221d46ab
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2544
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
9 years agotarget/target: call event handlers around examine when polling resumes 36/2536/6
Paul Fertser [Mon, 9 Feb 2015 13:43:58 +0000 (16:43 +0300)]
target/target: call event handlers around examine when polling resumes

The target might be using Tcl examine-start and examine-end handlers,
they need to be called when the target gets reexamined after polling
succeeds again.

Change-Id: I371380c6f3c427ec7a0206d73426f6589f18a9bd
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2536
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
9 years agohla/hla_interface: call HLA layout API close() on quit 43/2543/5
Paul Fertser [Wed, 11 Feb 2015 08:04:15 +0000 (11:04 +0300)]
hla/hla_interface: call HLA layout API close() on quit

This bug was exposed by Valgrind.

Change-Id: I2e2bc036b49ca3ff22f78f765ee4537763350096
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2543
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotarget/cortex_m: do not leak memory on reexamination 42/2542/5
Paul Fertser [Wed, 11 Feb 2015 08:02:34 +0000 (11:02 +0300)]
target/cortex_m: do not leak memory on reexamination

This bug was exposed by Valgrind.

Change-Id: If50878664d928c0a44e309ca1452089c1ac71466
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2542
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotarget: fix timer callbacks processing 41/2541/3
Paul Fertser [Wed, 11 Feb 2015 07:51:17 +0000 (10:51 +0300)]
target: fix timer callbacks processing

Warning, behaviour change: before this patch if a timer callback
returned an error, the other handlers in the list were not called.

This patch fixes two different issues with the way timer callbacks are
called:

1. The function is not designed to be reentrant but a nested call is
possible via: target_handle timer event -> poll -> target events
before/after reexaminantion -> script_command_run ->
target_call_timer_callbacks_now . This patch makes function a no-op
when called recursively;

2. The current code can deal with the case when calling a handler
leads to its removal but not when it leads to removal of the next
callback in the list. This patch defers actual removal to consolidate
it with the calling loop.

These bugs were exposed by Valgrind.

Change-Id: Ia628a744634f5d2911eb329747e826cb9772e789
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2541
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoarm11: initialise DPM and register cache before reading DSCR for the first time 43/2043/2
Paul Fertser [Thu, 13 Mar 2014 09:27:45 +0000 (13:27 +0400)]
arm11: initialise DPM and register cache before reading DSCR for the first time

When target was already halted during the initial examination,
arm11_check_init() was trying to read, store and interpret DSCR
contents before the DPM structure is initialised. This caused
a segfault like described on
http://sourceforge.net/apps/trac/openocd/ticket/65 .

This is a totally untested attempt to fix this issue.

Change-Id: I2fff115679a3f0023e7a88c749ccb5f045d6cf01
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2043
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agostlink: avoid null pointer dereference in stlink_usb_close() 50/2550/5
Paul Fertser [Sun, 15 Feb 2015 18:37:16 +0000 (21:37 +0300)]
stlink: avoid null pointer dereference in stlink_usb_close()

Otherwise it happens if stlink can not be opened on start.

Change-Id: I7088f10e61508dae230eccfe576a51498c92f5b8
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2550
Tested-by: jenkins
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Stian Skjelstad <stian@nixia.no>
9 years agoopenrisc: add profiling function 94/2494/2
Franck Jullien [Fri, 23 Jan 2015 13:09:14 +0000 (14:09 +0100)]
openrisc: add profiling function

Change-Id: Ifee89b289069590e6086a4713b165989578e29ec
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/2494
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoarmv7m: do not access FPU registers when not present 16/2516/4
Paul Fertser [Thu, 29 Jan 2015 10:58:45 +0000 (13:58 +0300)]
armv7m: do not access FPU registers when not present

This is runtime and valgrind tested with l0, l1 and f3 hla boards.

Change-Id: I49b0b042253d5f3bf216997f0203583db319fe23
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2516
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoarmv7m: add FPU registers support 14/514/20
Paul Fertser [Sun, 1 Apr 2012 13:18:02 +0000 (15:18 +0200)]
armv7m: add FPU registers support

This patch adds the fpv4-sp-d16 registers to the armv7m register set.

The work is inspired by Mathias K but takes a different approach:
instead of having both double and single presicion registers in the
cache this patch works only with the doubles and counts on GDB to
split the data in halves whenever needed.

Tested with HLA only (on an STM32F334 disco board).

Currently this patch makes all ARMv7-M targets report an FPU-enabled
target description to GDB. It shouldn't harm if the user is not trying
to access non-existing FPU. However, the plan is to make this depend
on actual FPU presence later.

Change-Id: Ifcc72c80ef745230c42e4dc3995f792753fc4e7a
Signed-off-by: Mathias K <kesmtp@freenet.de>
[fercerpav@gmail.com: rework to fit target description framework]
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/514
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agojimtcl: update to 0.76 release version 22/2522/2
Paul Fertser [Sat, 31 Jan 2015 08:20:51 +0000 (11:20 +0300)]
jimtcl: update to 0.76 release version

It makes sense to use the latest released version to ensure
compatibility.

Change-Id: I0957f927d825fa6fb6a1594ca17bcca46ee6c1a6
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2522
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>

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)