]> git.sur5r.net Git - openocd/log
openocd
9 years agoKinetis: properly pad flash section writes
Tomas Vanek [Fri, 2 Oct 2015 12:31:30 +0000 (14:31 +0200)]
Kinetis: properly pad flash section writes

kinetis_write() with byte count not divisible by prog_section_chunk_bytes
computed wrong wc and therefore paded section chunk by some
random data instead of 0xff

Change-Id: Ic7c66d8a3ceacda9e611e98b9fbf943b8001774b
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/2994
Tested-by: jenkins
Reviewed-by: Thomas Schmid <thomas@rfranging.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoKinetis: Disable watchdog on Kx devices when programming.
Thomas Schmid [Wed, 30 Sep 2015 15:40:10 +0000 (09:40 -0600)]
Kinetis: Disable watchdog on Kx devices when programming.

Kx devices with FTFA flash need the watchdog disabled when programming.
I tried to keep overhead as small as possible and re-use registers that
were already inquired (e.g. sim_sdid).

Change-Id: Ibc29a26ec34102d78a6c3920dd16f63e134a8f6f
Signed-off-by: Thomas Schmid <thomas@rfranging.com>
Reviewed-on: http://openocd.zylin.com/2986
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoRevert "board: don't hardcode interface for ti_beaglebone"
Matthias Welwarsky [Wed, 4 Nov 2015 09:38:18 +0000 (09:38 +0000)]
Revert "board: don't hardcode interface for ti_beaglebone"

This reverts commit 7d7a43fd36a61e55e087a474fe41e3dae6375453.

The change concerns the "Black" variant of the TI BeagleBone, while the
configuration file is for the original BeagleBone board, which actually
embeds a debug interface on the PCB.

Change-Id: I2232af210deb698f8b3c0a547f26cd0a0a8f89d0
Signed-off-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-on: http://openocd.zylin.com/3094
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
9 years agohelper/options: Use OPENOCD_SCRIPTS dir if set.
Jonathan Larmour [Tue, 6 Oct 2015 20:47:35 +0000 (21:47 +0100)]
helper/options: Use OPENOCD_SCRIPTS dir if set.

This makes it easier to relocate the install tree of OpenOCD from where
it was originally built (for example, if put onto a different machine),
without having to change scripts or add something to the command line
every time.

Change-Id: Ia5edf0eba166f7a999f267bd6a92402dab9b399e
Signed-off-by: Jonathan Larmour <jifl@eCosCentric.com>
Reviewed-on: http://openocd.zylin.com/3004
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/target|board: add config Atheros ar2315
Oleksij Rempel [Tue, 30 Jun 2015 18:36:16 +0000 (20:36 +0200)]
tcl/target|board: add config Atheros ar2315

Add configs for Atheros ar2313 MIPS based WiSoC and
board based on this chip: La Fonera FON2200

Change-Id: Ibfdbfc9c2beca6cf436c9ee5e493b08bfb55ac85
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/2839
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/target|board: add config Atheros ar2313
Oleksij Rempel [Wed, 17 Jun 2015 18:57:34 +0000 (20:57 +0200)]
tcl/target|board: add config Atheros ar2313

Add configs for Atheros ar2313 MIPS based WiSoC and
board based on this chip: Netgear WP102

Change-Id: Id93957b5d5851a272f15be35f9f448a9ce6d8a08
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/2835
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agohelper/options: Cleanup #includes.
Marc Schink [Sat, 3 Oct 2015 11:32:52 +0000 (13:32 +0200)]
helper/options: Cleanup #includes.

Change-Id: I1c05cf6bb68049176cdd1b3bcff4dcb8b9ae963e
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2995
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agohelper/log: Cleanup #includes.
Marc Schink [Sat, 3 Oct 2015 11:48:47 +0000 (13:48 +0200)]
helper/log: Cleanup #includes.

Change-Id: Ie343524dd843d518086a86866391b5a34556082b
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2996
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agohelper/ioutil: Rename MixedCaps function.
Marc Schink [Mon, 21 Sep 2015 12:28:18 +0000 (14:28 +0200)]
helper/ioutil: Rename MixedCaps function.

Change-Id: I10075d4d5f45a7105d5a007631510236dbb9b08b
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2957
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agohelper/fileio: Fix memory leak.
Marc Schink [Fri, 2 Oct 2015 15:12:17 +0000 (17:12 +0200)]
helper/fileio: Fix memory leak.

The memory leak occurs when opening a file fails. It can be
reproduced by using the "flash verify_bank" command with a filename
that does not exist.

Change-Id: I60b7b545c18793d750ff75d08124fde3f0aa6f64
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2998
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agohelper/fileio: Use size_t for file size.
Marc Schink [Fri, 2 Oct 2015 15:35:15 +0000 (17:35 +0200)]
helper/fileio: Use size_t for file size.

Change-Id: Ie116b44ba15e8ae41ca9ed4a354a82b2c4a92233
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2997
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotarget: tell which target state is meant
Oleksij Rempel [Wed, 1 Apr 2015 12:44:41 +0000 (14:44 +0200)]
target: tell which target state is meant

If we work on smp system, the output of step command will depend
on Id of default target.
This patch adds additional information to help find what on which
core is happening.

Example of LOG after this patch.
imx6.cpu.1: target state: halted
^^^^^^^^^^
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0x80076c0c
MMU: enabled, D-Cache: enabled, I-Cache: enabled
imx6.cpu.0: target state: halted
^^^^^^^^^^
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x20000193 pc: 0x802ccb6c
MMU: enabled, D-Cache: enabled, I-Cache: enabled

Change-Id: I536a2cce33b5ab10af9de2a43b9960320c17729f
Signed-off-by: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
Reviewed-on: http://openocd.zylin.com/2691
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agocortex_m: dwt_num_comp should be set to zero in cortex_m_dwt_free()
Tomas Vanek [Thu, 1 Oct 2015 17:17:41 +0000 (19:17 +0200)]
cortex_m: dwt_num_comp should be set to zero in cortex_m_dwt_free()

A segmentation fault in cortex_m_endreset_event() is sometimes raised
with very broken target like Kinetis Kx with erased flash and active WDOG.
Debugging revealed that cortex_m->dwt_num_comp is 4 and
dwt_list is NULL at cortex_m:290

Change-Id: I229c59d6da13d816df513d1dbb19968e4b5951e2
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/2989
Reviewed-by: Thomas Schmid <thomas@rfranging.com>
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agolpc4350_spifi_generic: Clean up work area size
Andreas Färber [Sat, 31 Oct 2015 16:23:21 +0000 (17:23 +0100)]
lpc4350_spifi_generic: Clean up work area size

Since 2cbbe9a it was actually decreasing the configured work area size.

We could now do "set WORKAREASIZE 0x2000" before sourcing lpc4350.cfg,
but there seems no point in doing so. Simply drop the configuration here.

Change-Id: I25b9dbbc007ba652b66099832198b7c329929858
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3086
Tested-by: jenkins
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agortos/mqx: Fix uninitialized parts of symbol table
daniel-k [Wed, 14 Oct 2015 15:30:57 +0000 (17:30 +0200)]
rtos/mqx: Fix uninitialized parts of symbol table

Memory for the symbol table was allocated by malloc but not initialized other
than with the symbol name. Therefore `address` and `optional` members were
having arbitrary values leading to every symbol being optional most of the
time which messes up RTOS auto-detection. Memory will now be zero-initialized
as in other RTOS implementations.

Change-Id: I6c6e31ec1ef7e043061adf8c695b2139620e005d
Signed-off-by: Daniel Krebs <github@daniel-krebs.net>
Reviewed-on: http://openocd.zylin.com/3017
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
9 years agolpc8xx: Allow CHIPNAME override
Andreas Färber [Sat, 31 Oct 2015 14:15:58 +0000 (15:15 +0100)]
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>
9 years agoChange from sys/poll.h to standard poll.h location
Paul Fertser [Sat, 29 Aug 2015 11:47:59 +0000 (14:47 +0300)]
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
9 years agotcl: add STM32F469 discovery board config
Maxime Coquelin [Fri, 23 Oct 2015 22:13:38 +0000 (00:13 +0200)]
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>
9 years agoflash/nor/stm32f2x: Add STM32F469 part
Maxime Coquelin [Fri, 23 Oct 2015 22:03:54 +0000 (00:03 +0200)]
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>
9 years agoboard: don't hardcode interface for ti_beaglebone
Matthias Welwarsky [Sat, 31 Oct 2015 15:17:18 +0000 (16:17 +0100)]
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>
9 years agortos: handle STKALIGN adjustments on cortex m
Andrew Ruder [Mon, 5 Oct 2015 18:52:43 +0000 (13:52 -0500)]
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>
9 years agortos: turn stack alignment into a function pointer
Andrew Ruder [Mon, 5 Oct 2015 18:51:10 +0000 (13:51 -0500)]
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
9 years agoAdd handling for STM32L4.
Uwe Bonnes [Sat, 22 Aug 2015 16:36:52 +0000 (18:36 +0200)]
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>
9 years agostm32f2x: Add memory barrier needed for STM32F7 flashing.
Uwe Bonnes [Mon, 17 Aug 2015 13:17:32 +0000 (15:17 +0200)]
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>
9 years agostm32f2x.c: Add STM32F74x handling.
Uwe Bonnes [Mon, 17 Aug 2015 15:10:47 +0000 (17:10 +0200)]
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>
9 years agostm32f2x.c: Handle STM32F42x/43x 1 MiByte devices with DB1M option set.
Uwe Bonnes [Mon, 17 Aug 2015 14:36:19 +0000 (16:36 +0200)]
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>
9 years agoquark: updating license to GPLv2+
Ivan De Cesaris [Mon, 26 Oct 2015 15:50:34 +0000 (16:50 +0100)]
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>
9 years agotcl/board: Add Diolan LPC4357-DB1 config
Andreas Färber [Mon, 19 Oct 2015 22:37:42 +0000 (00:37 +0200)]
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>
9 years agotcl/target: Add LPC4357 config
Andreas Färber [Mon, 19 Oct 2015 22:22:50 +0000 (00:22 +0200)]
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>
9 years agodocs: added note for increasing gdb remotetimeout when using the "gdb_port pipe"...
fenugrec [Thu, 22 Oct 2015 20:13:52 +0000 (16:13 -0400)]
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>
9 years agodoc: Fix sort order of flash drivers
Andreas Färber [Fri, 16 Oct 2015 02:43:23 +0000 (04:43 +0200)]
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>
9 years agotcl/board: Add Spansion SK-FM4-U120-9B560 config
Andreas Färber [Sun, 11 Oct 2015 01:01:49 +0000 (03:01 +0200)]
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>
9 years agoCortex-M: Detect Flash Patch Revision and implement Rev. 2 handling.
Uwe Bonnes [Wed, 15 Jul 2015 10:53:40 +0000 (12:53 +0200)]
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>
9 years agofm4: Add JTAG support
Andreas Färber [Tue, 20 Oct 2015 00:28:12 +0000 (02:28 +0200)]
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>
9 years agotcl/target: Prepare FM4 MB9BFxxx family
Andreas Färber [Sun, 11 Oct 2015 00:49:45 +0000 (02:49 +0200)]
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>
9 years agofm4: Split out S6E2CC family config
Andreas Färber [Sun, 11 Oct 2015 00:06:00 +0000 (02:06 +0200)]
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>
9 years agotcl/board: Add Arndale config
Andreas Färber [Thu, 29 Oct 2015 17:45:00 +0000 (18:45 +0100)]
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>
9 years agotcl/target: Add Exynos5250 config
Andreas Färber [Thu, 29 Oct 2015 17:41:44 +0000 (18:41 +0100)]
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>
9 years agotcl/board: Add config for XMOS xCORE-XA Core Module ARM debugging
Andreas Färber [Sun, 10 May 2015 12:53:33 +0000 (14:53 +0200)]
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>
9 years agotcl/target: Add config for XMOS XS1-XAU8A-10's ARM core
Andreas Färber [Sun, 10 May 2015 12:45:32 +0000 (14:45 +0200)]
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>
9 years agotcl/board: Add Digilent Analog Discovery config
Forest Crossman [Wed, 29 Apr 2015 07:29:10 +0000 (03:29 -0400)]
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>
9 years agotcl: Support for reading "Device DNA" from Spartan 6 devices.
Tim 'mithro' Ansell [Sun, 27 Sep 2015 10:09:38 +0000 (20:09 +1000)]
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>
9 years agotcl: Adding the Numato Opsis board.
Tim 'mithro' Ansell [Sun, 27 Sep 2015 10:57:25 +0000 (20:57 +1000)]
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>
9 years agotcl: Adding the Digilent Atlys board.
Tim 'mithro' Ansell [Sun, 27 Sep 2015 10:54:07 +0000 (20:54 +1000)]
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>
9 years agotcl: Setting lowlevel driver for ixo-usb-jtag
Tim 'mithro' Ansell [Sun, 27 Sep 2015 10:33:59 +0000 (20:33 +1000)]
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>
9 years agonrf51: recognize hwid 0084
Peter A. Bigot [Thu, 13 Aug 2015 14:20:25 +0000 (09:20 -0500)]
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>
9 years agoKinetis: new devices K02, K26, K63, K64, K66, correct K21 and K22 variants
Tomas Vanek [Tue, 14 Jul 2015 20:10:55 +0000 (22:10 +0200)]
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>
9 years agoKinetis: give a reasonable default for max_flash_prog_size
Tomas Vanek [Thu, 24 Sep 2015 08:29:12 +0000 (10:29 +0200)]
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>
9 years agoKinetis: Add K24 support and tidy up
Patrick Stewart [Fri, 10 Jul 2015 13:01:35 +0000 (14:01 +0100)]
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>
9 years agoflash/nor/spi: Add Winbond w25q128fv
Alex Forencich [Thu, 3 Sep 2015 05:55:12 +0000 (22:55 -0700)]
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>
9 years agoADIv5: Fix typo in log message
Evan Hunter [Wed, 29 Jul 2015 12:29:41 +0000 (13:29 +0100)]
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>
9 years agostlink_usb: fix typo
Jim Paris [Fri, 11 Sep 2015 17:00:54 +0000 (13:00 -0400)]
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>
9 years agoarmv7m: Fix memory leak in register caching.
Marc Schink [Tue, 30 Jun 2015 07:40:28 +0000 (09:40 +0200)]
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
9 years agonumicro: Integrate Nuvoton NuMicro flash driver.
Nemui Trinomius [Wed, 3 Jun 2015 15:27:56 +0000 (00:27 +0900)]
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>
9 years agoflash: Analog Devices ADuCM360 support
Ivan Buliev [Sat, 30 May 2015 12:26:28 +0000 (15:26 +0300)]
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
9 years agotcl/board: Add Parallella-I board config
Andreas Färber [Thu, 23 Apr 2015 12:06:46 +0000 (14:06 +0200)]
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>
9 years agozynq_7000: Add expected ID
Andreas Färber [Thu, 23 Apr 2015 10:33:42 +0000 (12:33 +0200)]
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>
9 years agotcl/interface/ftdi: Add Digilent JTAG-HS3 config
Andreas Färber [Thu, 23 Apr 2015 10:30:39 +0000 (12:30 +0200)]
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>
9 years agosvf: fix segfaults exposed by some SVF
Paul Fertser [Tue, 11 Aug 2015 22:03:02 +0000 (01:03 +0300)]
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
9 years agotcl_server: Support line buffers up to 4M (v3)
Philipp Wagner [Tue, 23 Jun 2015 14:49:22 +0000 (16:49 +0200)]
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>
9 years agoserver: remove connection limit from tcl and telnet servers
Austin Morton [Thu, 13 Aug 2015 18:45:29 +0000 (14:45 -0400)]
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>
9 years agoserver: tcl_trace command
Austin Morton [Mon, 9 Mar 2015 09:34:52 +0000 (05:34 -0400)]
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>
9 years agoflash/nor/jtagspi: 'retval' may be used uninitialized
Alamy Liu [Thu, 6 Aug 2015 21:45:19 +0000 (14:45 -0700)]
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>
9 years agosvf: flush the queue before reallocing memory
Paul Fertser [Thu, 30 Jul 2015 08:55:43 +0000 (11:55 +0300)]
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>
9 years agoflash : Add support for Atmel at91sam4sa16b
Evan Hunter [Fri, 17 Jul 2015 12:22:06 +0000 (13:22 +0100)]
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>
9 years agogdb_server: Add check for malloc fail
Evan Hunter [Thu, 16 Jul 2015 16:44:17 +0000 (17:44 +0100)]
gdb_server: Add check for malloc fail

Change-Id: I623b30883042eae3253ed29de5c426da760dffa0
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/2871
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agobcm2835gpio: Add SWD support, Raspberry Pi 2 support.
Christoph Pittracher [Thu, 4 Jun 2015 07:25:10 +0000 (09:25 +0200)]
bcm2835gpio: Add SWD support, Raspberry Pi 2 support.

Added support for SWD transport similar to sysfsgpio driver.
Added configurable peripheral base address to support Raspberry Pi 2.

Change-Id: If76d45fbe74ce49f1f22af72e5f246e973237e04
Signed-off-by: Christoph Pittracher <pitt@segfault.info>
Reviewed-on: http://openocd.zylin.com/2802
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoat91samd: add chip IDs for SAMC20 and SAMC21 families
Andrey Yurovsky [Wed, 10 Jun 2015 16:53:27 +0000 (09:53 -0700)]
at91samd: add chip IDs for SAMC20 and SAMC21 families

Add the chip IDs corresponding to the new 5V "SAMC" parts which are
otherwise identical to the SAMD and should work with this driver.  Also
add the configurations for their Xplained Pro boards.

Change-Id: Ic268d4ac384a3a77d4211a94da9f9faf4d8c0f7b
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/2809
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agosim3x: fix build failure with clang 3.6
Paul Fertser [Fri, 26 Jun 2015 06:54:07 +0000 (09:54 +0300)]
sim3x: fix build failure with clang 3.6

This fixes a warning as reported by the current clang version:
../../../../src/flash/nor/sim3x.c:867:20: error: address of array
'sim3x_info->device_package' will always evaluate to 'true' .

Change-Id: Ie160cbe6df8f491e9beff38d47e2f13575529bf9
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2838
Tested-by: jenkins
Reviewed-by: Oleksij Rempel
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agokc705: digilent-jtag/kintex7/jtagspi board
Robert Jordens [Fri, 3 Jul 2015 05:38:53 +0000 (23:38 -0600)]
kc705: digilent-jtag/kintex7/jtagspi board

Xilinx Kintex7 Development board with integrated Digilent JTAG-SMT1
(a.k.a. HS1) interface and a 128 MBit SPI flash.

Change-Id: I9daba0a2fb2c17e04bcb37bd41872ebde25e0d2f
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2861
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agopipistrello: ftdi-jtag/spartan6/jtagspi board
Robert Jordens [Thu, 2 Jul 2015 05:29:34 +0000 (23:29 -0600)]
pipistrello: ftdi-jtag/spartan6/jtagspi board

The Pipistrello is a low cost FPGA board with a Xilinx
Spartan6 LX45, a SPI flash and onboard FTDI JTAG.
This board is a good example use case for the jtagspi
flash driver talking through a proxy bitstream.

Change-Id: I04a80610ff825c36ebcb67b879507028eed141ad
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2846
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash/nor/jtagspi: add JTAGSPI driver
Robert Jordens [Wed, 1 Jul 2015 09:18:46 +0000 (03:18 -0600)]
flash/nor/jtagspi: add JTAGSPI driver

Many FPGA board speak JTAG and have a SPI flash for their bitstream
attached to them. The SPI flash is programmed by first uploading a
proxy bitstream to the FPGA that connects the JTAG interface to the
SPI interface if the IR contains a certain USER instruction. Then the
SPI flash can be erase, written, read directly through the JTAG DR.

The JTAG and SPI signaling is compatible. Such a proxy bitstream only
needs to connect TDO-MISO, TDI-MOSI, TCK-CLK, and the activate the
chip select when the IR contains the special instruction and the JTAG
state machine is in the DR-SHIFT state.

Change-Id: Ibc21d793a83b36fa37e2704966aa5c837c4dd0d2
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2844
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash/nor/tcl: add read_bank and verify_bank
Robert Jordens [Wed, 1 Jul 2015 08:55:49 +0000 (02:55 -0600)]
flash/nor/tcl: add read_bank and verify_bank

The only read access to flash chips so is through the target's
memory. Flashes like jtagspi do not expose a memory mapped interface
to the flash. These commands use the flash_driver_read() driver API
directly.

Change-Id: I40b910de650114a3f676507f9f059a234377d862
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2842
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agocpld/virtex2: allow JSTART to be disabled
Robert Jordens [Fri, 3 Jul 2015 05:15:53 +0000 (23:15 -0600)]
cpld/virtex2: allow JSTART to be disabled

This adds an option to disable the use of the JSTART instruction
when loading bitstreams to xilinx fpgas. JSTART apparently prevents
configuration if the startup clock is not set to the jtag clock in
the bitstream.

xc3sprog is omitting JSTART for all devices. Problems with loading a bitstream
that does not have StartupClk:JTAGClk are described here:
http://www.xilinx.com/support/answers/56151.html

Change-Id: I8137c0bae05a8c3c6f8e2611869f70a770d1651d
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2860
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoflash/nor/spi: add micron/numonyx n25q128
Robert Jordens [Wed, 1 Jul 2015 02:53:11 +0000 (20:53 -0600)]
flash/nor/spi: add micron/numonyx n25q128

http://www.micron.com/products/nor-flash/serial-nor-flash
https://www.micron.com/~/media/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_128mb_3v_65nm.pdf
Signed-off-by: Robert Jordens <jordens@gmail.com>
Change-Id: Icfb830387fabfb1a67e4d00bdf21a10420f6fc1c
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2841
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotarget/testee: manage target->state
Robert Jordens [Tue, 30 Jun 2015 23:16:08 +0000 (17:16 -0600)]
target/testee: manage target->state

The testee target is usefull for certain non-cpu pass-through
situations, for example in the case of a spi flash mapped to the DR of
a JTAG tap, as is the case for most FPGAs with SPI flashs behind them.

We just manage the RUNNING/RESET/HALTED state in the testee driver to
support it being halted which is a requirement for flash banks.

Change-Id: I1b4d52c58a1f6bd753e126bfde74dcc5164d7b69
Signed-off-by: Robert Jordens <jordens@gmail.com>
Reviewed-on: http://openocd.zylin.com/2840
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/board: Add EmCraft VF6 SOM and baseboard configs
Andreas Färber [Thu, 14 May 2015 20:37:25 +0000 (22:37 +0200)]
tcl/board: Add EmCraft VF6 SOM and baseboard configs

Tested with "TWR-K70-SOM-BSB-1A" baseboard.

Change-Id: I37aa21f1ca8aa13a4bf03be7dd534d6da1aec017
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2767
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl/target: Add Freescale Vybrid VF6xx config
Andreas Färber [Thu, 14 May 2015 20:02:00 +0000 (22:02 +0200)]
tcl/target: Add Freescale Vybrid VF6xx config

This covers only the Cortex-A5 for now, not the Cortex-M4.

Change-Id: I739ec52b14b83d6e9f124ed61f8941502e481402
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/2766
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agojlink: Add on-board nRF51-DK USB VID and PID
Kyle Manna [Sun, 17 May 2015 18:11:26 +0000 (11:11 -0700)]
jlink: Add on-board nRF51-DK USB VID and PID

* Add USB VID and PID for the J-Link interface running on the Nordic
  Semiconductor nRF51-DK.  Also tested with debug out port to debug
  external boards.
* Elimiantes need for `-c "jlink pid 0x1015"` on the openocd cmd line.

Change-Id: Ib23acb72b9f5183b76fc7dc22b556982869ae830
Signed-off-by: Kyle Manna <kyle@kylemanna.com>
Reviewed-on: http://openocd.zylin.com/2775
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoudev: Add J-Link on-board nRF51-DK
Kyle Manna [Sun, 17 May 2015 18:11:15 +0000 (11:11 -0700)]
udev: Add J-Link on-board nRF51-DK

* Add USB VID and PID for the J-Link interface running on the Nordic
  Semiconductor nRF51-DK.  Also tested with debug out port to debug
  external boards.
* Fixes permissions problems.

Change-Id: I01ffc3150fa2af92d399b50e0195dc255a40ec42
Signed-off-by: Kyle Manna <kyle@kylemanna.com>
Reviewed-on: http://openocd.zylin.com/2774
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotcl: replace $TARGETNAME with $_TARGETNAME
Radek Dostal [Thu, 21 May 2015 16:12:39 +0000 (18:12 +0200)]
tcl: replace $TARGETNAME with $_TARGETNAME

code polishing to be consistent with other scripts

Change-Id: Ib52a92f48df9d2bdf543792b856e33aa04dbebe3
Signed-off-by: Radek Dostal <radek.dostal@streamunlimited.com>
Reviewed-on: http://openocd.zylin.com/2779
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agoRTOS: ThreadX support on ARM926E-JS
Alexander Drozdov [Thu, 2 Jul 2015 08:32:28 +0000 (18:32 +1000)]
RTOS: ThreadX support on ARM926E-JS

ThreadX uses two stacking schemas on ARM926E-JS, extend API to use more then
one stecking at time.

Change-Id: I92d445ad0981b6409ea4c4e7e438d3a7ae39cbe7
Signed-off-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-on: http://openocd.zylin.com/2848
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agotarget: check memory handlers before use for all types
Karl Palsson [Sun, 31 May 2015 13:36:13 +0000 (13:36 +0000)]
target: check memory handlers before use for all types

MMU types were checking and installing fakes at init, but this wasn't catching
all devices.  Fixes segfaults when attempting mdw and friends on avr.

Change-Id: I5b11f9913157a21f1aeb11ec852f593b529d9be8
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Reviewed-on: http://openocd.zylin.com/2791
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Andreas Färber <afaerber@suse.de>
9 years agomanual: make it compatible with ancient texinfo versions that lack @raggedright
Paul Fertser [Mon, 25 May 2015 08:59:25 +0000 (11:59 +0300)]
manual: make it compatible with ancient texinfo versions that lack @raggedright

This is needed to unbreak build on systems that ship texinfo version
4.x.

Change-Id: Ie665d29b02bb65da7e8ed0d48d17fa56e231bd0d
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2781
Tested-by: jenkins
Reviewed-by: David Ung <davidu@nvidia.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Oleksij Rempel
9 years agoRestore normal development cycle
Paul Fertser [Sun, 17 May 2015 21:34:18 +0000 (00:34 +0300)]
Restore normal development cycle

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
9 years agoThe openocd-0.9.0 release v0.9.0
Paul Fertser [Sun, 17 May 2015 21:06:36 +0000 (00:06 +0300)]
The openocd-0.9.0 release

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
9 years agoNEWS: last pre-release changes
Paul Fertser [Sun, 17 May 2015 20:27:24 +0000 (23:27 +0300)]
NEWS: last pre-release changes

Change-Id: Ibeb9078d19023b8cae5c0371079d5e4e1b5e3c57
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2776
Tested-by: jenkins
9 years agojtag/drivers/stlink: fix SRST issue with stlink-v1
Paul Fertser [Sun, 10 May 2015 10:12:14 +0000 (13:12 +0300)]
jtag/drivers/stlink: fix SRST issue with stlink-v1

Even though the latest firmware version for stlink-v1 supports "v2"
JTAG API, the hardware SRST handling is still broken; amend the check
accordingly.

Change-Id: I62c662cd7aa209d2d6e9fe260f5c0be81d0ce672
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2761
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
9 years agopsoc4: add support for Cypress CCG1 family
Vincent Palatin [Tue, 18 Nov 2014 20:04:23 +0000 (12:04 -0800)]
psoc4: add support for Cypress CCG1 family

Add the identifiers to support the flash on the Cypress Type-C Port Controller
chips of the CCG1 family : http://www.cypress.com/ccg1/.

Tested successfully on CYPD1132-16SXI.

Change-Id: I3fe6283379e5bcab964afac31b547ef95535aa2c
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: http://openocd.zylin.com/2757
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agonrf51: refine and extend known devices table
Peter A. Bigot [Tue, 10 Mar 2015 13:44:28 +0000 (08:44 -0500)]
nrf51: refine and extend known devices table

The notation Gx0 in the nRF51 Series Compatibility Matrix indicates that
the specified HWID is valid only for build code 0 of each chip, and for
subsequent builds the HWID will be different.  Replace the Gx0 notation
with G0 throughout, and add the missing HWID for nRF51422 QFAC A1
(present on the newer nRF51 developer boards).

See: https://www.nordicsemi.com/eng/nordic/download_resource/41917/5/55913589
See: https://devzone.nordicsemi.com/question/30774/mapping-hwid-to-revision-information/

Change-Id: I79d842137d41342db35904867c48b06fbc6fbc70
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Angus Gratton <gus@projectgus.com>
Reviewed-on: http://openocd.zylin.com/2593
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agodocs: gdb_target_description defaults enabled
Karl Palsson [Wed, 13 May 2015 11:33:59 +0000 (11:33 +0000)]
docs: gdb_target_description defaults enabled

This has been the case since c6216201 in 2013

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Change-Id: I70232a46e29951f05f02dec00e0695d761697aa5
Reviewed-on: http://openocd.zylin.com/2764
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agoserver: avoid the tcl server crashing when there is no target
Austin Morton [Sat, 2 May 2015 22:00:37 +0000 (18:00 -0400)]
server: avoid the tcl server crashing when there is no target

Since commit 1d0cf0df37a4e831ca3121ba8987d5848cad3e42
("server: tcl_notifications command") connecting to the tcl server
would terminate openocd. Fix this.

Change-Id: I36e2a7482f7db3a30ff7e9f969c3b6cda9599382
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Reviewed-on: http://openocd.zylin.com/2759
Tested-by: jenkins
Reviewed-by: Forest Crossman <cyrozap@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
9 years agomanual: add missing usb blaster commands
Paul Fertser [Sat, 16 May 2015 08:10:31 +0000 (11:10 +0300)]
manual: add missing usb blaster commands

Change-Id: Ie7fbb9f87a811c4add5b7c8f9581d5bbc90fa4f8
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2772
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
9 years agomanual: fix usb_blaster_pin command syntax and description
Paul Fertser [Sat, 16 May 2015 07:18:19 +0000 (10:18 +0300)]
manual: fix usb_blaster_pin command syntax and description

Change-Id: If3fbb2fe4f1842bea3962a6b903fd16aa9e8b545
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2771
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
9 years agoREADME.Windows: clarify the kernel drivers installation
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>
9 years agomanual: reorder flash driver info
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>
9 years agomanual: fix all overfull and underfull hboxes
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>
9 years agomanual: remove the lists of config files
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>
9 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>
9 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>