]> git.sur5r.net Git - openocd/log
openocd
12 years agoUserGuide: Fixed link to IAR J-Link.
Bill Traynor [Thu, 19 Apr 2012 16:30:19 +0000 (12:30 -0400)]
UserGuide: Fixed link to IAR J-Link.

In Section 2.5 USB JLINK based, fixed the URL for IAR J-Link:
http://www.iar.com/en/products/hardware-debug-probes/iar-j-link/

Change-Id: If613d2e915a0a704569d74094e612e34bcc849d3
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/586
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoHACKING: Fix instruction for git pull --rebase
Bill Traynor [Wed, 18 Apr 2012 20:56:10 +0000 (16:56 -0400)]
HACKING: Fix instruction for git pull --rebase

When following the Patch Guidelines step by step,
an error occurs at step 6.

"git pull --rebase origin/master" results in the error:

fatal: 'origin/master' does not appear to be a git repository

Removing the / seems to fix this.

Change-Id: I4e2fa23c60654abeaebd3b25a8c8375aa07b0abd
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://openocd.zylin.com/574
Reviewed-by: David Anders <danders.dev@gmail.com>
Tested-by: jenkins
12 years agozy1000: fixed link to Zylin ZY1000 JTAG Probe
Bill Traynor [Wed, 18 Apr 2012 18:06:49 +0000 (14:06 -0400)]
zy1000: fixed link to Zylin ZY1000 JTAG Probe

This patch fixes the link to the Zylin ZY1000 JTAG Probe webpage.
The ZY1000 product line was acquired by Ultimate Solutions, Inc. in May 2011.

Change-Id: If68cd45a0c47aa20b2e4bb62939b2c505c8c8c2e
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/571
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agopandaboard: add initial TCL support for pandaboard-es
David Anders [Wed, 18 Apr 2012 20:12:24 +0000 (15:12 -0500)]
pandaboard: add initial TCL support for pandaboard-es

add initial TCL support for the pandaboard-es which is
based on the omap4460 from Texas Instruments.

Change-Id: Ic63588721487feb95e7cb3d41cfaab0d2f181766
Signed-off-by: David Anders <danders.dev@gmail.com>
Reviewed-on: http://openocd.zylin.com/573
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoomap4460: add initial TCL support for the omap4460 es1.0
David Anders [Wed, 18 Apr 2012 19:42:50 +0000 (14:42 -0500)]
omap4460: add initial TCL support for the omap4460 es1.0

this patch adds the initial support for the omap4460 es1.0
version which is similar to the omap4430 and used on the
pandaboard-es.

Change-Id: If885f7d9f8809929bd799786b539e4f499fa3478
Signed-off-by: David Anders <danders.dev@gmail.com>
Reviewed-on: http://openocd.zylin.com/572
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agocfg: add stm32f0discovery board config
Spencer Oliver [Wed, 18 Apr 2012 09:47:29 +0000 (10:47 +0100)]
cfg: add stm32f0discovery board config

Change-Id: I4fccdbd4e0a3bc70cd425c910ad1007519098e20
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/570
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
12 years agoGlyn Tonga2: Faster JTAG speed after CPU/RAM init.
Uwe Hermann [Tue, 10 Apr 2012 22:02:51 +0000 (00:02 +0200)]
Glyn Tonga2: Faster JTAG speed after CPU/RAM init.

Change-Id: Ib08dae0035355138c468483a7ee2d73aadedf430
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Reviewed-on: http://openocd.zylin.com/564
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostlink: correctly format printed hex addresses
Spencer Oliver [Thu, 5 Apr 2012 16:07:20 +0000 (17:07 +0100)]
stlink: correctly format printed hex addresses

Change-Id: I4a139989927249bb5e9dcc4804965c85c37cc09b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/559
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agoSTM32L: Write partial-page flash data after full-page data
Mathias K [Wed, 4 Apr 2012 09:36:38 +0000 (11:36 +0200)]
STM32L: Write partial-page flash data after full-page data

The target address for the partial data needs to be bumped past the
full page data. Otherwise, the partial data overwrites the start of
the flash block.

Change-Id: I1246b2fa8acbdb8193edcf7029309f11d1c6069c
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/555
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agoft2232: Support for Digilent HS1 USB adapter
Stephane Bonnet [Wed, 4 Apr 2012 19:05:25 +0000 (21:05 +0200)]
ft2232: Support for Digilent HS1 USB adapter

* Added support to the FT2232 driver for the FT2232H-based
  Digilent HS1 adapter.

Change-Id: Iab6cc15f299badaf115615b5d4d785ecb2273c27
Signed-off-by: Stephane Bonnet <bonnetst@hds.utc.fr>
Reviewed-on: http://openocd.zylin.com/558
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: add icnova_imx53_sodimm board config
Wjatscheslaw Stoljarski (Slawa) [Tue, 27 Mar 2012 08:32:33 +0000 (10:32 +0200)]
cfg: add icnova_imx53_sodimm board config

Add board config for In-Circuit ICnova iMX53 SODIMM

Change-Id: I3802ab1695baa75c1f170cf1af0e38ada284c0b8
Signed-off-by: Wjatscheslaw Stoljarski (Slawa) <wjatscheslaw.stoljarski@kiwigrid.com>
Reviewed-on: http://openocd.zylin.com/543
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: add imx53loco board config
Wjatscheslaw Stoljarski (Slawa) [Tue, 27 Mar 2012 08:19:37 +0000 (10:19 +0200)]
cfg: add imx53loco board config

Add board config for iMX53QSB (loco)

Change-Id: I8659dcd71a56d5fe855eaf62be0a415198b558c5
Signed-off-by: Wjatscheslaw Stoljarski (Slawa) <wjatscheslaw.stoljarski@kiwigrid.com>
Reviewed-on: http://openocd.zylin.com/542
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocontrib/openocd.udev: fix warning
Antonio Borneo [Mon, 2 Apr 2012 23:30:11 +0000 (07:30 +0800)]
contrib/openocd.udev: fix warning

Fix following warning message logged by udev at start

udevd[421]: SYSFS{}= will be removed in a future udev
version, please use ATTR{}= to match the event device,
or ATTRS{}= to match a parent device, in
/etc/udev/rules.d/95-openocd.rules:81

Change-Id: I6de935c13a3327e3d718c110f97d19b9847ceca5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/552
Tested-by: jenkins
Reviewed-by: Luca Bruno
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoSupport for KaRo TX25 CPU Module on a StarterkitV base board
Simon Widmer [Wed, 4 Apr 2012 14:34:29 +0000 (16:34 +0200)]
Support for KaRo TX25 CPU Module on a StarterkitV base board

This patch adds support for the KaRo TX25 module on a StarterkitV base board.
For board details, check http://www.karo-electronics.com/tx25.html

Change-Id: I2c80c5467bc476955b55196728aa3c37c8185e6c
Author: Simon Widmer <simonxwidmer@gmail.com>
Signed-off-by: Mark Vels <mark.vels@team-embedded.nl>
Reviewed-on: http://openocd.zylin.com/557
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agotopic: add reset functions for SWD
Simon Qian [Sat, 17 Mar 2012 07:21:59 +0000 (15:21 +0800)]
topic: add reset functions for SWD

Add swd_init_reset and swd_add_reset.
Add adapter_assert_reset and adapter_deassert_reset, and call them instead
of JTAG reset functions.

Change-Id: Ib2551c6fbb45513e0ae0dc331cfe3ee3f922298a
Signed-off-by: Simon Qian <simonqian.openocd@gmail.com>
Reviewed-on: http://openocd.zylin.com/526
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agodoxygen: remove warnings
Spencer Oliver [Wed, 4 Apr 2012 12:37:09 +0000 (13:37 +0100)]
doxygen: remove warnings

Change-Id: I020845a8df7b67f3b6c1a233b3ee07a5d14fa685
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/556
Tested-by: jenkins
12 years agoFinish off functions mips32_pracc_read_mem16() and mips32_pracc_read_mem8()
Salvador [Mon, 2 Apr 2012 18:01:38 +0000 (20:01 +0200)]
Finish off functions mips32_pracc_read_mem16() and mips32_pracc_read_mem8()

This functions are unfinished and work only with  parameter count up to 1024.

Commands mdh and mdb from pic32mx context show values not related to memory
content if parameter count is bigger than 1024. Firt 1024 are ok.

Change-Id: Ie3f4d4a0f9d1d1a69bd3a18de2f72dd9249514cb
Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/550
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: jenkins
12 years agoMinor bug fixes in Mips32 code
Salvador [Mon, 2 Apr 2012 14:48:52 +0000 (16:48 +0200)]
Minor bug fixes in Mips32 code

Now the the "Fast" version for memory blank check in pic32mx.c can be called:
default_flash_blank_check()  instead of the "fallback"  default_flash_mem_blank_check().

The command "verify_image", without working area, now don't show:
 checksum mismatch - attempting binary compare
when there are no real errors in flash.

Change-Id: I256e8ae949289634e1de5c1c2861e4c4c4b7fdce
Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/549
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agodocs: add gerrit server url
Spencer Oliver [Tue, 3 Apr 2012 15:40:05 +0000 (16:40 +0100)]
docs: add gerrit server url

Change-Id: If39b522594a4ee3758fb85309af01f7a98c9f939
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/553
Tested-by: jenkins
12 years agodocs: remove unused primer ref
Spencer Oliver [Fri, 30 Mar 2012 21:29:14 +0000 (22:29 +0100)]
docs: remove unused primer ref

we already have a link to the patch primer in the main index.

Change-Id: Ib90ade76a17f5d99da8fe481d8f87c68eca38f1c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/546
Tested-by: jenkins
12 years agotools/initial.sh
Ulf Samuelsson [Tue, 20 Dec 2011 14:16:08 +0000 (15:16 +0100)]
tools/initial.sh

Small script to setup Gerrit with the local repository

Usage: tools/initial.sh <username>

Change-Id: I26527c35cfe040c7752efec06064d5dc9e3ec6a2
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/290
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoInitial config for the Voltcraft DSO-3062C.
Uwe Hermann [Sun, 1 Apr 2012 22:25:37 +0000 (00:25 +0200)]
Initial config for the Voltcraft DSO-3062C.

This is a digital oscilloscope which uses a Samsung S3C2440 internally.

http://randomprojects.org/wiki/Voltcraft_DSO-3062C

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Change-Id: I5e28c3a8f30665a162e34c831294e4e658a16ebb
Reviewed-on: http://openocd.zylin.com/548
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoAdd value "openbsd" for ocd_HOSTOS.
Wim Lewis [Sun, 25 Mar 2012 01:06:12 +0000 (18:06 -0700)]
Add value "openbsd" for ocd_HOSTOS.

Change-Id: I9b0dd87d85c0792730f507176001d39c44da7117
Signed-off-by: Wim Lewis <wiml@hhhh.org>
Reviewed-on: http://openocd.zylin.com/547
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agojimtcl: update to version 0.73
Spencer Oliver [Tue, 20 Mar 2012 13:33:30 +0000 (13:33 +0000)]
jimtcl: update to version 0.73

Change-Id: I9c943abb3ec5148b9cb24d0823f7787066948201
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/536
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agoarmv7m: fix broken stlink build
Spencer Oliver [Fri, 30 Mar 2012 19:34:24 +0000 (20:34 +0100)]
armv7m: fix broken stlink build

The stlink partially supports the cortex-m4 fp regs and requires these
defines to build.

Change-Id: Id3aa802ecc7006cb6d9f84b79ab3c21af24c1001
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/545
Tested-by: jenkins
12 years agostm32: Update register read/write to the register definition.
Mathias K [Thu, 15 Mar 2012 14:25:27 +0000 (15:25 +0100)]
stm32: Update register read/write to the register definition.

This patch fix the register index on read/write register.

Change-Id: I7b52a927a48259d6f497ac0f474aff7ff1529e9a
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/525
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoarmv7m: detect floating point feature
Mathias K [Thu, 15 Mar 2012 13:58:32 +0000 (14:58 +0100)]
armv7m: detect floating point feature

This patch add fp feature detection on cortex-m4.

Change-Id: I99e9d1bf5534630a22b8ad9c878165683db2d0ba
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/524
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agobuild: correctly quote m4 parameters
Spencer Oliver [Fri, 30 Mar 2012 15:10:37 +0000 (16:10 +0100)]
build: correctly quote m4 parameters

Change-Id: I8fbef892caa78dba5324a8bc28d2a4a4854b1f48
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/544
Tested-by: jenkins
12 years agocfg: add support for STM3220G-EVAL onboard STLINK
Spencer Oliver [Mon, 26 Mar 2012 16:22:27 +0000 (17:22 +0100)]
cfg: add support for STM3220G-EVAL onboard STLINK

Change-Id: Icd7a1baf6f2623e5b57d29c4602a2762af730936
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/541
Tested-by: jenkins
12 years agocfg: add STM32F4x and STM3241G-EVAL config files
Spencer Oliver [Mon, 26 Mar 2012 13:54:24 +0000 (14:54 +0100)]
cfg: add STM32F4x and STM3241G-EVAL config files

This adds support for the STM32F4 target and the STM3241G Eval Board, in
both standalone and using the onboard STLINK.

Change-Id: I62f8908b5880568b2b36c78a78f94c40861ff335
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/540
Tested-by: jenkins
12 years agoscripts: use adapter_nsrst_delay not deprecated jtag_nsrst_delay
Spencer Oliver [Mon, 26 Mar 2012 13:41:39 +0000 (14:41 +0100)]
scripts: use adapter_nsrst_delay not deprecated jtag_nsrst_delay

Change-Id: Idf98526d64dcba4d8a5b6910bd3c539756753e8e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/539
Tested-by: jenkins
12 years agoAdded tcl config scripts for SAM3A/X targets and devboard
Olivier Schonken [Tue, 6 Mar 2012 20:43:25 +0000 (22:43 +0200)]
Added tcl config scripts for SAM3A/X targets and devboard

The SAM3A/X processors that were released thus far is either
a SAM3A/X(4) - 256K, or a SAM3A/X(8) - 512K device.  Thus
the config files are per variant, and not per device.

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
Change-Id: I84d26d044e810eb428b1d6287907ea3bf8364c73
Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
Reviewed-on: http://openocd.zylin.com/522
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agodocs: update release docs to use configure.ac
Spencer Oliver [Tue, 20 Mar 2012 21:21:15 +0000 (21:21 +0000)]
docs: update release docs to use configure.ac

Change-Id: I7b52ad1c3744a82832c5b55898bf47607e24d03e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/538
Tested-by: jenkins
12 years agotools: update release scripts to use configure.ac
Spencer Oliver [Tue, 20 Mar 2012 21:19:16 +0000 (21:19 +0000)]
tools: update release scripts to use configure.ac

we have already updated autoconf to use configure.ac instead of
configure.in, so update release.sh to use the new name.

Change-Id: I2dc2beaf2f85058c4627183bc093052677ccba1b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/537
Tested-by: jenkins
12 years agotopic: Flash support for Pic32mx1xx/2xx
Salvador Arroyo [Wed, 29 Feb 2012 22:55:53 +0000 (23:55 +0100)]
topic: Flash support for Pic32mx1xx/2xx

Change-Id: I496cb745fb1eb5c9159471838013b8d19418f5c0
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/500
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoCreate a init_board procedure for the ea dev board.
Chris Morgan [Thu, 8 Mar 2012 19:58:41 +0000 (14:58 -0500)]
Create a init_board procedure for the ea dev board.

Signed-off-by: Chris Morgan <chmorgan@gmail.com>
Change-Id: I082b0d3092c7f3b2ee6b68af64d48c78b31f1dbf
Reviewed-on: http://openocd.zylin.com/510
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agotransport: remove interface multiple transport warning
Spencer Oliver [Mon, 19 Mar 2012 16:38:11 +0000 (16:38 +0000)]
transport: remove interface multiple transport warning

Currently if we have multiple transport's defined we receive an warning similar to:
must select a transport.
allow transport 'jtag'
allow transport 'swd

This removes that warning and only prints this info if transport_init fails.

Change-Id: I87126390f234bc2f705e1f150a0dcc110dcab151
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/532
Tested-by: jenkins
12 years agoBug in src/target/mips32_pracc.c
Salvador [Sat, 17 Mar 2012 08:25:23 +0000 (09:25 +0100)]
Bug in src/target/mips32_pracc.c

The bug shows up with the command "mdw addres count" and only if count>1024 (count>0x400).
The first 1024 values shows as expected, but the rest of the values  are wrong.
Name of variable  bytesread" is changed to "wordsread" to reflect what really does.

Change-Id: Iad79393e72da2637551c5ae6e829e3873605c520
Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/527
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoAdd warn message if no flash bank found for the current image address.
Mathias K [Mon, 19 Mar 2012 18:37:55 +0000 (19:37 +0100)]
Add warn message if no flash bank found for the current image address.

Add a warn message to inform the user that something is wrong
with the flash settings or command parameters.

Change-Id: Ia55868b2abf2a17845e51620b0f29b2809d841c2
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/280
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agogdb_server: Simple close the connection and not exit openocd.
Mathias K [Thu, 15 Mar 2012 08:11:19 +0000 (09:11 +0100)]
gdb_server: Simple close the connection and not exit openocd.

This patch let openocd running and only close the gdb connection
on error.

Change-Id: Ifb88e16834b51207cc4c82210eab904ed8d30b71
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/523
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agogdb_server: Fix wrong index/length compare.
Mathias K [Tue, 13 Mar 2012 15:40:22 +0000 (16:40 +0100)]
gdb_server: Fix wrong index/length compare.

This patch fix the compare for the list size and the register index.

Change-Id: I36d5e078f57d2a9f7823cfdf0d537762e00f6929
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/516
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agortos: add sanity checking for FreeRTOS's quantity of priorities
Paul Fertser [Wed, 14 Mar 2012 06:42:31 +0000 (09:42 +0300)]
rtos: add sanity checking for FreeRTOS's quantity of priorities

On operating systems with opportunistic malloc() (e.g. default setting in
GNU/Linux) malloc can sometimes allocate a huge memory region but later the
process will get killed on the first attempt to use this memory, so
checking for malloc's return value is not enough to prevent a crash.

This patch is compile-tested only.

Change-Id: I5e21663115c8e9a0ca9f3d71f7ba4bd09e5c3bb1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/521
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agortos: fix segfault in FreeRTOS handling
Paul Fertser [Wed, 14 Mar 2012 06:24:22 +0000 (09:24 +0300)]
rtos: fix segfault in FreeRTOS handling

When gdb loads an elf file of a newer or older version of the firmware
being debugged, or when the firmware is not running yet, there's a high
probability of FreeRTOS variables to be read incorrectly, thus leading to
an attempt to allocate an enourmous amount of memory. Without this check
OpenOCD simply crashes and that's mad confusing.

Change-Id: I404a072e886d2d47d9d942cfaea8417eb8bd4a5d
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/520
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostlink: fix alignment build warning
Alexandre Pereira da Silva [Fri, 24 Feb 2012 20:51:48 +0000 (18:51 -0200)]
stlink: fix alignment build warning

The {read,write}_mem32 interface functions was asking a 32 bits buffer
but they don't need 32 bits alignment.
This will change the interface to a 8 bits buffer to remove the
alignment mismatch warning. This was causing build errors on platforms
with strict aliasing rules.

Change-Id: I338be8df5686f07a64ddb4f17c1bb494af583999
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Reviewed-on: http://openocd.zylin.com/483
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agogdb_server: sanity check the gdb register size
Mathias K [Tue, 13 Mar 2012 20:26:20 +0000 (21:26 +0100)]
gdb_server: sanity check the gdb register size

This patch checks the received register length with the local
configured register length and disconnect on a length missmatch.

Change-Id: I6b112c6b55a9ffb4526f582a384ffa91dc8b792f
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/517
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoarmv7m: Add a dummy register at the end of the register list.
Mathias K [Tue, 13 Mar 2012 20:59:19 +0000 (21:59 +0100)]
armv7m: Add a dummy register at the end of the register list.

Signed-off-by: Mathias K <kesmtp@freenet.de>
Change-Id: I0bfad091bd8adabd949fc0a74ef3a08a514eb307
Reviewed-on: http://openocd.zylin.com/519
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
12 years agostm32: Add floating point register read/write.
Mathias K [Sat, 10 Mar 2012 13:34:44 +0000 (14:34 +0100)]
stm32: Add floating point register read/write.

This patch add floating point register read/write
functionality through the SCS debug interface.

Change-Id: Id20e109dd7cccba00671d55ca8aabeb4936cceb9
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/512
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostm32: determine all cpu types and use common examine
Mathias K [Mon, 12 Mar 2012 10:28:49 +0000 (11:28 +0100)]
stm32: determine all cpu types and use common examine

This patch determine all cpu types and not only
the cortex M3 and the stm32 target use the common
target examine function from the cortex_m sources.

Change-Id: If689dd994b3855284b927fc4b206f420cf32b6c7
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/511
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoflash: Fix flash write algorithm on pflash only devices.
Mathias K [Fri, 9 Mar 2012 08:41:45 +0000 (09:41 +0100)]
flash: Fix flash write algorithm on pflash only devices.

This patch fix the slow flash write issue on pflash only devices.
The Family Reference Manual says:

For devices with FlexNVM: FlexRAM
For devices with program flash only: Programming acceleration RAM

So the acceleration RAM is available for the flash section command on
this device.

Change-Id: If6541a23a4457c5ed8858848a145f35cac63138b
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/509
Tested-by: jenkins
Reviewed-by: Tomas Frydrych <tf+openocd@r-finger.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoAutomatically prepend v1 mass storage protocol.
Mathias K [Thu, 8 Mar 2012 16:07:47 +0000 (17:07 +0100)]
Automatically prepend v1 mass storage protocol.

This patch prepend the v1 mass storage protocol to the command
buffer and simplify the usb read/write handling.

Change-Id: I709602600e93cd1eb5848fa9f4d15659ba85eb35
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/506
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agomips: Forced to running state to enable (subsequent) target halt.
Drasko DRASKOVIC [Mon, 12 Mar 2012 21:10:24 +0000 (22:10 +0100)]
mips: Forced to running state to enable (subsequent) target halt.

Change-Id: I9aff8fb3ac703b50194088dd4e68cec8f9bb2ada
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Reviewed-on: http://openocd.zylin.com/513
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: correct pic32mx config typo's
Spencer Oliver [Mon, 12 Mar 2012 20:11:29 +0000 (20:11 +0000)]
cfg: correct pic32mx config typo's

Change-Id: Ibe5b6b0efefc7cfc75d789eb7e9c7ee239526ae2
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/508
Tested-by: jenkins
12 years agoecosboard: delete bit-rotted eCos code
Øyvind Harboe [Mon, 5 Mar 2012 20:37:14 +0000 (21:37 +0100)]
ecosboard: delete bit-rotted eCos code

Change-Id: Iff7943eb9da3f41dcc45492acd0f36cf63b3497f
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/503
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: jenkins
12 years agojtag: basic support for P&E Micro OSBDM (aka OSJTAG) adapter
Jan Dakinevich [Mon, 27 Feb 2012 20:51:12 +0000 (00:51 +0400)]
jtag: basic support for P&E Micro OSBDM (aka OSJTAG) adapter

This driver provides support for the P&E Micro OSBDM adapter (sometimes
named as OSJTAG), mounted on the Freescale TWRK60N512 bord. Thus, it
provides a quick start when working with this board. The driver doesn't
use BDM commands, but work with OSBDM adapter using only JTAG commands.

Change-Id: Ibc3779538e666e07651d3136431e5d44344f3b07
Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Reviewed-on: http://openocd.zylin.com/492
Tested-by: jenkins
Reviewed-by: Tomas Frydrych <tf+openocd@r-finger.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agotopic: Added support for the SAM3X/A variants
Olivier Schonken [Tue, 6 Mar 2012 18:57:45 +0000 (20:57 +0200)]
topic: Added support for the SAM3X/A variants

Atmel introduced 7 new Cortex-M3 processors on 2012-02-28
SAM3X4C - 256KB flash
SAM3X4E - 256KB flash
SAM3X8C - 512KB flash
SAM3X8E - 512KB flash
SAM3X8H (Only on dev-kit - not in production...) - 512KB flash
SAM3A4C - 256KB flash
SAM3A8C - 256KB flash

The SAM3X/A processors still suffer from the "6 waitstates needed
to program device" errata.

The CIDR address for the SAM3X/A processors are different from the
other SAM3 processors.  Unfortunately, the chip identification register
is not at a constant address across all of the SAM3 series'. As a
consequence, a simple heuristic is used to find where it's
at... If the contents at the first address is zero, then we know
that the second address is where the chip id register is.
We can deduce this because for those SAM's that have the chip id @ 0x400e0940,
the first address, 0x400e0740, is located in the memory map of the Power
Management Controller (PMC). Furthermore, the address is not used by the PMC.
So when read, the memory controller returns zero.

Another interesting change is the flash bank address for flash bank 1.
It is not fixed at 0x00100000 like the Sam3U.  Bank 1 of the at91sam3a/x
series starts at 0x00080000 + half the total flash size.  Thus for the 256KB
devices Bank 1 is located at 0x000A0000, and for the 512KB devices Bank 1 is
located at 0x000C0000.

The configuration files for the SAM3X/A processors will follow

Change-Id: I6c3a707c00e05d993a2ad1d5a423f23b37ffd553
Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
Reviewed-on: http://openocd.zylin.com/505
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agodocs: add stm32 dual bank example
Spencer Oliver [Thu, 8 Mar 2012 12:33:25 +0000 (12:33 +0000)]
docs: add stm32 dual bank example

Change-Id: I1dfe134e2c7694fc978d14b4b21bdf9c82ca4b16
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/507
Tested-by: jenkins
12 years agotarget: remove unused declaration
Spencer Oliver [Tue, 13 Mar 2012 15:32:29 +0000 (15:32 +0000)]
target: remove unused declaration

arm7_9_prepare_reset_halt is long since gone and the functionality
is implemented in the target's assert_reset handler.

Change-Id: Ib03c730cb39d68e5e3bb42f92af13daf8074e4e2
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/515
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoflash: retire unused eCos flash driver
Øyvind Harboe [Mon, 5 Mar 2012 20:23:20 +0000 (21:23 +0100)]
flash: retire unused eCos flash driver

even the AT91EB40a's flash is covered by CFI and nobody ever submitted
any other drivers based on eCos code. It's just possible that this
idea was missing documentation and "marketing", but it's in git if
somebody wants to resurrect it.

Change-Id: I66449aa6e0997301f9d67f28098789bfc891d6e9
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/502
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agotarget_request: fix warning, do not set local variable to value it already has
Øyvind Harboe [Sun, 26 Feb 2012 18:33:38 +0000 (19:33 +0100)]
target_request: fix warning, do not set local variable to value it already has

Change-Id: If29b0efdc326ee1ce4c07ec9d8777744d674f367
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/490
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agoflash: stm32f1x: add a couple missing stm32x_get_flash_reg
Szymon Modzelewski [Sat, 25 Feb 2012 05:10:04 +0000 (06:10 +0100)]
flash: stm32f1x: add a couple missing stm32x_get_flash_reg

Change-Id: I163de2c1bd962e7ea9ca6c741c1c62224c210677
Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com>
Reviewed-on: http://openocd.zylin.com/486
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoflash: Additional check for NULL in str9xpec enable_turbo
Fredrik Hederstierna [Wed, 29 Feb 2012 10:16:27 +0000 (10:16 +0000)]
flash: Additional check for NULL in str9xpec enable_turbo

Change-Id: Ifde8783b27c64e4a4bbea180cfa2c86f6a9fe49a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/496
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agostlink: fix incorrect pc console output
Spencer Oliver [Wed, 29 Feb 2012 15:20:24 +0000 (15:20 +0000)]
stlink: fix incorrect pc console output

target_call_event_callbacks needs to be called after debug entry otherwise
we will get a console pc mismatch.

Change-Id: I278137736d5e85ca9662c306f6ac81336d8eb6cf
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/499
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agoAdd new configuration files for the Diolan LPC-4350-DB1 development
Jim Norris [Fri, 2 Mar 2012 03:08:54 +0000 (21:08 -0600)]
Add new configuration files for the Diolan LPC-4350-DB1 development

board with the NXP LPC4350 processor.

Change-Id: I0843e96af9ca05d3e598e2e16eb19fc0581ab46d
Signed-off-by: Jim Norris <u17263@att.net>
Reviewed-on: http://openocd.zylin.com/501
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoSAM3: Remove unused reference to SUPC registers
Attila Kinali [Tue, 28 Feb 2012 11:39:41 +0000 (12:39 +0100)]
SAM3: Remove unused reference to SUPC registers

The SUPC (Supply Controller) registers are on different base addresses on different
SAM3 chips:
SAM3U: 0x400e1210
SAM3N: 0x400e1410
SAM3S: 0x400e1410

This creates a problem with the sam3_reg_list array which is const, but would need
to be changed at runtime to account for this variability. As this register is not
used anywhere, it's simplest to just remove it.

Change-Id: I987eb371648d826aa6d5e9de18d38c7bb66d6fca
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/495
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoSAM3: Add missing architecture names for SAM3S and SAM3N
Attila Kinali [Tue, 28 Feb 2012 08:50:09 +0000 (09:50 +0100)]
SAM3: Add missing architecture names for SAM3S and SAM3N

Change-Id: Ie2177487d4315219eb364db360cb7f88d2720783
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/494
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoSAM3S: correct flash sector sizes.
Attila Kinali [Tue, 28 Feb 2012 08:44:25 +0000 (09:44 +0100)]
SAM3S: correct flash sector sizes.

Lock region count and sector sizes did not match datasheet.
(see 6500C-ATARM-8FE11 "SAM3S Series Datasheet", Table 7-1)

Change-Id: Ic511802f96ed03856467a24a6736349205a0576a
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/493
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoconfig: fix typo in at91 config
Jaap de Jong [Tue, 6 Mar 2012 10:07:34 +0000 (10:07 +0000)]
config: fix typo in at91 config

Change-Id: I596cbac3439456fcb02111caee6e8c290c12a6d5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/504
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
12 years agostlink-v1: fix memory writes
Szymon Modzelewski [Tue, 21 Feb 2012 12:44:00 +0000 (13:44 +0100)]
stlink-v1: fix memory writes

implement stlink_usb_send and use it to fix stlink_usb_write_mem

using two calls to stlink_usb_recv is inappropriate since each
call issues a SG command on stlink-v1, resulting in errors

Change-Id: I24ef9f2dda284e041dc4a532b59968a77eebe702
Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com>
Reviewed-on: http://openocd.zylin.com/498
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoRevert "stlink-v1: fix memory writes"
Spencer Oliver [Wed, 29 Feb 2012 14:15:30 +0000 (14:15 +0000)]
Revert "stlink-v1: fix memory writes"
I committed in the wrong order

This reverts commit 79230a8e3c5b85601fca730dfc09ecc52e693afa

Change-Id: Iace872ac4844891f4f38fca87448a2ebd9f17593
Reviewed-on: http://openocd.zylin.com/497
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostlink-v1: code cleanup
Szymon Modzelewski [Tue, 21 Feb 2012 12:43:11 +0000 (13:43 +0100)]
stlink-v1: code cleanup

This patch moves the bulk of the stlink read/write code into the
stlink_usb_xfer set of functions and implements stlink_usb_recv
in terms of the generic stlink_usb_xfer

stlink_usb_xfer will be needed to implement stlink_usb_send
without code duplication

stlink_usb_xfer:
-sends the stlink command
-performs a read or write (as requested)
-checks the status (v1 only)

Change-Id: I0137d52620bd4883d46c9977a9e73f67622000a1
Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com>
Reviewed-on: http://openocd.zylin.com/477
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoFix assert to check flash programming offset
Attila Kinali [Fri, 24 Feb 2012 10:18:12 +0000 (11:18 +0100)]
Fix assert to check flash programming offset

The assert introduced in 00c864835149a96b431fc8f31dd89542d88fd383 checks
whether the programming offset equals to page_size of the flash, while it
wants to check whether the offset is a multiple of the page_size.

Change-Id: I794d021951a28c1cc520b5eea5d500f097721b06
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/482
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
12 years agoflash: add stm32lx High Density Devices
Spencer Oliver [Fri, 17 Feb 2012 14:41:33 +0000 (14:41 +0000)]
flash: add stm32lx High Density Devices

Change-Id: Ieed9de4b078e1ebf659054a758b4f69acdf5b83e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/466
Tested-by: jenkins
12 years agoflash: change stm32lx driver probe behaviour
Spencer Oliver [Fri, 17 Feb 2012 14:33:48 +0000 (14:33 +0000)]
flash: change stm32lx driver probe behaviour

Currently stm32lx flash driver will remove the readout protection if set
during a probe.

This may not be what the user wants, so let them decide.

Change-Id: I8575e3b339b10a4f7bac57cca9586dcab513d347
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/465
Tested-by: jenkins
12 years agostlink-v1: fix memory writes
Szymon Modzelewski [Tue, 21 Feb 2012 12:44:00 +0000 (13:44 +0100)]
stlink-v1: fix memory writes

implement stlink_usb_send and use it to fix stlink_usb_write_mem

using two calls to stlink_usb_recv is inappropriate since each
call issues a SG command on stlink-v1, resulting in errors

Change-Id: I52ff9ee8f5d9ae0d47356477468eb98952205c99
Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com>
Reviewed-on: http://openocd.zylin.com/478
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoflash: add new devices to pic32mx flash driver
Spencer Oliver [Thu, 16 Feb 2012 12:46:13 +0000 (12:46 +0000)]
flash: add new devices to pic32mx flash driver

update as per DS61145 rev J

Change-Id: I2b5da84248ff2f44c7ca9d2ed1c52db453714c05
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/461
Tested-by: jenkins
12 years agocfg: Beaglebone/AM335x refactor
Neil Jensen [Fri, 24 Feb 2012 22:49:07 +0000 (16:49 -0600)]
cfg: Beaglebone/AM335x refactor

Split out functions specific to the AM335x SOC into the target directory and simplified the board config
file.  This should allow one to quickly create new configs for boards based on the TI processor family.

Change-Id: I0c3db97950dfa832f1f1918fc10c180f068bba74
Signed-off-by: Neil Jensen <neil30al@gmail.com>
Reviewed-on: http://openocd.zylin.com/489
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: beaglebone cleanup
Neil Jensen [Fri, 24 Feb 2012 22:31:44 +0000 (16:31 -0600)]
cfg: beaglebone cleanup

Simplified the configuration and removed things that were not necessary for debugging.  Also added reset
configuration.

Signed-off-by: Neil Jensen <neil30al@gmail.com>
Change-Id: I96f991c3051aa68278212cd6509484cbce40ccb7
Reviewed-on: http://openocd.zylin.com/488
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agojtag: use correct tap -ignore-version mask
Spencer Oliver [Tue, 21 Feb 2012 10:13:21 +0000 (10:13 +0000)]
jtag: use correct tap -ignore-version mask

when -ignore-version is used we should mask of the upper 4bits not 8bits.

Change-Id: I9ffe24c2aeeb414677357a647609fdf018890194
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/473
Tested-by: jenkins
12 years agojtag: fix cmd scan_chain expected_ids bug
Spencer Oliver [Tue, 21 Feb 2012 10:16:27 +0000 (10:16 +0000)]
jtag: fix cmd scan_chain expected_ids bug

This fixes scan_chain to correctly print all the expected_ids.

Change-Id: I93738980d85e0fe369d40c58b19339424d37ec34
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/474
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agoflash: add stm32f2x async flash loader
Spencer Oliver [Thu, 16 Feb 2012 09:42:06 +0000 (09:42 +0000)]
flash: add stm32f2x async flash loader

This enable the stm32f2x flash driver to use the asynchronous
algorithm support.

Speed increase is as follows:
before - wrote 1048576 bytes from file stm32f4x.bin in 30.453804s (33.625 KiB/s)
after - wrote 1048576 bytes from file stm32f4x.bin in 23.679497s (43.244 KiB/s)

This also fixes a bug that was in the old flash loader.
The old loader waited while bit16 of the status reg was 0, the new
loader waits until this bit is 0 as stated in the flash spec.
Bizarrely this bug did not effect programming on any tested parts.

Change-Id: I3efc94d42cbe81283673a8f4203700638080af6e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/460
Tested-by: jenkins
12 years agoflash: add stellaris async flash loader
Spencer Oliver [Fri, 10 Feb 2012 15:27:27 +0000 (15:27 +0000)]
flash: add stellaris async flash loader

This enable the Stellaris flash driver to use the asynchronous
algorithm support.

Speed increase is as follows:
before - wrote 65536 bytes from file test.bin in 5.486040s (11.666 KiB/s)
after - wrote 65536 bytes from file test.bin in 2.274001s (28.144 KiB/s)

Change-Id: I9004c9aadffa1ae3b0cbf908e6549b5b1f794508
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/403
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agotarget: add target async algorithm support
Spencer Oliver [Fri, 10 Feb 2012 15:24:52 +0000 (15:24 +0000)]
target: add target async algorithm support

Currently the stm32f1x flash driver uses an asynchronous algorithm
as part of the block flash programming. This greatly speeds up flash
programming as the target is always running.

Moving the async code to the target enable other targets to use this
added functionality.

Change-Id: I8e53f094c2ef7848a7f86ddb9a35b6edbfc8454a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/402
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agocfg: beaglebone
Neil Jensen [Fri, 24 Feb 2012 03:51:23 +0000 (21:51 -0600)]
cfg: beaglebone

Moved ti_beaglebone.cfg to the board configuration directory.  This was
originally placed in the wrong location.

Signed-off-by: Neil Jensen <neil30al@gmail.com>
Change-Id: I05d10b62b1a21618635ee1773c30d77dc756ec82
Reviewed-on: http://openocd.zylin.com/481
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: Beaglebone Support
Neil Jensen [Sun, 19 Feb 2012 03:37:08 +0000 (21:37 -0600)]
cfg: Beaglebone Support

Added support for the Beaglebone board based on the am335x processor
family.  After much trial and error, I was able to configure the
Icepick-D and connect to the processor, halt execution, and run a sample
program.  This is a unified config file (it doesn't use any include
statements) and further work needs to be done to split out the icepick-d
configuration to be more generic.

Change-Id: Ia1b8e9f01f56bd4f8c575ba3d0160c248583a15e
Signed-off-by: Neil Jensen <neil30al@gmail.com>
Reviewed-on: http://openocd.zylin.com/471
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agotarget: add function to get number of bytes available in working area
Andreas Fritiofson [Mon, 13 Feb 2012 00:19:57 +0000 (01:19 +0100)]
target: add function to get number of bytes available in working area

This is a much cleaner solution to the problem of allocating as much
working area as possible than what is currently being done in most/all flash
drivers (which is: try an arbitrary sized chunk, if it fails, pick a smaller
number, rinse and repeat).

Use this function to find out how much working area is available, limit or
restrict that amount at will and then simply allocate it.

Change-Id: Ib7d5d0b7485aed3e0a4fad60c1bedb7dfd16146f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/446
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agotarget: rewrite working area allocator
Andreas Fritiofson [Mon, 13 Feb 2012 00:18:24 +0000 (01:18 +0100)]
target: rewrite working area allocator

The existing allocator couldn't reuse a freed allocation if the sizes
didn't match exactly. That led to problems when for example a flash write
routine had allocated all of the working area to speed up operation. A
subsequent verify pass couldn't allocate space for the checksum algorithm
even though all previous allocations had been freed.

This allocator is marginally more complex, but solves the above problem by
splitting larger free areas to fulfill smaller requests and by merging
released areas into adjacent free areas.

An initial free area, covering the entire specified address range, is set
up on first allocation, and all allocations are split off from (and
ultimately merged into) that one. It can also easily be adapted to support
several disjoint working areas for the same target, by setting up several
initial free areas and slightly modifying the merge code.

Change-Id: I6faaf9801312bb19a4fa4474694a0cd1c6e0ab54
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/445
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: enable stm32f2x SYSRESETREQ support
Spencer Oliver [Mon, 20 Feb 2012 11:39:12 +0000 (11:39 +0000)]
cfg: enable stm32f2x SYSRESETREQ support

The stm32 family supports using SYSRESETREQ as a software reset, lets
use it.

Change-Id: I171ffa8d888a2d0c28b266051030311521e9bca9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/472
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
12 years agostlink: support expected-id 0
Spencer Oliver [Tue, 21 Feb 2012 10:41:39 +0000 (10:41 +0000)]
stlink: support expected-id 0

This brings the stlink driver inline with the rest of OpenOCD.

If the user configures the tap as -expected-id 0 then the IDCODE will be
treated as a wildcard and ignored.

Change-Id: I99160c69b2b40f5b1f608bb59ab6630894502fd8
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/476
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
12 years agodocs: fix more texinfo warnings
Spencer Oliver [Tue, 21 Feb 2012 10:34:48 +0000 (10:34 +0000)]
docs: fix more texinfo warnings

A period or comma must follow the closing brace of an @xref.

Change-Id: Ida5dc3600eca328d95b0a8f6b5c9fe0a0f3ba820
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/475
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
12 years agoSometime in the past, nand_fileio_finish started to return ERROR_OK (with the value...
Stian Skjelsad [Sat, 18 Feb 2012 14:29:20 +0000 (15:29 +0100)]
Sometime in the past, nand_fileio_finish started to return ERROR_OK (with the value of zero) on success.

Change-Id: Ifb743c1617e2a6071a87c901fae8165969efcdbf
Signed-off-by: Stian Skjelstad <stian@nixia.no>
Reviewed-on: http://openocd.zylin.com/468
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostlink: add error status check
Mathias K [Fri, 17 Feb 2012 12:41:27 +0000 (13:41 +0100)]
stlink: add error status check

This patch add the status check.

Change-Id: I0fdb9bf66dad5ae416c7aa4c6e19116f846571f9
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/463
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoFix Typo in cfg file
Jonathan Dumaresq [Fri, 17 Feb 2012 13:24:35 +0000 (08:24 -0500)]
Fix Typo in cfg file

Change-Id: Id91ef70988212185f9ec653cbf5dc4e1defb1b9e
Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
Reviewed-on: http://openocd.zylin.com/464
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoFix typo that result in recursion.
Mathias K [Thu, 16 Feb 2012 17:00:07 +0000 (18:00 +0100)]
Fix typo that result in recursion.

Change-Id: Ie1102b4960bcb5acb254eae69b94fe87ab33dd0b
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/462
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostlink: add arm semi-hosting support
Spencer Oliver [Tue, 14 Feb 2012 15:34:03 +0000 (15:34 +0000)]
stlink: add arm semi-hosting support

Change-Id: Ib275d451a9201580f08ced090e50cf45eb3ab3e2
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/459
Tested-by: jenkins
12 years agocfg: change default stellaris working area
Spencer Oliver [Tue, 14 Feb 2012 14:20:51 +0000 (14:20 +0000)]
cfg: change default stellaris working area

This sets the default stellaris working area to 2k rather than
the current 8k. 2K is the smallest RAM size in the stellaris family.

Change-Id: I1407f758eb0926cc094b824a6d25199b313c45de
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/458
Tested-by: jenkins
12 years agodocs: fix texinfo warnings
Spencer Oliver [Tue, 14 Feb 2012 11:16:34 +0000 (11:16 +0000)]
docs: fix texinfo warnings

A period or comma must follow the closing brace of an @xref.

Change-Id: I272f1e7fac8f1fee4844f485b0b8e2e4e9cf352d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/456
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agobuild: fix automake 1.11.2 issues
Spencer Oliver [Tue, 14 Feb 2012 12:57:18 +0000 (12:57 +0000)]
build: fix automake 1.11.2 issues

automake 1.11.2 throws `pkglibdir' is not a legitimate directory for `DATA'
if nobase_dist_pkglib_DATA is used.

We work around this issue by defining our own location.

Change-Id: I3c29e2df0b67e745283c50d358e31699bd60dc74
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/457
Tested-by: jenkins
12 years agoAdd stm32f0x target
Jonathan Dumaresq [Tue, 7 Feb 2012 14:53:22 +0000 (09:53 -0500)]
Add stm32f0x target

Change-Id: I4abfef4459b7e2780d17bdd7623fd1ef797cc8ea
Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
Reviewed-on: http://openocd.zylin.com/437
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoAdd stm32f0x probe and info working
Jonathan Dumaresq [Tue, 7 Feb 2012 14:55:34 +0000 (09:55 -0500)]
Add stm32f0x probe and info working

I used the CPUID instead of adding a new argument to the flash bank command
Fixed Type in comments

Add the failsafe return value in device_id
Change-Id: Ieb5a46fc002b5390a0c81bc8b49f6c687036ae1d
Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
Reviewed-on: http://openocd.zylin.com/438
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoAdd bootloader mode.
Mathias K [Thu, 16 Feb 2012 08:18:40 +0000 (09:18 +0100)]
Add bootloader mode.

This patch add the bootloader define.

Change-Id: I280a8a35c3514910dd381de3ab8ad59c9bd74ca1
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/455
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>