Commit Graph

7186 Commits (0e95629eb1cca652447d9c30514319272af2f337)

Author SHA1 Message Date
Andreas Färber 951061c972 lpc8xx: Allow CHIPNAME override
Default to lpc8xx as before, but allow setting the actual CHIPNAME.

Change-Id: I5a48fa75c640440a0d4c3f2858653e94bed846d2
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3084
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-11-03 21:45:28 +00:00
Paul Fertser c1c4a6dd7f Change from sys/poll.h to standard poll.h location
According to "man 2 poll" the correct header to include is poll.h, not
sys/poll.h. Reported by a build against musl.

Change-Id: I5298b49dc947d1a368e423104c0c0c7b9bdd1a10
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2947
Tested-by: jenkins
2015-11-03 21:38:58 +00:00
Maxime Coquelin 26045588f4 tcl: add STM32F469 discovery board config
Change-Id: Iad7ee06330b3259ea0ce0d174dfdade6785913eb
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Reviewed-on: http://openocd.zylin.com/3043
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-11-03 21:38:02 +00:00
Maxime Coquelin 3e219648c8 flash/nor/stm32f2x: Add STM32F469 part
Change-Id: I4e13ceb0ba954dc2fea059ddeef10109be938c9c
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Reviewed-on: http://openocd.zylin.com/3042
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-11-03 21:37:54 +00:00
Matthias Welwarsky 7d7a43fd36 board: don't hardcode interface for ti_beaglebone
Board files should not select the interface. The BeagleBone Black is not
limited to just one JTAG interface.

Change-Id: I71ccc3dd9e2ca331a436701fab04e548b0abf829
Signed-off-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-on: http://openocd.zylin.com/3083
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-11-03 21:30:24 +00:00
Andrew Ruder afb083625c rtos: handle STKALIGN adjustments on cortex m
In the case that the STKALIGN bit is set on Cortex M processors, on
entry to an exception - the processor can store an additional 4 bytes
of padding before regular stacking to achieve 8-byte alignment on
exception entry.  In the case that this padding is present, the
processor will set bit (1 << 9) in the stacked xPSR register.  Use the
new calculate_process_stack callback to take into account the xPSR
register and use it on the standard Cortex_M3 stacking.

Note: Change #2301 had some misinformation regarding the padding.  On
Cortex-M the padding is stored BEFORE stacking so xPSR is always
available at a fixed offset.

Tested on a Cortex-M0+ (Atmel SAMR21) board which has STKALIGN fixed
to a '1' such that this alignment always occurs on non-aligned stacks.

Behavior of xPSR verified via the (bad-sorry) assembly program below by
setting a breakpoint on the SVC_Handler symbol.  The first time
SVC_Handler is triggered the stack was 0x20000ff8, the second time
SVC_Handler is triggered the stack was 0x20000ffc.  Note that in both
cases the interrupt handler gets 0x20000fd8 for a stack pointer.

GDB exerpt:

Breakpoint 1, 0x000040b6 in Reset_Handler ()
(gdb) hbreak SVC_Handler
Hardware assisted breakpoint 2 at 0x40f8
(gdb) cont
Continuing.

Breakpoint 2, 0x000040f8 in SVC_Handler ()
(gdb) print $msp
$3 = (void *) 0x20000fd8
(gdb) x/9w $msp
0x20000fd8:     0x1     0x2     0x3     0x4
0x20000fe8:     0x88160082      0xa53   0x40ce  0x21000000
0x20000ff8:     0x0
(gdb) cont
Continuing.

Breakpoint 2, 0x000040f8 in SVC_Handler ()
(gdb) print $msp
$4 = (void *) 0x20000fd8
(gdb) x/9w $msp
0x20000fd8:     0x1     0x2     0x3     0x4
0x20000fe8:     0x88160082      0xa53   0x40e8  0x21000200
0x20000ff8:     0x0

Assembly program:

	.cpu cortex-m0plus
	.fpu softvfp
	.thumb
	.syntax unified

.section .vectors
@ pvStack:
	.word	0x20001000
@ pfnReset_Handler:
	.word	Reset_Handler + 1
@ pfnNMI_Handler:
	.word	0
@ pfnHardFault_Handler:
	.word	0
@ pfnReservedM12:
	.word	0
@ pfnReservedM11:
	.word	0
@ pfnReservedM10:
	.word	0
@ pfnReservedM9:
	.word	0
@ pfnReservedM8:
	.word	0
@ pfnReservedM7:
	.word	0
@ pfnReservedM6:
	.word	0
@ pfnSVC_Handler:
	.word	SVC_Handler + 1

.section .text
.global Reset_Handler
Reset_Handler:
    cpsie i
    ldr r0, .stack_start
    ldr r2, .stack_last
    eors r1, r1
.loop_clear:
    str r1, [r0]
    adds r0, r0, #4
    cmp r0, r2
    bne .loop_clear
    subs r2, r2, #4
    mov sp, r2
    movs r0, #1
    movs r1, #2
    movs r2, #3
    movs r3, #4
    svc #0
    ldr r0, .stack_start
    ldr r2, .stack_last
    eors r1, r1
.loop_clear2:
    str r1, [r0]
    adds r0, r0, #4
    cmp r0, r2
    bne .loop_clear2
    mov sp, r2
    movs r0, #1
    movs r1, #2
    movs r2, #3
    movs r3, #4
    svc #0
.loop:
	b .loop
.align 4
.stack_start:
    .word 0x20000f00
.stack_last:
    .word 0x20000ffc

@ first call - 0x2000fff8 -- should already be aligned
@ second call - 0x2000fffc -- should hit the alignment code
.global SVC_Handler
SVC_Handler:
    bx lr

Change-Id: Id0940e6bbd6a59adee1378c0e86fe86830f0c8fc
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Cc: Paul Fertser <fercerpav@gmail.com>
Cc: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Cc: Evan Hunter <evanhunter920@gmail.com>
Cc: Jon Burgess <jburgess777@gmail.com>
Reviewed-on: http://openocd.zylin.com/3003
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 23:44:04 +00:00
Andrew Ruder 9413a7a814 rtos: turn stack alignment into a function pointer
Some targets (Cortex M) require more complicated calculations for
turning the stored stack pointer back into a process stack pointer.
For example, the Cortex M stores a bit in the auto-stacked xPSR
indicating that alignment had to be performed and an additional 4
byte padding is present before the exception stacking.  This change
only sets up the framework for Cortex-M unstacking and does not
add Cortex-M support.

Note: this also fixes the alignment calculation nearly addressed by
change #2301 entitled rtos/rtos.c: fix stack alignment calculation.
Updated calculation is in rtos_generic_stack_align.

Change-Id: I0f662cad0df81cbe5866219ad0fef980dcb3e44f
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Cc: Paul Fertser <fercerpav@gmail.com>
Cc: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Cc: Evan Hunter <evanhunter920@gmail.com>
Cc: Jon Burgess <jburgess777@gmail.com>
Reviewed-on: http://openocd.zylin.com/3002
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
2015-10-30 23:41:44 +00:00
Uwe Bonnes ddc3317c54 Add handling for STM32L4.
Option handling not yet implemented.
Change-Id: I5a11ef3221896cb02babe4e6e71073c43aa8740b
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2941
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-10-30 23:20:29 +00:00
Uwe Bonnes bb25049c39 stm32f2x: Add memory barrier needed for STM32F7 flashing.
Change-Id: I44fca55c46fc8f960ba46a0604692ce98909face
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2939
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-10-30 17:52:50 +00:00
Uwe Bonnes cde29ce99b stm32f2x.c: Add STM32F74x handling.
Change-Id: I2e7a8e9f855fc99a3f2535e2af6c0921329a5013
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2940
Tested-by: jenkins
Reviewed-by: Rémi PRUD'HOMME <prudhomme.remi@gmail.com>
Reviewed-by: Juha Niskanen <juha.niskanen@haltian.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-10-30 17:49:57 +00:00
Uwe Bonnes 6cfec28067 stm32f2x.c: Handle STM32F42x/43x 1 MiByte devices with DB1M option set.
Change-Id: Ic51d34a9abe9693fd21e9b3247523821b6fb1fe3
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2938
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-10-30 17:47:30 +00:00
Ivan De Cesaris ec1fde5797 quark: updating license to GPLv2+
Intel is relicensing our contributions to OpenOCD under GPL
version 2 or any later version. We previously contributed code
under GPL version 2 only. It was not our intention to differ
from the standard OpenOCD license. We're correcting that here.
This also applies retroactively to previous versions of our
contributions to OpenOCD.

Change-Id: I5e831ed95d03d2044d8e5a8375b21c6e52c933d7
Signed-off-by: Ivan De Cesaris <ivan.de.cesaris@intel.com>
Reviewed-on: http://openocd.zylin.com/3044
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-10-30 13:30:37 +00:00
Andreas Färber 94c82d16bd tcl/board: Add Diolan LPC4357-DB1 config
Adapted from diolan_lpc4350-db1.cfg. Both boards are identical except
for the SoC, so keep them in sync.

Change-Id: If892d8e953b0e3a9209a95b3b23a547357c10b7a
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3038
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 13:15:31 +00:00
Andreas Färber 2cbbe9abf5 tcl/target: Add LPC4357 config
Reuse the flashless LPC4350 as base and amend it as necessary.
The LPC43x7 have 2x 512 KB of flash.

Change-Id: Ia7ffbc7101023479971984b839f171ed4be6b089
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3037
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 13:14:12 +00:00
fenugrec 4124e5deb4 docs: added note for increasing gdb remotetimeout when using the "gdb_port pipe" command.
Change-Id: I9c9514a193fd65454890571a17373b9c64d84757
Signed-off-by: fenugrec <fenugrec@users.sourceforge.net>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/3040
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 13:12:54 +00:00
Andreas Färber 3084de185c doc: Fix sort order of flash drivers
fm3, nrf51, mdr, sim3x were at the end of the section rather than
inserted alphabetically. Fix this before adding further drivers.

Change-Id: Id23e04749cdd3b25d7503ec00fac554742d48c77
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3019
Tested-by: jenkins
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-10-30 13:07:50 +00:00
Andreas Färber 492a4ac226 tcl/board: Add Spansion SK-FM4-U120-9B560 config
Change-Id: I01464b2a999890d50b95d0fb98ff46d8a04a2c57
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3009
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 13:07:40 +00:00
Uwe Bonnes 0663cb5e47 Cortex-M: Detect Flash Patch Revision and implement Rev. 2 handling.
E.g. STM32F7 implements Rev.2.
Supercedes abandoned patch 2755 that doesn't evaluate Flash patch revision.

Change-Id: I48756b0451c7359475066969c900978a536bc328
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/2868
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-10-30 12:56:09 +00:00
Andreas Färber 11eff9baea fm4: Add JTAG support
Add support for the JTAG TAPID found on SK-FM4-U120-9B560-MEM V1.1.0 board.

Change-Id: Idbfe28927e0c549f0c89c29904d23971281927c9
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3039
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 12:52:50 +00:00
Andreas Färber 6b31338625 tcl/target: Prepare FM4 MB9BFxxx family
It is found on the SK-FM4-U120-9B560-MEM V1.1.0 among others.

Change-Id: I4c708c9391e954cbbc8d0860a2a2dbd264aea865
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3008
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 12:52:14 +00:00
Andreas Färber 2acf970ab9 fm4: Split out S6E2CC family config
Its memory layout is different from MB9BFxxx.

Change-Id: I39c9f9cf582cd182971a9f83bb88c7a18da6cf15
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3007
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 12:51:37 +00:00
Andreas Färber 569f459562 tcl/board: Add Arndale config
Tested with Olimex ARM-USB-OCD-H adapter.

Change-Id: I1bf68176f9c155f8803df5a10a7fbe03116c6309
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3081
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 12:43:07 +00:00
Andreas Färber 385dde8860 tcl/target: Add Exynos5250 config
Change-Id: Ia673d3f16b2238d5af8fbeff2d57c6cf27dcffb1
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3080
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-10-30 12:42:06 +00:00
Andreas Färber 71b23bb8ee tcl/board: Add config for XMOS xCORE-XA Core Module ARM debugging
The xCORE-XA Core Module board has an XS1-XAU8A-10 SoC with 8 xCORE cores
and one ARM core. This config is for the ARM Cortex-M3, via J-Link OB.

Tested with "J-Link OB-STM32F103 V1 compiled Feb  5 2014 13:48:52".

Change-Id: Id7fadf8f323b45d5cfc0cae1054bd7b916771d6a
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2763
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-30 12:40:40 +00:00
Andreas Färber 9af662f95d tcl/target: Add config for XMOS XS1-XAU8A-10's ARM core
The XS1-XAU8A-10 has 8 xCORE cores and one ARM core.
This config represents the ARM Cortex-M3 core, which is apparently
Silicon Labs EFM32 Giant Gecko IP.

Change-Id: I998360f096c759d2e274d96c1ca2e0450ba61146
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2762
Tested-by: jenkins
Reviewed-by: Oleksij Rempel
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-30 12:39:42 +00:00
Forest Crossman 677dbf1823 tcl/board: Add Digilent Analog Discovery config
Change-Id: Idf2cb8d8578e650fda4082f6bbf272518762ebf0
Signed-off-by: Forest Crossman <cyrozap@gmail.com>
Reviewed-on: http://openocd.zylin.com/2752
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2015-10-30 11:53:05 +00:00
Tim 'mithro' Ansell 3edb15784e tcl: Support for reading "Device DNA" from Spartan 6 devices.
Most Xilinx FPGA devices contain an embedded, unique device identifier
called the "Device DNA". The identifier is nonvolatile, permanently
programmed into the FPGA, and is unchangeable providing a great serial
/ tracking number.

Debugging was done in https://github.com/timvideos/HDMI2USB/issues/36

Change-Id: Iad03eafb40887f0321a4dc22858a7c3bf37a12b3
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
Reviewed-on: http://openocd.zylin.com/2960
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-21 09:11:48 +01:00
Tim 'mithro' Ansell 41daa32351 tcl: Adding the Numato Opsis board.
Another board supported by the ixo-usb-jtag project.

Change-Id: I676197c64e208886bc03d1bafcc964ef1fc2160b
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
Reviewed-on: http://openocd.zylin.com/2963
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-21 09:11:13 +01:00
Tim 'mithro' Ansell 9168eef15d tcl: Adding the Digilent Atlys board.
The board is supported via the ixo-usb-jtag firmware.

Change-Id: I1e8a5ead850c0843b8532a5b54a7e7117778278e
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
Reviewed-on: http://openocd.zylin.com/2962
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-21 09:11:09 +01:00
Tim 'mithro' Ansell 561cd67cff tcl: Setting lowlevel driver for ixo-usb-jtag
Also add further documentation about the project and how to use it.

Change-Id: Ia9878de566b3c8c1ea29f129287d5aea904d861d
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
Reviewed-on: http://openocd.zylin.com/2961
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-21 09:10:56 +01:00
Peter A. Bigot d52070c855 nrf51: recognize hwid 0084
Chip markings: N51822 / QFACA1 / 1513AN

Change-Id: Idb7fc723850ea08b60b9f5c97a53f1ae8dfc8eb2
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Reviewed-on: http://openocd.zylin.com/2936
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-10-09 13:45:07 +01:00
Tomas Vanek 8674d3f64a Kinetis: new devices K02, K26, K63, K64, K66, correct K21 and K22 variants
K22FN1M0 and K22FX512 has FTFE flash and old style SDID.
K22FN128, 256 and 512 has FTFA flash and new style SDID

K63 and K64 detects as K61 and K62, see Errata 1N83J e7534

Change-Id: I2aca6f1f18819bb2b2ec4982036510de444ad2ac
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/2867
Tested-by: jenkins
Reviewed-by: Thomas Schmid <thomas@rfranging.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Patrick Stewart <patstew@gmail.com>
2015-10-09 13:44:39 +01:00
Tomas Vanek 087ce864f4 Kinetis: give a reasonable default for max_flash_prog_size
max_flash_prog_size euals to pflash_sector_size_bytes for most of devices.
There is no point setting max_flash_prog_size for devices without
FS_PROGRAM_SECTOR capability.
Check for zero sector_size to avoid div by zero exception in case of
device has FlexNVM but the driver does not define nvm_sector_size_bytes

Change-Id: Iaf4e007fb1ec3d24c373350410e4bebe504a4c3e
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/2958
Tested-by: jenkins
Reviewed-by: Thomas Schmid <thomas@rfranging.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Patrick Stewart <patstew@gmail.com>
2015-10-09 13:44:05 +01:00
Patrick Stewart 37e2fdcc95 Kinetis: Add K24 support and tidy up
The K24 uses the KL-style SDID register and has some flashing quirks, so the kinetis driver does not support it properly.
Extend the chip detection routine to support the new SDID format. Add a parameter for the maximum flash size, as the K24 only supports 1k flashing blocks but has 4k sector size. Remove global 'granularity' array, as it's only really needed in one function. Replace 'klxx' with an enum showing which flash commands are actually supported on a given chip.

Signed-off-by: Patrick Stewart <patstew@gmail.com>
Change-Id: Ie244fab564d58c5cfe4fa36a025f0b2674ffad69
Reviewed-on: http://openocd.zylin.com/2864
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-10-09 13:43:23 +01:00
Alex Forencich 48787e19ef flash/nor/spi: Add Winbond w25q128fv
Change-Id: I2e13c02361982468f41f218421ece9046bcc9a5f
Signed-off-by: Alex Forencich <alex@alexforencich.com>
Reviewed-on: http://openocd.zylin.com/2951
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:48:55 +01:00
Evan Hunter 9189ff52fc ADIv5: Fix typo in log message
Change-Id: I9c5e648566b1dd43cb55fd5e30edf8d5f0d189a6
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/2892
Tested-by: jenkins
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:48:19 +01:00
Jim Paris 4cb193823f stlink_usb: fix typo
Change-Id: I3cf5ced568319878b8bf40743e4c07718f630c68
Signed-off-by: Jim Paris <jim@jtan.com>
Reviewed-on: http://openocd.zylin.com/2953
Tested-by: jenkins
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:47:27 +01:00
Marc Schink b01b5fe13a armv7m: Fix memory leak in register caching.
Change-Id: I184042d277a52f3940d6d6c13f3d94afc557933d
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
[andreas.fritiofson@gmail.com: don't check pointers before free()]
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2881
Tested-by: jenkins
2015-09-30 22:13:50 +01:00
Nemui Trinomius 33e406824c numicro: Integrate Nuvoton NuMicro flash driver.
Flash driver "mini51.c" and "nuc1x.c" are same target MCU.
This patch integrates each driver and functions,
and makes into new "NuMicro" flash driver.

Change-Id: Ifff5c1cfdd265acca0f489631695be9194fa144c
Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
Reviewed-on: http://openocd.zylin.com/2794
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:12:39 +01:00
Ivan Buliev 03f46e3688 flash: Analog Devices ADuCM360 support
A target config and a simple flash driver for the ADuCM360 microcontroller.
The EEPROM of the chip may be erased and programmed.

Change-Id: Ic2bc2f91ec5b6f72e3976dbe18071f461fe503b8
Signed-off-by: Ivan Buliev <i.buliev@mikrosistemi.com>
Reviewed-on: http://openocd.zylin.com/2787
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: jenkins
2015-09-30 22:12:16 +01:00
Andreas Färber 288a1f453d tcl/board: Add Parallella-I board config
Tested with Porcupine-1 JTAG adapter board and Digilent JTAG-HS3 interface;
reset does not yet work, pending nSRST configuration of the interface used.

Change-Id: I0d0679e098d93ffbd1539004cdb900e2a8ae4a25
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2730
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:10:55 +01:00
Andreas Färber e291e8012c zynq_7000: Add expected ID
As found on the Parallella-I board SKU A101020.

Change-Id: Ie7e7a36325926d67fbe555b46a9be8a74fac8dba
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2729
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:10:42 +01:00
Andreas Färber 8e5eaac529 tcl/interface/ftdi: Add Digilent JTAG-HS3 config
Derived from tcl/interface/digilent-hs1.cfg.

JTAG-HS3 has an open drain buffer on pin 14 for SRST to work with
PS_SRST_B on Xilinx Zynq SoC.

Change-Id: I1e9e72d0511528a61207e318aff937ae9fad5bf9
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2728
Tested-by: jenkins
Reviewed-by: Robert Jordens <jordens@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-09-30 22:10:36 +01:00
Paul Fertser 874f0157eb svf: fix segfaults exposed by some SVF
The problem was reported by jstefanop on IRC, the SVF was generated with
Xilinx ISE 14.7.

Found and investigated with Valgrind's vgdb service.

Change-Id: I32b0e77e0380ce4a391661f97449f9c2a5f83625
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2933
Tested-by: jenkins
2015-09-30 22:01:47 +01:00
Philipp Wagner 4b0477abc1 tcl_server: Support line buffers up to 4M (v3)
Currently, the maximum size of a command sent to the TCL server is
4k. This patch increases this limit up to 4M.

Reasoning:
To get high-speed JTAG data transfers, I'm using a very long shift
register. This reduces the overhead of the state changes, as well as the
latency due to the common USB adapter transfers considerably. In order
to submit those long DRSCAN commands to OpenOCD over the TCL/TCL
interface, long TCL command lines are required. This is enabled by this
patch.

v3:
Address review comments. Drop line instead of connection when realloc()
fails.

Changes in v2 of this patch:
The line buffer is allocated dynamically to avoid an OpenOCD memory
overhead if the large buffers are not used. The buffer starts at 4K and
increases exponentially up to 1M, and then linearly in 1M increments up
to 4M.

Change-Id: Iecaef6a56ed5e18e9de4d912a514031ea78fa3bd
Signed-off-by: Philipp Wagner <philipp.wagner@tum.de>
Reviewed-on: http://openocd.zylin.com/2837
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-09-30 22:01:00 +01:00
Austin Morton 8bffcc0cd4 server: remove connection limit from tcl and telnet servers
Add constant CONNECTION_LIMIT_UNLIMITED which indicates a service
has no connection limit

Change-Id: I008d31264010c25fa44ca74eb6d5740eca38bee1
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Reviewed-on: http://openocd.zylin.com/2937
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-09-28 08:01:02 +01:00
Austin Morton d28ab08cfa server: tcl_trace command
Implements async target trace output to the tcl server

Change-Id: I0178f6404447337d523782a1d2c317457030da40
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Reviewed-on: http://openocd.zylin.com/2588
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-09-05 09:19:26 +01:00
Alamy Liu 85903156d7 flash/nor/jtagspi: 'retval' may be used uninitialized
Problem
As my compiler has "warnings being treated as errors" on, it shows the
error message:
  error: 'retval' may be used uninitialized in this function

Investigation
Nothing wrong with the logic, 'retval' would have a value before returning.
Just wanna get rid of the compiling "warning as error" message.

Solution
Provide a reasonable default value

Change-Id: I712c15f82819c6c48bee9dceca8de4b18aeb29b0
Signed-off-by: Alamy Liu <alamy.liu@gmail.com>
Reviewed-on: http://openocd.zylin.com/2905
Tested-by: jenkins
Reviewed-by: Robert Jordens <jordens@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-08-19 21:35:10 +01:00
Paul Fertser 2dcf7bf77d svf: flush the queue before reallocing memory
During reallocation a new memory region might be allocated and the old
one freed. If jtag queue is holding a pointer to the old memory, it will
segfault during the execution. Avoid this by flushing the queue before a
reallocation attempt is made.

This should fix ticket #102.

Change-Id: I737fc3f1ebf6d76413a475beb8bf20184fe0233f
Reported-by: Alex Forencich <aforencich@users.sf.net>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2899
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-08-06 13:17:15 +01:00
Evan Hunter a769be6b9c flash : Add support for Atmel at91sam4sa16b
Change-Id: Ief6833b4bf587fbf53c8fbeee2fc276a95ca0a8a
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/2878
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-08-06 13:16:33 +01:00