openocd.git
10 years agonrf51: Remove unnecessary explicit type casting 55/2055/4
Andrey Smirnov [Mon, 17 Mar 2014 22:04:09 +0000 (15:04 -0700)]
nrf51: Remove unnecessary explicit type casting

Change-Id: I523e81645434760649ea2c00e6f80c2b08d08d94
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-on: http://openocd.zylin.com/2055
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agonrf51: Add UICR writing support 13/2013/10
Andrey Smirnov [Sat, 1 Mar 2014 21:40:08 +0000 (13:40 -0800)]
nrf51: Add UICR writing support

SoftDevice stack ihex binary, provided by Nordic expects being able to
write data necessary for its correct operation at the adresses inside UICR.
This patch exposes UICR region of flash as a second bank on the MCU to
facilitate that.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Change-Id: Idbc140b8de027f60655f78043877b7c054eb06f9
Reviewed-on: http://openocd.zylin.com/2013
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agonrf51: Add a known devices table and simple chip type detection code 12/2012/5
Andrey Smirnov [Fri, 28 Feb 2014 19:35:16 +0000 (11:35 -0800)]
nrf51: Add a known devices table and simple chip type detection code

Unfortunately due to my oversight, the original version of the
nrf51_probe function contained useless code that read the contents of
DEVICEID[0] an DEVICEID[1] registers and did nothing about it(those
registers had nothing to do with the device type information anyway).

This commit fixes that code by changing its behavior to read the HWID
field of CONFIGID register and looking up the corresponding device
information in the know devices table. This information is useful
when choosing the versions of SDK and SoftDevice for the chip
using "nRF51822 compatibility matrix".

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Change-Id: Ibd80b35460df4278e86e0c2500b7dcc876eec10c
Reviewed-on: http://openocd.zylin.com/2012
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agocfg: or1k_generic: allow TAP_TYPE override 56/2056/2
Franck Jullien [Tue, 18 Mar 2014 19:04:30 +0000 (20:04 +0100)]
cfg: or1k_generic: allow TAP_TYPE override

This patch allows users to specify TAP_TYPE from
the command line when using or1k_generic.cfg.

Change-Id: I9f4b7d8e4867658fa34bb4e92fc3a5f25227df11
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/2056
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agoarmv7m: Do not ignore 'value' parameter in armv7m_write_core_reg 57/2057/3
Andrey Smirnov [Wed, 19 Mar 2014 15:20:36 +0000 (08:20 -0700)]
armv7m: Do not ignore 'value' parameter in armv7m_write_core_reg

Ignoring the value parameter in that function makes its code rather
misleading. Also the only caller of it, armv7m_restore_context already
does the whole "buf_get_u32" conversion business, so using
'value' also removes the waste of doing the conversion twice.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Change-Id: I515979c314d9b59ee1065c55b5bb5747c7e93f01
Reviewed-on: http://openocd.zylin.com/2057
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agotcl: add Zynq-7000 target and Zedboard board configs 61/2061/5
Tim Sander [Fri, 21 Mar 2014 16:43:04 +0000 (17:43 +0100)]
tcl: add Zynq-7000 target and Zedboard board configs

Change-Id: Ia7f2a57d1b32dda9936ad87e22635f7749ff3ce1
Signed-off-by: Tim Sander <tim@krieglstein.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2061
Tested-by: jenkins
10 years agoAT91SAM4L: Fix bug when writing to flash at a non-zero offset, add debug 65/1965/2
Angus Gratton [Wed, 12 Feb 2014 11:32:47 +0000 (22:32 +1100)]
AT91SAM4L: Fix bug when writing to flash at a non-zero offset, add debug
output for flash page writes

The offset wasn't being considered in the "full page" write codepath, so any
writes at an offset were actually written out starting from page 0.

Change-Id: I5e70a1f35f144b3edd1ce6d9df9af9b5da6cf194
Signed-off-by: Angus Gratton <gus@projectgus.com>
Reviewed-on: http://openocd.zylin.com/1965
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agojlink: add support for Jlink-OB (0x0105) devices 31/2031/3
Andrey Yurovsky [Sat, 8 Mar 2014 01:16:52 +0000 (17:16 -0800)]
jlink: add support for Jlink-OB (0x0105) devices

The JLink-OB (onboard) devices work the same way as the normal JLink
except that their PID is 0x0105 (and that's the only one we know of so
far) and their endpoint addresses are different due to there being a
CDC-ACM interface as well.  These JLink-OB devices show up on a lot of
vendors' development kits as an integrated debugger.

This change simply checks whether the adapter we opened has a JLink-OB
PID and, if it does, uses the JLink-OB endpoints rather than the
default.  To do this, we add a new routine, jtag_libusb_get_pid() to the
libusb adapter layer, it in turn just calls
libusb_get_device_descriptor(), which previously had no wrapper.

Also, checkpatch.pl doesn't like the VID/PID macros as defined so I
moved them to the array itself.  This should have no effect on the code.

This change adds the 0102 through 0104 PIDs to openocd.rules as well as this
new 0105 PID.

Tested on an Atmel SAM4S Xplained board which has a JLink-OB, also
regression tested by using a 0x0101 PID normal JLink adapter.

Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Change-Id: I121d30e57729cda3adb66e2a5dc72e1fcb7ef8b1
Reviewed-on: http://openocd.zylin.com/2031
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agoSupport for sam3n0a sam3n0b sam3n00a sam3n00b 42/2042/4
Andreas Fritiofson [Thu, 13 Mar 2014 21:18:29 +0000 (22:18 +0100)]
Support for sam3n0a sam3n0b sam3n00a sam3n00b

Change-Id: I70a04f5f9b0b20d42a677ea8781130e44be758d3
Signed-off-by: Stefan Arnold <sarnold@sh-sw.de>
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2042
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agotop .gitignore: ignore ctags tag files 71/1971/2
Antony Pavlov [Tue, 25 Feb 2014 20:10:12 +0000 (00:10 +0400)]
top .gitignore: ignore ctags tag files

Change-Id: I64538525626688b0cd1eda579294e547a2e40b30
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1971
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agocfg: add TI am43xx devices 47/2047/4
Felipe Balbi [Sat, 1 Mar 2014 00:22:38 +0000 (18:22 -0600)]
cfg: add TI am43xx devices

This adds support for the am43xx SoC and the AM437x GP EVM and AM438x
ePOS EVM.

Change-Id: I09cbb09072f38e0e08fdd520dedb6e67d45056be
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
Reviewed-on: http://openocd.zylin.com/2047
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agoflash/nor/tcl: fix segfault on write_image misuse 70/1970/2
Paul Fertser [Tue, 25 Feb 2014 17:22:11 +0000 (21:22 +0400)]
flash/nor/tcl: fix segfault on write_image misuse

"flash write_image (unlock|erase)" (without filename) was causing
segmentation fault in strcmp(). This patch fixes it.

Change-Id: Ia3b8c796f4107621d78605c02d2b8e123b1b207b
Reported-by: ajkroll][ <ajkroll][@irc.freenode.net>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1970
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agomips_ejtag.c: disable DMA for all platforms 36/1936/3
Oleksij Rempel [Mon, 27 Jan 2014 09:07:38 +0000 (10:07 +0100)]
mips_ejtag.c: disable DMA for all platforms

DMA seems to be broken in many ways. Don't trust it!

Change-Id: I7e28608f299abdf78d02a967c62849b6b2ce5985
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/1936
Tested-by: jenkins
Reviewed-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agoft2232: Mark interface driver as deprecated 99/1899/4
Andreas Fritiofson [Sat, 22 Mar 2014 13:09:06 +0000 (14:09 +0100)]
ft2232: Mark interface driver as deprecated

Change-Id: I5ebc924ab66c86f1902942bebc203a34d97abc64
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1899
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocfg: Added st nucleo board configs. 22/2022/4
Jens Hoffmann [Wed, 5 Mar 2014 21:49:14 +0000 (22:49 +0100)]
cfg: Added st nucleo board configs.

This patch adds board configs for Nucleo FXXX boards.

Change-Id: I25bfd7d63f734bad710917efa67bc6096aa60ef8
Signed-off-by: Jens Hoffmann <jehoffma@gmail.com>
Reviewed-on: http://openocd.zylin.com/2022
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agotcl: target: icepick: add icepick_d_tapenable procedure 30/2030/2
Felipe Balbi [Sat, 1 Mar 2014 00:22:35 +0000 (18:22 -0600)]
tcl: target: icepick: add icepick_d_tapenable procedure

instead of replicating icepick_d_tapenable in many of TI's newer
platforms, we can move to icepick.cfg and just call it from board TCL
configuration file.  This is similar to the C but has a few changes we
need to make.

Change-Id: I0ab48005ccd66cd5b67b919fb5e3b462288f211d
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
Reviewed-on: http://openocd.zylin.com/2030
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agotcl/interface/ftdi: add Digilent JTAG-SMT2 config 29/2029/3
Paul Fertser [Thu, 6 Mar 2014 12:55:13 +0000 (16:55 +0400)]
tcl/interface/ftdi: add Digilent JTAG-SMT2 config

Tested on ZedBoard by Tim Sander.

Change-Id: I4316d9b4d36f01bbe91a46c78ea8bca22efb1a5a
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2029
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocfg: change default SAM4L cortex_m reset_config 95/1995/2
Spencer Oliver [Thu, 27 Feb 2014 20:44:19 +0000 (20:44 +0000)]
cfg: change default SAM4L cortex_m reset_config

From testing this target does not seem to support using SYSRESETREQ, change
the default to the safe VECTRESET.

This target also has other reset issues (srst not working) that will be
addressed in another patch.

Change-Id: Icfc78347dc71aa3a062ddea63190a818d7fbc760
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1995
Tested-by: jenkins
Reviewed-by: Angus Gratton <gus@projectgus.com>
10 years agoCMSIS-DAP: print a debug message when the USB product string cannot be read 48/2048/4
Jörg Wunsch [Fri, 14 Mar 2014 13:41:51 +0000 (14:41 +0100)]
CMSIS-DAP: print a debug message when the USB product string cannot be read

As suggested by Stian Skjelstad in a comment in:

http://openocd.zylin.com/#/c/2044/

if the USB product string cannot be read, provide a debug message so
users might get aware of a potential permission problem when looking
at the debug output.

Fix style bug found by Jenkins.

Change-Id: I6acb1c6261fec6f2bee80e4be513a5c5e29eff79
Signed-off-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-on: http://openocd.zylin.com/2048
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoMake the Atmel SAM3 family SWD-aware 46/2046/2
Jörg Wunsch [Fri, 14 Mar 2014 10:29:24 +0000 (11:29 +0100)]
Make the Atmel SAM3 family SWD-aware

Atmel's SAM3 and SAM4 processor families are very close to each other
in many respects.  However, so far, only the SAM4 target script
contained the magic to allow using SWD, while SAM3 was tied to JTAG
only.  This e.g. prevented the CMSIS-DAP driver from accessing SAM3
devices as it only uses SWD transport (by now).

The patch pulls all the things from the SAM4 target script that are
also applicable to SAM3 devices.  With the patch, an Atmel CMSIS-DAP
debugger (Atmel-ICE) was proven to be able to successfully attach to a
SAM3S-EK evaluation kit.  I also cross-checked that accessing through
a SAM-ICE (Segger J-Link) still works with the patch.

Change-Id: I20dafbff8e1e9f967da950e48a56205586eeef8d
Signed-off-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-on: http://openocd.zylin.com/2046
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoAll Atmel-provided CMSIS-DAP devices use 512 byte packet size 45/2045/3
Jörg Wunsch [Fri, 14 Mar 2014 10:00:54 +0000 (11:00 +0100)]
All Atmel-provided CMSIS-DAP devices use 512 byte packet size

The existing CMSIS-DAP driver matches the USB VID/PID against 0x3eb
(Atmel VID) and 0x2111 (Atmel EDBG embedded CMSIS-DAP debugger), and
then bumps the packet size from its default of 64 to 512.  However, it
turned out that *all* Atmel-provided CMSIS-DAP devices (EDBG with PID
0x2111; JTAGICE3 with firmware version 3.x, PID 0x2140; new Atmel-ICE
[successor of JTAGICE3], PID 0x2141) require a 512-byte packet size.
Obviously, all run the same USB implementation inside their custom
microcontroller.  Thus, it seems best to simply assume that *all*
Atmel CMSIS-DAP devices use this packet size, and don't check the PID
at all.

This has also been filed as Trac bug #68:

https://sourceforge.net/apps/trac/openocd/ticket/68

Change-Id: I942af93060fdf265fca3961841638caa6182f877
Signed-off-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-on: http://openocd.zylin.com/2045
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
10 years agoPrevent segfault when the USB product string cannot be retrieved 44/2044/3
Jörg Wunsch [Fri, 14 Mar 2014 09:50:36 +0000 (10:50 +0100)]
Prevent segfault when the USB product string cannot be retrieved

In the CMSIS-DAP driver, if nothing has been specified by the user, an
attempt is made to find the first device with the (mandatory)
substring "CMSIS-DAP" in any USB device's product string.  However,
while (usually) all devices can be traversed, devices the user does
not have permission for cannot be read the product string from,
resulting in a NULL pointer.  Trying to find the substring "CMSIS-DAP"
causes a segementation fault then.

This has also been filed as Trac bug #67:

https://sourceforge.net/apps/trac/openocd/ticket/67

Change-Id: Idfc9f072e34152e9af99fe1c8ec88c99dea4624c
Signed-off-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-on: http://openocd.zylin.com/2044
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agostm32f2x.c: Add STM32F401xE device id. 37/2037/2
Jens Hoffmann [Sun, 9 Mar 2014 09:42:09 +0000 (10:42 +0100)]
stm32f2x.c: Add STM32F401xE device id.

Nucleo F401 board uses STM32F401RE chip with new device id and
got more flash than existing devices (512K). This patch adds
new the identifier to probe functions so flashing will now work.

Change-Id: Ibe9c047c79244db0cfbb06610da9d84987b9f85a
Signed-off-by: Jens Hoffmann <jehoffma@gmail.com>
Reviewed-on: http://openocd.zylin.com/2037
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoflash: Constify write buffer 40/2040/2
Andreas Fritiofson [Mon, 10 Mar 2014 21:23:07 +0000 (22:23 +0100)]
flash: Constify write buffer

Change-Id: Ic812098d3ed5a2992c26bb57d08ae350e2c5d5d8
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2040
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoflash/kinetis: Fix bug in odd byte count padding 39/2039/2
Andreas Fritiofson [Mon, 10 Mar 2014 21:20:16 +0000 (22:20 +0100)]
flash/kinetis: Fix bug in odd byte count padding

Change-Id: Ic5cfd880f2b49e3a96c408cf868db622bfe698a1
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2039
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoflash/efm32: Fix bug in odd byte count padding 38/2038/2
Andreas Fritiofson [Mon, 10 Mar 2014 21:18:57 +0000 (22:18 +0100)]
flash/efm32: Fix bug in odd byte count padding

Change-Id: I7fcd152a8501f399c6ac5a85fd62a84c82b030a0
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2038
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agotarget: Don't poll until the target is examined. 41/2041/2
Andreas Fritiofson [Tue, 11 Mar 2014 06:59:51 +0000 (07:59 +0100)]
target: Don't poll until the target is examined.

The timer callback is started on target init, but it makes no sense to
poll until the target is fully setup.

Change-Id: I118201e125e39be3d0a920e3ef9a3f68a2035f39
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2041
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoopenocd.texi: document Tcl RPC and add an example client 15/1915/2
Paul Fertser [Fri, 31 Jan 2014 18:59:38 +0000 (22:59 +0400)]
openocd.texi: document Tcl RPC and add an example client

This should provide enough information to start using OpenOCD RPC.

I've seen some other example clients in different languages but I
can't find them anymore, and their legal status was unclear.

Change-Id: I3a95fe361d773040d1e52a62f9cc0cc655019a9f
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1915
Tested-by: jenkins
Reviewed-by: Andreas Ortmann <ortmann@finf.uni-hannover.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agotcl/board: add config for DP Bus Blaster reconfiguration 36/2036/3
Paul Fertser [Sun, 9 Mar 2014 05:54:08 +0000 (09:54 +0400)]
tcl/board: add config for DP Bus Blaster reconfiguration

Reported and tested by Gracana on IRC.

Change-Id: If0524d2d627d566e8b5e1d00784dd7556f44b125
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2036
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agogdb_server: do not copy feature names for tdesc generation 28/2028/2
Paul Fertser [Fri, 7 Mar 2014 06:45:31 +0000 (10:45 +0400)]
gdb_server: do not copy feature names for tdesc generation

We always have feature names defined by string literals and the
standard guarantees static storage duration for them. Hence, there's
no need duplicating and then freeing them.

Valgrind-tested.

Change-Id: I1b77f966c548e3694141c63bd8680735f0f47505
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2028
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agostlink_usb.c: add support for STLink V2-1 19/2019/6
Bartosz Bielawski [Tue, 4 Mar 2014 21:19:16 +0000 (22:19 +0100)]
stlink_usb.c: add support for STLink V2-1

The new version of STLink (V2-1) has a different USB endpoint layout.
As the PID of the device also changed it's possible to change EPs used
by OpenOCD in runtime. The patch adds three new fields to stlink_usb_handle_s
and assigns right EP numbers in stlink_usb_open().
Parts of the code inspired by and used with consent of Jens Hoffmann.

Change-Id: I93b69fb889f15317e9bf864905f435905db39745
Signed-off-by: Bartosz Bielawski <bartosz.bielawski@gmail.com>
Reviewed-on: http://openocd.zylin.com/2019
Tested-by: jenkins
Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agobcm281xx: Add bcm281xx SoC and bcm28155_ap board 26/1926/4
Tim Kryger [Sun, 2 Feb 2014 21:26:26 +0000 (13:26 -0800)]
bcm281xx: Add bcm281xx SoC and bcm28155_ap board

Add support for Broadcom's dual A9 mobile SoC and its reference board.

Change-Id: Ia145b120043bddc89c44726066023154ae390788
Signed-off-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-on: http://openocd.zylin.com/1926
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agointerface/ftdi/xds100v2.cfg: Add another VID/PID, drop desc 16/2016/2
Tom Rini [Mon, 3 Mar 2014 20:14:47 +0000 (15:14 -0500)]
interface/ftdi/xds100v2.cfg: Add another VID/PID, drop desc

The XDS100v2 is often embedded in a number of platforms using the
VID/PID of 0x0403/0x6010 and a generic FTDI device description.  Add
this VID/PID combination and remove the description line.

Change-Id: I370e6199ac24f802426e9541e19ee38f18f1209a
Signed-off-by: Tom Rini <trini@ti.com>
Reviewed-on: http://openocd.zylin.com/2016
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agostlink: Use callback to increase frequency of trace data sampling 61/1661/5
Andreas Fritiofson [Fri, 7 Mar 2014 19:08:31 +0000 (20:08 +0100)]
stlink: Use callback to increase frequency of trace data sampling

The ST-LINK/V2 has limited internal buffering, such that trace data
can be missed if the target is generating data at a rate quicker than
the OpenOCD trace sampling. The issue of lost data is compounded since
individual TPIU packets may be split across individual STLINK_TRACE_EP
reads, and misleading results can occur if mid-packet loss occurs.

This patch increases the frequency of checking for pending trace data
with the aim of minimising such losses. Note: With the limited (I/O
and memory) bandwidth of the ST-LINK/V2 there cannot, however, be a
guarantee against trace data loss.

The timer callback is only added when enabling tracing, and is removed
when tracing is disabled.

Change-Id: Ibde9794b77793d3068f88cb5c1a26f9ceadcbd8a
Signed-off-by: James G. Smith <jsmith@ecoscentric.com>
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1661
Tested-by: jenkins
10 years agonrf51: Fix format string bugs in nrf51_info 11/2011/2
Andrey Smirnov [Fri, 28 Feb 2014 19:27:40 +0000 (11:27 -0800)]
nrf51: Fix format string bugs in nrf51_info

Additional information string appended to the 'flash info' output used
incorrect offsets and was missing a couple of fields.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Change-Id: If131be021295cab6adfca7da03c2f0fb8dca7d42
Reviewed-on: http://openocd.zylin.com/2011
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocfg: Switch ti_beaglebone to new ftdi interface 17/2017/2
Tom Rini [Mon, 3 Mar 2014 20:17:55 +0000 (15:17 -0500)]
cfg: Switch ti_beaglebone to new ftdi interface

Tested on Beagelbone White.

Change-Id: I544d7c1ba21a6bd594c0a1c4a9611639fa3c320d
Signed-off-by: Tom Rini <trini@ti.com>
Reviewed-on: http://openocd.zylin.com/2017
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agocortex_a: Fix endianess issues in cortex_a8_*_apb_ab_memory 81/1781/11
Kamal Dasu [Thu, 24 Oct 2013 18:58:55 +0000 (14:58 -0400)]
cortex_a: Fix endianess issues in cortex_a8_*_apb_ab_memory

Make the APB-AB memory read routines handle endianess order
when running on big endian host. cortex_a8_read_apb_ab_memory
is also called by cortex_a8_write_apb_ab_memory and was breaking
both APB-AB read and write functions. Also fixed bug in write
function in calculating the offset of end of buffer data. The
change aslo fixes the read issues with all combinations of
aligned unaligned memory access found by 'test_mem_access' cmd.

Tested with target "test_mem_access 4000", also size 1-9,
'mdb/h/w' 'mwb/h/w' cmds and equivalent gdb 'x' 'set' cmds.

Change-Id: Ia927c60c4837617f5342a9beb6fdab1f061855fe
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Reviewed-on: http://openocd.zylin.com/1781
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
10 years agotarget: add CoreSight PMU and an unidentified component to "dap info" 28/1928/2
Paul Fertser [Wed, 5 Feb 2014 11:08:54 +0000 (15:08 +0400)]
target: add CoreSight PMU and an unidentified component to "dap info"

Change-Id: I705eae46b190dbd89ab01bc086c49eb04368d9b3
Reported-by: Brad Riensche <brad.riensche@gmail.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1928
Tested-by: jenkins
Reviewed-by: Brad Riensche <brad.riensche@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agotarget: "dap info" command cosmetic output changes 18/1518/7
Brad Riensche [Mon, 22 Jul 2013 15:22:08 +0000 (10:22 -0500)]
target: "dap info" command cosmetic output changes

This makes the listing easier to read, imho. The tab indentation
technique causes the base address to precess as the parser proceeds
through the subtables, and can easily wrap.

Change-Id: Iea5e678255e6314a9d532e4b222a2572b5394390
Signed-off-by: Brad Riensche <brad.riensche@gmail.com>
Reviewed-on: http://openocd.zylin.com/1518
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agotargets: Print nested ROM tables with the 'dap info' command. 27/1427/8
Chris Johns [Tue, 28 May 2013 23:47:34 +0000 (09:47 +1000)]
targets: Print nested ROM tables with the 'dap info' command.

Move the ROM table printing into a separate function to allow
recursive calls with nested tables. ROM tables can nest. The
printing is limited to 16 levels.

Update the types of tables printed. When an entry can't be read, print
a warning and continue.

Change-Id: Ib134edd9e987af2f5f606071521885b17af4d70f
Signed-off-by: Chris Johns <chrisj@rtems.org>
Reviewed-on: http://openocd.zylin.com/1427
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agoRename and sort udev rules file 69/1969/4
Andreas Fritiofson [Mon, 24 Feb 2014 20:40:58 +0000 (21:40 +0100)]
Rename and sort udev rules file

Also add missing entries for JTAG-lock-pick Tiny 2, Xverve Signalyzer
LITE and default FTDI VID:PIDs.

Change-Id: I41b4f15409642298d1cf134d1f8014dc8f003005
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1969
Tested-by: jenkins
10 years agogdb_server: Fix segfault in (and rewrite) decode_xfer_read 23/2023/2
Andreas Fritiofson [Thu, 6 Mar 2014 21:06:59 +0000 (22:06 +0100)]
gdb_server: Fix segfault in (and rewrite) decode_xfer_read

Introduced by 537b06a81 (free non-malloced memory).

Rewrite to use standard C string routines and make returning annex
optional since it's not currently used.

Change-Id: Idf3698a482dfeff7fa5ea1660fd89122eb80b68d
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2023
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agogdbserver: fix duplicate declaration 20/2020/2
Spencer Oliver [Tue, 4 Mar 2014 21:51:58 +0000 (21:51 +0000)]
gdbserver: fix duplicate declaration

commit da0d1e37 did not merge correctly, causing the build to fail.

Change-Id: I3f525054bb38b7ee29bf27309bb2e6a5bb8329c7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2020
Tested-by: jenkins
10 years agoAdd support for the Atmel SAMG53 74/1974/2
Andrey Yurovsky [Wed, 26 Feb 2014 06:18:03 +0000 (22:18 -0800)]
Add support for the Atmel SAMG53

flash: at91sam4: add support for the SAMG53 family (this also covers the
SAMG51).  The SAMG5x parts have an EEFC (enhanced embedded flash controller)
which seems to be identical to the EFC that the sam4 driver supports.

Add a script for the Xplained Pro G53 board, this has the onboard CMSIS-DAP
debugger and a SAMG53N19.  Tested on this board and chip combination.

Change-Id: I12af50402cd2069b3c7380d92e6fe54816d6c045
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1974
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoCMSIS-DAP: Fix build errors on Mac OS X 73/1973/2
Jens Bauer [Tue, 25 Feb 2014 21:05:13 +0000 (22:05 +0100)]
CMSIS-DAP: Fix build errors on Mac OS X

Rename the argument variable 'wait' to 'delay', as 'wait'
conflicts with an API function declared in system header
/usr/include/sys/wait.h on Mac OS X.

Change-Id: I5742da6e5def6e5ec197e774c3844e4bf0424569
Signed-off-by: Jens Bauer <jens@gpio.dk>
Reviewed-on: http://openocd.zylin.com/1973
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agogdb_server: fix memory leaks in users of get_reg_features_list() 17/1917/6
Christian Eggers [Sun, 2 Feb 2014 12:25:16 +0000 (13:25 +0100)]
gdb_server: fix memory leaks in users of get_reg_features_list()

v4:
- changed first line of commit message
v3:
- added extra LOG_ERROR() message
v2:
- Added missing "goto error"
- free also the on extra element of features[]

In contrast to target_get_gdb_reg_list(), the list returned by
get_reg_features_list() consists of items which are itself
malloc'ed.
--> Free the list items prior freeing the list itself.

Additionally:
- gdb_generate_target_description():
  o Do error handling similar as gdb_get_target_description_chunk() does.
- gdb_get_target_description_chunk()
  o **features must be initialised prior an "goto error" can happen

Change-Id: Iad07824618c51084e0aa0499ee6fc96198b320f0
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Reviewed-on: http://openocd.zylin.com/1917
Tested-by: jenkins
Reviewed-by: Trevor Woerner <trevor.woerner@linaro.org>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoConstify received GDB packet 19/1919/6
Christian Eggers [Fri, 14 Feb 2014 20:48:52 +0000 (21:48 +0100)]
Constify received GDB packet

v2:
- Split work into separate patches

The received packet will not be altered in any of the processing functions.
Some it can be made "const".

Change-Id: I7bb410224cf6daa74a6c494624176ccb9ae638ac
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Reviewed-on: http://openocd.zylin.com/1919
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agogdb_server: Don't modify "buf" argument in decode_xfer_read() 24/1924/5
Christian Eggers [Fri, 14 Feb 2014 20:43:53 +0000 (21:43 +0100)]
gdb_server: Don't modify "buf" argument in decode_xfer_read()

Make a temporary copy of argument "buf" before modifying it.
This requires also returning annex as copy of "buf".

This change is necessary in order to make packet[] "const".

Change-Id: I41eddc2edba1a88384aa7f5591fe50f6ee6a135c
Signed-off-by: Christian Eggers <ceggers@gmx.de>
---
Changelog:
v4:
- Initialize annex to NULL
v3:
- Return "annex" as copy instead of removing it.
Reviewed-on: http://openocd.zylin.com/1924
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoRemove unneeded zero termination of received packet 22/1922/3
Christian Eggers [Mon, 3 Feb 2014 19:13:54 +0000 (20:13 +0100)]
Remove unneeded zero termination of received packet

v2:
  removed curly braces around single statement if-block

packet[] has already been zero terminated in gdb_input_inner()
This change is necessary in order to make packet[] "const".

Change-Id: I978bbe52d151a63574db77fb747f596da256d377
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Reviewed-on: http://openocd.zylin.com/1922
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agogdb-server/rtos: Send correct answer to "qfThreadInfo" packet 25/1925/2
Christian Eggers [Mon, 3 Feb 2014 20:12:49 +0000 (21:12 +0100)]
gdb-server/rtos: Send correct answer to "qfThreadInfo" packet

Even if no RTOS is configured, "qfThreadInfo" must be answered with "l"
instead of "". Otherwise GDB will switch to the older thread packet ("qL"),
which is not supported by OpenOCD.

Change-Id: Iead045bdf8268bac2378c8f70829b17c37834e44
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Reviewed-on: http://openocd.zylin.com/1925
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoRTOS: Unify wipe-out of thread list 16/1916/8
Christian Eggers [Sat, 1 Feb 2014 09:17:17 +0000 (10:17 +0100)]
RTOS: Unify wipe-out of thread list

Each RTOS implementation uses it's own (similar) code to free
the thread list. There are some additional issues:

<--->
if (pointer != NULL)
free(pointer);
<--->
This is not necessary, free(NULL) is perfectly ok.

<--->
free(rtos->thread_details);
rtos->thread_details = NULL;
rtos->thread_count = 0;
<--->
The 3rd line has been missing for all RTOS but ChibiOs. There are paths
in the code where rtos->thread_count is never set to NULL, which can
lead to null pointer dereference of rtos->thread_details.

Change-Id: I6f7045c3d4518b925cb80dd5c907a566536b34ad
Signed-off-by: Christian Eggers <ceggers@gmx.de>
---
Changelog:
v7:
- rtos_wipe_threadlist() --> rtos_free_threadlist()
- removed non related changes in gdb_server.c from this patch
v3:
- Removed world "topic" from first line of commit message
v2:
- typo: "whipe" --> "wipe"
Reviewed-on: http://openocd.zylin.com/1916
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agomips32: build register cache in a more clear way 43/1943/2
Antony Pavlov [Sun, 9 Feb 2014 08:15:06 +0000 (12:15 +0400)]
mips32: build register cache in a more clear way

This commit is inspired by armv7m_build_reg_cache().

Change-Id: I62b51b2a5f0fed788af167b6f8e60c09b53181be
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1943
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agofm3: fix erase flash fail on using High Level Adapters. 44/1944/2
Nemui Trinomius [Tue, 11 Feb 2014 07:09:32 +0000 (16:09 +0900)]
fm3: fix erase flash fail on using High Level Adapters.

This fix can "erase flash" on using High Level Adapters by running algorithm.
Because fm3 flash commands must need true 16-bit memory access,
but High Level Adapters(ST-Link/TI-ICDI) can 8/32bit access only.
Tested on MB9BF618T and MB9AF112K with STLink/V2.

Change-Id: I849a8a8e8ae2b3e77717de04f7522cf718c915d7
Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
Reviewed-on: http://openocd.zylin.com/1944
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agodrivers/jtag: usb_blaster: make command handlers more strict 42/1942/4
Antony Pavlov [Sat, 8 Feb 2014 20:11:42 +0000 (00:11 +0400)]
drivers/jtag: usb_blaster: make command handlers more strict

If user used wrong argument number for some usb_blaster_* commands
then openocd show just warning message.
This commit makes command handler's behaviour more strict and
openocd treats wrong argument number as an error.

In addition we already have 'help' and 'usage' information in
struct command_registration ublast_command_handlers[],
so we can drop redundancy messages in command handlers.

Change-Id: I73b8c75ec60a18e5258a4bdffe972e8a1afc1066
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1942
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agonrf51: Implement the support for Nordic's nRF51 devices 45/1945/11
Andrey Smirnov [Fri, 7 Feb 2014 19:54:57 +0000 (11:54 -0800)]
nrf51: Implement the support for Nordic's nRF51 devices

Add support for Nordic's nRF51 chip series. Tested with nRF51822.

Change-Id: Id70f6fd76888cc595a353aefb84d25c4cd325d7d
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1945
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoEFM32 Wonder Gecko Family support 68/1968/2
Joerg Fischer [Sun, 23 Feb 2014 17:09:50 +0000 (18:09 +0100)]
EFM32 Wonder Gecko Family support

Add support for EFM32 Wonder Gecko family to flash driver.
This family has Cortex M4F core.

Change-Id: If71511015403069e3e30cb9f19df12cd97ac49e8
Signed-off-by: Joerg Fischer <turboj@gmx.de>
Reviewed-on: http://openocd.zylin.com/1968
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agotcl/drscan: handle invalid syntax with a conditional, not assert 27/1927/2
Paul Fertser [Tue, 4 Feb 2014 12:07:57 +0000 (16:07 +0400)]
tcl/drscan: handle invalid syntax with a conditional, not assert

When "drscan" command is used improperly, such as in:
drscan stm32f1x.cpu -endstate drpause
there're no fields to scan, and so the assert leads to a
segfault. This should be treated like any other syntax error instead.

Change-Id: Id1743f5d641038e1e3754c6f3097aabc5d1916b9
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1927
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agousb_blaster: ublast_access.h: add guard macro 41/1941/3
Antony Pavlov [Sat, 8 Feb 2014 20:10:07 +0000 (00:10 +0400)]
usb_blaster: ublast_access.h: add guard macro

Change-Id: I10f6e2048cf88f64f5dce275a273783365afd65c
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1941
Tested-by: jenkins
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agodrivers/ftdi: warn the user if he tries to use undefined reset signals 48/1948/2
Paul Fertser [Sat, 15 Feb 2014 18:43:38 +0000 (22:43 +0400)]
drivers/ftdi: warn the user if he tries to use undefined reset signals

It is really an error to try to use a reset_config that doesn't match
adapter's capabilities, however OpenOCD has no way to specify them.

Using wrong reset_config might lead to very confusing behaviour, so I
think LOG_ERROR is justified here.

Change-Id: I1c6dcfa7c0d78829229a850189cad646b565dd66
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1948
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoft2232: warn about lack of TRST on "turtle" adapter 46/1946/4
Paul Fertser [Sat, 15 Feb 2014 18:28:49 +0000 (22:28 +0400)]
ft2232: warn about lack of TRST on "turtle" adapter

This patch fixes a build error (assigning a variable to itself) with
clang.

Since this adapter lacks trst, trying to use it in reset_config will
fail silently. Warn the user accordingly.

Change-Id: I16fd20936f00d7ff82962f4fcc629ff434aa4dce
Reported-by: Rainer Müller <raimue@codingfarm.de>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1946
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocfg: Make stm32f4x usable with SWD transport 51/1951/2
Fatih Aşıcı [Sun, 16 Feb 2014 09:13:53 +0000 (10:13 +0100)]
cfg: Make stm32f4x usable with SWD transport

Change-Id: Ib8f3b414ec3c31cf8a112e75efe003e2237c59bb
Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com>
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1951
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
10 years agostm32f1x: Fix option byte flag parsing 63/1963/2
Andreas Fritiofson [Fri, 21 Feb 2014 16:17:32 +0000 (17:17 +0100)]
stm32f1x: Fix option byte flag parsing

Change-Id: Ifa04e1f215ac5790db3d432cc0d7d532660459f2
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1963
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoarm926ejs: fix write memory operations with caches enabled 12/1912/2
Paul Fertser [Thu, 30 Jan 2014 10:11:13 +0000 (14:11 +0400)]
arm926ejs: fix write memory operations with caches enabled

Perform proper ICache flush operations on memory writes. This should fix
inability to use software breakpoints for debugging with caches
enabled.

This patch is only compile-time tested.

Commit 1137eaedaf6498f3448cdedf6f93076d9b3fd58a fixed the same issue
for arm920t. Among all the arm7_9_common targets only arm926ejs seems
to be broken in the same way.

Change-Id: I575306ac4319a69fc637b42f7c958f4595c5e81f
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1912
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agoquark_x10xx: add new target quark_x10xx 29/1829/4
Adrian Burns [Thu, 6 Feb 2014 17:11:15 +0000 (17:11 +0000)]
quark_x10xx: add new target quark_x10xx

Intel Quark X10xx SoC debug support added
Lakemont version 1 (LMT1) is the x86 core in Quark X10xx SoC
Generic x86 32-bit code is in x86_32_common.c/h

Change-Id: If2bf77275cd0277a82558cd9895b4c66155cf368
Signed-off-by: adrian.burns@intel.com
Reviewed-on: http://openocd.zylin.com/1829
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agodoc: update README.Windows with new Zadig download URL 40/1940/2
Pete Batard [Thu, 6 Feb 2014 19:47:46 +0000 (19:47 +0000)]
doc: update README.Windows with new Zadig download URL

As the old SF repository indicates, newer downloads have been moved to an
alternate server, and 3 new releases of Zadig have already occurred there.

Change-Id: I8ff967fd834e9c8dd2cce9dcbbe07e03d2b33e4a
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-on: http://openocd.zylin.com/1940
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
10 years agointerface/ftdi/xds100v2.cfg: default to reset state and ask user to release it later 84/1884/3
Paul Fertser [Sat, 18 Jan 2014 16:24:24 +0000 (20:24 +0400)]
interface/ftdi/xds100v2.cfg: default to reset state and ask user to release it later

This adapter is special and needs a reset sequence to be performed
before operation. Since there're no suitable hooks to do that, we have
no choice but to ask the user to manually add the necessary commands
to his or her config file.

Change-Id: I48fb4276e77529768266840221b68c3ae26801e1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1884
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agonor/flash/stm32f1x: add stm32f07x support 21/1921/6
Kuldeep Singh Dhaka [Mon, 3 Feb 2014 16:27:33 +0000 (21:57 +0530)]
nor/flash/stm32f1x: add stm32f07x support

Added configuration to work with stm32f07x.
Tested on stm32f072discovery with libopencm3 stm32f0 blink example.

Change-Id: I63cdc9bf1f28f5951d6b4faac871cfde331c9c78
Signed-off-by: Kuldeep Singh Dhaka <kuldeepdhaka9@gmail.com>
Reviewed-on: http://openocd.zylin.com/1921
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agocortex_a: do not try to use MMU for translation if it wasn't enabled on target stop 87/1787/3
Paul Fertser [Tue, 29 Oct 2013 09:45:07 +0000 (13:45 +0400)]
cortex_a: do not try to use MMU for translation if it wasn't enabled on target stop

On a target where AHB AP memory access is unavailable, care should be
taken to avoid treating addresses as virtual if the MMU was disabled
at the time the target was stopped.

Without this it's impossible to peek memory with Gdb when debugging
e.g. a bootloader because cortex_a8_read_memory() unconditionally
tried (and failed because of a sanity check in cortex_a8_mmu_modify)
to enable MMU.

Change-Id: Id7c63f4912920fb71a6104226ec6428d18c96a56
Reported-by: mbm@openwrt.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1787
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agogdb_server: Fix confusing warning when entering noack mode 95/1895/3
Anton Kolesov [Wed, 22 Jan 2014 16:18:56 +0000 (20:18 +0400)]
gdb_server: Fix confusing warning when entering noack mode

Comment in gdb_server code mistakenly attributed constant warnings
about unexpected acknowledgement to the ACK packet sent by GDB when
establishing connection. However that is not the case, OpenOCD
gdb_server is handling this packet correctly without an warnings. This
warning instead was caused by the ACK packet which GDB sends right after
going into noack mode. Because OpenOCD gdb_server is already in noack
mode at this state, it emits warning about it. This is a documented GDB
behaviour
(https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html)
so there is no reason to scare users with warnings in this case.

This patch basically introduces two-level noack mode: after receiving
QStartNoAckMode gdb_server will set noack_mode to 1, then it will
receive this last ACK packet, but instead of printing a warning,
noack_mode will be increased to 2. Should there be any other ACK packets
after that, they will be properly reported by warning. All other code
that relies on noack_mode checks it for "!= 0", so there will be no
difference if it is 1 or 2.

Change-Id: I0e9c57fd93293bfe010390db2f3f161528b11d86
Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
Reviewed-on: http://openocd.zylin.com/1895
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoflash: declare fixed arrays const 87/1887/2
Spencer Oliver [Mon, 20 Jan 2014 15:03:24 +0000 (15:03 +0000)]
flash: declare fixed arrays const

Change-Id: Id06b8b53ec59a7b3182f60f51dde5b16563aaeef
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1887
Tested-by: jenkins
10 years agoflash/nor/mdr.c: fix uninitialised variable warning 75/1875/3
Paul Fertser [Fri, 17 Jan 2014 10:06:51 +0000 (14:06 +0400)]
flash/nor/mdr.c: fix uninitialised variable warning

Caught (actually, it's breaking the build) by clang 3.3.

Change-Id: Ife6fabf8a57e6c90ab45aaaf75557c984ac6772c
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1875
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoflash/nor/stm32f1x: fix format specifiers warning 79/1879/2
Paul Fertser [Fri, 17 Jan 2014 11:17:14 +0000 (15:17 +0400)]
flash/nor/stm32f1x: fix format specifiers warning

Caught by clang on OS X. Reported by Steffanx on IRC.

Change-Id: Id77c7297c58e58c4e2aa8e5dafcb3a29a1f33f3d
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1879
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agotarget/nds32_disassembler: fix format specifiers warnings 78/1878/2
Paul Fertser [Fri, 17 Jan 2014 10:11:55 +0000 (14:11 +0400)]
target/nds32_disassembler: fix format specifiers warnings

According to the standard every operation returns at least an integer,
so PRIu8 format specifier is not suitable for these values as is.

This breaks build on OS X (x86_64-apple-darwin13.0.0) with "Apple LLVM
version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)".

Fix by adding appropriate casts. In fact there's plenty of room (and
I'd say necessity) for factoring out common code in there, but it's
too invasive for a non-maintainer.

Change-Id: I7d2182eb1d2f86fa22c882fbbaa6cfadf1c3e8fc
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1878
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Hsiangkai Wang <hsiangkai@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoserver/gdb_server: fix uninitialised variable warning 77/1877/2
Paul Fertser [Fri, 17 Jan 2014 10:10:57 +0000 (14:10 +0400)]
server/gdb_server: fix uninitialised variable warning

Caught (breaks build) with clang 3.3.

Change-Id: I5978fe34e82122f62e3d587bcdc45ad12f5e55ca
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1877
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agortos: fix uninitialised variable warning 76/1876/2
Paul Fertser [Fri, 17 Jan 2014 10:08:07 +0000 (14:08 +0400)]
rtos: fix uninitialised variable warning

Breaks build with clang 3.3. This "addr" variable is actually always
ignored by next_symbol() when cur_symbol is an empty string but clang
can't (and probably shouldn't) prove that automatically.

Change-Id: Id030f1aa34b9d40b5fa20a422031511520e52669
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1876
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agodoc: add missing reg command argument 'force' 97/1897/3
Spencer Oliver [Fri, 24 Jan 2014 12:43:41 +0000 (12:43 +0000)]
doc: add missing reg command argument 'force'

The argument 'force' enables a user to bypass the internal cache and read
a target register directly. However it is missing from the user guide.

Change-Id: I26f689eec20b38a0dc5294626b25df566b554446
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1897
Tested-by: jenkins
10 years agointerface/ftdi: add TUMPA Lite config 18/1918/2
Paul Fertser [Sun, 2 Feb 2014 09:04:41 +0000 (13:04 +0400)]
interface/ftdi: add TUMPA Lite config

TUMPA Lite is a cheap FT232H-based breakout board, without any
buffering. It also lacks series resistors so for some targets
(especially when not using ridiculously short wires) one needs to add
about 47 Ohms in series on every high-speed line.

The SRST line is connected directly to the FT232H too.

Real-life tested (including SRST and TRST).

Change-Id: I5ed4f88d8d20384e9c52efe2ff0c290e2650d43e
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1918
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agokinetis : improve kinetis flash driver. 94/1894/3
Nemui Trinomius [Wed, 22 Jan 2014 14:46:32 +0000 (23:46 +0900)]
kinetis : improve kinetis flash driver.

Kinetis K-series have different guranuarity for each frequency model.
This patch adding more minute guranuarity detection.
And adopted mass erase command not only L-series but also K-series.
Tested on MK20DX32VLF5,MK10DX32VLF5,and MKL25Z128VLK4.

Change-Id: Iffef850d4b388463756a13faf02c3890bfc19acf
Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
Reviewed-on: http://openocd.zylin.com/1894
Tested-by: jenkins
Reviewed-by: Per Ekman <pekenator@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Mateusz Kaduk <mateusz.kaduk@gmail.com>
10 years agodoc: update CMSIS-DAP info to match default driver behaviour 02/1902/2
Spencer Oliver [Mon, 27 Jan 2014 14:21:25 +0000 (14:21 +0000)]
doc: update CMSIS-DAP info to match default driver behaviour

By default the driver will now auto detect attached adapters, it does not
use an internal list any more. Update docs to match this.

Change-Id: I62a9d243cd236a8cf54cbd9d088c4837a8df31bf
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1902
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agocfg: LPC17xx default to using SYSRESETREQ to reset target 92/1892/2
Spencer Oliver [Wed, 22 Jan 2014 11:04:26 +0000 (11:04 +0000)]
cfg: LPC17xx default to using SYSRESETREQ to reset target

Originally the LPC17xx user guide (UM10360 Rev 2) stated that SYSRESETREQ
was not supported, so this was the default cortex_m reset mode.

Rev 3 of the same user guide states that it is now supported.
This has been verified on a LPC1768 mbed platform, previously I have not
tested this functionality.

Change-Id: I4858248903981a1c93ce75016e67c9e02702fcc5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1892
Tested-by: jenkins
Reviewed-by: Jörg Fischer <turboj@gmx.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agotop .gitignore: ignore .dirstamp files 98/1898/3
Antony Pavlov [Sat, 25 Jan 2014 07:07:53 +0000 (11:07 +0400)]
top .gitignore: ignore .dirstamp files

Just after succesfull build you can see some untracked files
in the 'git status' output:

src/jtag/drivers/versaloon/.dirstamp
src/jtag/drivers/versaloon/usbtoxxx/.dirstamp

This commit fixes the problem.

Change-Id: I1674eb4423e97c5f0a47f216981eaffdc351f784
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1898
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
10 years agoarm920t: fix write memory operations with caches enabled 17/1817/2
Paul Fertser [Tue, 26 Nov 2013 15:46:09 +0000 (19:46 +0400)]
arm920t: fix write memory operations with caches enabled

Commit ff5ec942d80a34e20b5a3ca3328f7e6a55fb309b made this target
always use generic arm7_9 memory write routines for software
breakpoints which resulted in inability to debug and single-step
sources in Gdb when icache is active as generic routine doesn't
invalidate it. This should fix it (and is real-life tested against
Samsung S3C2442). I expect other arm7-9 targets to be affected as
well.

Change-Id: Id7980e370ae4db47ac6b1490321d81ffe85711c0
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1817
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agoAdd GDB remote target description support for ARM4 10/1810/4
Luca BRUNO [Thu, 22 Aug 2013 14:41:38 +0000 (16:41 +0200)]
Add GDB remote target description support for ARM4

This commit adds support for passing the ARM4 target description to GDB
when enabling gdb_target_description, in order to expose all banked
registers.

Change-Id: Id618bc6226f00fe83397ea28888a84b64b09cafd
Signed-off-by: Luca BRUNO <lucab@debian.org>
Reviewed-on: http://openocd.zylin.com/1810
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoCMSIS-DAP: auto-detect CMSIS-DAP USB VID:PID 88/1888/2
Peter Lawrence [Tue, 21 Jan 2014 00:08:58 +0000 (17:08 -0700)]
CMSIS-DAP: auto-detect CMSIS-DAP USB VID:PID

The current OpenOCD implementation requires CMSIS-DAP adapter USB
VID:PID values to either be hard-coded in the source or manually
supplied by the user's configuration files.  The CMSIS-DAP
specification stipulates that all compliant adapters should have
"CMSIS-DAP" in the product string.  This should obviate the need
for hard-coding.

This patch was previously submitted as changes 1882, 1883, and 1886
but amendments failed to be registered by the server.  The
functionality was changed from 1886 in response to comments so that
user-supplied VID:PID values overrided the CMSIS-DAP auto-detect.

Change-Id: Ifb2dc217248359f448e0a42bd1527dd744c434b0
Signed-off-by: Peter Lawrence <majbthrd@gmail.com>
Reviewed-on: http://openocd.zylin.com/1888
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoflash: samd: declare const data 74/1874/2
Andrey Yurovsky [Wed, 15 Jan 2014 16:10:35 +0000 (08:10 -0800)]
flash: samd: declare const data

Make the chip information lookup tables const (thanks to Spencer Oliver for
pointing this out).  Also fix spacing on one macro.  No functional changes.

Change-Id: I053c4951c2626b8aa4541a79673b500394ef08e8
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1874
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agodoc: Add Gerrit to the Developer resources section 85/1885/2
Andreas Fritiofson [Sat, 18 Jan 2014 17:16:42 +0000 (18:16 +0100)]
doc: Add Gerrit to the Developer resources section

Change-Id: Icbf2050967cea06b05a09574a6a91ce1407a489f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1885
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoAdd CMSIS-DAP information to the READMEs. 80/1880/2
Paul Fertser [Fri, 17 Jan 2014 11:25:53 +0000 (15:25 +0400)]
Add CMSIS-DAP information to the READMEs.

Change-Id: I8c87d559adf07b0f0702fe9d388f26bf046bcb8b
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1880
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agogdb_server: check for invalid read memory requests 53/1853/3
Paul Fertser [Mon, 6 Jan 2014 17:36:21 +0000 (21:36 +0400)]
gdb_server: check for invalid read memory requests

This prevents invalid free(NULL) (that crashes OpenOCD on desktop
distros).

With radare2 it's now a bit more useful, memory access works if I seek
to the correct address, can't test further as it apparently lacks thumb2
support.

Change-Id: I6ec32d09fd52dab53ba765d7f7519baa1f55d973
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1853
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoRetire jtag_add_dr_out 01/1801/2
Andreas Fritiofson [Wed, 6 Nov 2013 23:40:50 +0000 (00:40 +0100)]
Retire jtag_add_dr_out

The out only version of jtag_add_dr_scan smells like a bogus optimization
that complicates the minidriver API for questionable gain.

The function was only used by four old ARM targets. Rewrite the callers
to use the generic function and remove all implementations.

Change-Id: I13b643687ee8ed6bc9b6336e7096c34f40ea96af
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1801
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agojtag/drivers: add USB-Blaster II 91/1791/8
Franck Jullien [Sun, 3 Nov 2013 16:31:44 +0000 (17:31 +0100)]
jtag/drivers: add USB-Blaster II

This patchs adds a new access driver for the existing
USB-Blaster interface driver.

This interface (as it is build-in on the sockit development
board) is composed of a Cypress EZ-USB plus a CPLD.

The Cypress chip as an embedded 8051 microcontroller.
When it's powered up, the firmware is downloaded to the
chip then the device is disconnected and reconnected with
the new firmware.

The USB-Blaster II protocol is almost identicial to
the old one. The only difference is that you need to
send a 0x5F before read TDO back. This command
seems to copy TDO buffer datas to the endpoint buffer.

Driver will be auto enabled if libusb-1.0 is detected.

Change-Id: I562a720a68cb4dcabeab791947d5d38776cb70fa
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1791
Tested-by: jenkins
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocfg: add Freescale FRDM-KL46Z Board 66/1866/2
Spencer Oliver [Sat, 11 Jan 2014 23:14:13 +0000 (23:14 +0000)]
cfg: add Freescale FRDM-KL46Z Board

Change-Id: Ib585728f13a380eeeb2ada095f3e1a1c2aaf44cb
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1866
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agotarget: fix typos 64/1864/2
Spencer Oliver [Sat, 11 Jan 2014 22:17:33 +0000 (22:17 +0000)]
target: fix typos

Change-Id: Icdb517224e8bcf41a16498088e09955048077d35
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1864
Tested-by: jenkins
Reviewed-by: Bill Traynor <btraynor@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agocortexm: use Cortex-M rather than cortex-m3 for dwt registers 65/1865/3
Spencer Oliver [Mon, 13 Jan 2014 09:53:32 +0000 (09:53 +0000)]
cortexm: use Cortex-M rather than cortex-m3 for dwt registers

Change-Id: I28e3a8c65ccc4a4e3ec94e41c846e6a263c165e8
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1865
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
10 years agoConform to C99 integer types format specifiers 94/1794/5
Hsiangkai Wang [Mon, 4 Nov 2013 04:43:12 +0000 (12:43 +0800)]
Conform to C99 integer types format specifiers

Review and modify to conform to C99 integer types format specifiers.
Use arm-none-eabi toolchain to build successfully.

Change-Id: If855072a8f88886809309155ac6d031dcfcbc4b2
Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com>
Signed-off-by: Hsiangkai <hsiangkai@gmail.com>
Reviewed-on: http://openocd.zylin.com/1794
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoGrammatical cleanup to Tcl Scripting chapter of User's Guide 72/1872/4
Robert P. J. Day [Mon, 13 Jan 2014 11:49:33 +0000 (06:49 -0500)]
Grammatical cleanup to Tcl Scripting chapter of User's Guide

Changes solely to the Tcl Scripting API chapter of the UG:

* Some grammatical cleanup
* Fix formatting issues (@example and @verbatim formatting)
* Add references to missing OSes OpenBSD, NetBSD and eCos.

Change-Id: I3ec1a192a0b1e0a207dceb76fd39008d01e287a5
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1872
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoAtmel samd: add support for SAMD21 73/1873/2
Andrey Yurovsky [Mon, 23 Dec 2013 18:27:28 +0000 (10:27 -0800)]
Atmel samd: add support for SAMD21

Tested with SAMD21J18A on the SAMD21 Xplained Pro board.

Change-Id: Ice9ebcd229ed038b3193baf92d910f9256d7ce91
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1873
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocortex_m: Avoid unnecessary saving and restoring of DCRDR 48/1848/3
Andreas Fritiofson [Sun, 29 Dec 2013 20:59:36 +0000 (21:59 +0100)]
cortex_m: Avoid unnecessary saving and restoring of DCRDR

This is used for the emulated DCC channel which is only maintained as long
as target->dbg_msg_enabled is set. Skip the saving and restoring if not
enabled to save one dap_run() per core register access.

Note that we could've probably queued all core register accesses in the
same transaction if the armv7 register framework hadn't required
synchronous register accesses.

Change-Id: I4fe6d713261ee5db42422203eb63035fdcc48891
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1848
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agoadi_v5: Remove unnecessary MEM-AP access functions 47/1847/2
Andreas Fritiofson [Sun, 29 Dec 2013 20:14:58 +0000 (21:14 +0100)]
adi_v5: Remove unnecessary MEM-AP access functions

It's far nicer to pass a size parameter than to split the calls to
separate wrappers which are combined to a single function anyway.

Change-Id: I716741ebf916f6f8e9358a31c8f4fe761107c82f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1847
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agocortex_m: Fix possible endianness problem in emulated DCC channel 46/1846/2
Andreas Fritiofson [Sun, 29 Dec 2013 20:12:30 +0000 (21:12 +0100)]
cortex_m: Fix possible endianness problem in emulated DCC channel

Change-Id: If7104464a8c65085f3ceac445e9c9be8446f2da9
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1846
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
10 years agotarget: Add test bench for memory access functions 29/1629/5
Andreas Fritiofson [Sun, 29 Dec 2013 14:22:39 +0000 (15:22 +0100)]
target: Add test bench for memory access functions

Change-Id: I86e6fe4d0b4d580389ae5e1d3f4813d1e25b2613
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1629
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)