openocd.git
7 years agostm32f1x: fix bug in flash loader and restrict instruction set to armv6-m
Andreas Fritiofson [Wed, 25 Jan 2012 00:10:24 +0000 (01:10 +0100)]
stm32f1x: fix bug in flash loader and restrict instruction set to armv6-m

Correct the offset to the read pointer when clearing it on error.

Also restrict the instruction set to armv6-m so the flash driver can be
used on Cortex-M0 parts with the same flash controller.

Change-Id: I380f9dabcc41fb6e4d43a7e02f355e2381913f39
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/399
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agotarget: increase chunk size in dump_image
Andreas Fritiofson [Sat, 28 Jan 2012 01:35:57 +0000 (02:35 +0100)]
target: increase chunk size in dump_image

Replace the big stack-allocated buffer with a much bigger heap-allocated.
There was no explanation for the apparently arbitrary chunk size, and
performance was improved by increasing it, leveling out at about 4k.

Change-Id: I3b06d4469092ec8d89d0ce05bff0b7cf213c5062
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/404
Tested-by: jenkins
Reviewed-by: Marti Bolivar <mbolivar@leaflabs.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoSTLINK: add stlink v1 configuration
Mathias K [Mon, 23 Jan 2012 19:06:01 +0000 (20:06 +0100)]
STLINK: add stlink v1 configuration

Change-Id: I6b9de16879ff928d60e3c4a64731449275291cc2
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/397
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoSTLINK: Test device version (v1/v2) on usb transfers and add sg support
Mathias K [Wed, 25 Jan 2012 08:35:13 +0000 (09:35 +0100)]
STLINK: Test device version (v1/v2) on usb transfers and add sg support

This patch test the device version and differentiate between
v1 and v2 devices.

Change-Id: Ie79bf2c5534211493b004329fb6d5b9d4ea5453b
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/396
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoSTLINK: swd transport renamed and jtag+swim transport added
Mathias K [Wed, 25 Jan 2012 08:30:45 +0000 (09:30 +0100)]
STLINK: swd transport renamed and jtag+swim transport added

This patch add jtag support to the stlink driver add
two new transport types, JTAG and SWIM.

Change-Id: I7089d74250330be5c6a01c24066307641df7d11e
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/393
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agocfg: correct Stellaris LM3S811 config typo
Spencer Oliver [Wed, 25 Jan 2012 15:24:17 +0000 (15:24 +0000)]
cfg: correct Stellaris LM3S811 config typo

This only effects the older Stellaris LM3S811 kits (rev B and below).

Change-Id: Ie068cce7748fede9e7113ea63a69c96222c809fa
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/401
Tested-by: jenkins
7 years agoflash: fix stellaris class regression
Spencer Oliver [Wed, 25 Jan 2012 14:58:47 +0000 (14:58 +0000)]
flash: fix stellaris class regression

for some reason the following commit was incorrect
769064de4bd8fc59804c37a418b83fcdba6fd36f

Only the Sandstorm and Fury class should write this register.

Change-Id: Ie18f1da6e9b59fb99cca47aa93c7f2fee447ccea
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/400
Tested-by: jenkins
7 years agostlink: add missing memory check handlers
Spencer Oliver [Tue, 24 Jan 2012 15:07:59 +0000 (15:07 +0000)]
stlink: add missing memory check handlers

Change-Id: I502575ab77c0c87ffebb56ec3d78905f7fcf7cc5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/398
Tested-by: jenkins
7 years agoflash: cleanup/reformat fm3 flash driver
Fujitsu FM3 Application Team [Fri, 2 Dec 2011 11:28:29 +0000 (12:28 +0100)]
flash: cleanup/reformat fm3 flash driver

Signed-off-by: Fujitsu FM3 Application Team <openocd.fseu@de.fujitsu.com>
Change-Id: Iaf0bacfa5438a0213a65a3d60e7d461965a5a1ac
Reviewed-on: http://openocd.zylin.com/249
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoNAND: Misleading report of erased blocks
Timo Ketola [Tue, 17 Jan 2012 08:47:11 +0000 (10:47 +0200)]
NAND: Misleading report of erased blocks

For example, when blocks 2 and 3 were erased, openocd reported "erased blocks 2 to 4". That should be "2 to 3", I think.

Change-Id: Icece63dedd3dd931b70fa73616819a19572e39de
Signed-off-by: Timo Ketola <timo@exertus.fi>
Reviewed-on: http://openocd.zylin.com/385
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoi.MX25: Set OOB size (MXC NFC)
Timo Ketola [Tue, 17 Jan 2012 08:42:19 +0000 (10:42 +0200)]
i.MX25: Set OOB size (MXC NFC)

SPAS register (OOB size) is left wrong after reset with respect to 2KiB page NAND chip. That will lead to ECC errors after 'reset halt'.

Change-Id: If5a4685cb8d6be35879453951611ef1059da219c
Signed-off-by: Timo Ketola <timo@exertus.fi>
Reviewed-on: http://openocd.zylin.com/384
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoi.MX25: Add support for i.MX25 NAND Flash Controller
Timo Ketola [Tue, 17 Jan 2012 08:36:02 +0000 (10:36 +0200)]
i.MX25: Add support for i.MX25 NAND Flash Controller

This patch is based on Erik Ahlén's work on i.MX35 NFC support. Basically it redefines the CCM.RCSR register which is in a different address in i.MX25.

Change-Id: Ia6faf9cb5efae5e564b72ef9a9b7c7f8bfde3ce0
Signed-off-by: Timo Ketola <timo@exertus.fi>
Reviewed-on: http://openocd.zylin.com/383
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agocfg: add missing Stellaris Blizzard info
Spencer Oliver [Fri, 20 Jan 2012 14:35:10 +0000 (14:35 +0000)]
cfg: add missing Stellaris Blizzard info

Change-Id: I1d6fb9a2ec8d87267a266f68c01ce032450e45d5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/392
Tested-by: jenkins
7 years agoflash: update stellaris_set_flash_timing for target class
Spencer Oliver [Tue, 17 Jan 2012 16:05:44 +0000 (16:05 +0000)]
flash: update stellaris_set_flash_timing for target class

stellaris_set_flash_timing should only be used for Sandstorm and Fury
device classes.

Change-Id: Ib5eff9d954c039f2c5726a8ecc3ee45d1694cfd3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/389
Tested-by: jenkins
7 years agoflash: cleanup stellaris device class detection
Spencer Oliver [Tue, 17 Jan 2012 16:04:53 +0000 (16:04 +0000)]
flash: cleanup stellaris device class detection

read the target class during probe and save for later use.

Change-Id: Ib3ad20edc7d206b7f434bdcc6b947e6a5f06dd1f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/388
Tested-by: jenkins
7 years agostlink: better handle target reset/events
Spencer Oliver [Fri, 13 Jan 2012 11:29:21 +0000 (11:29 +0000)]
stlink: better handle target reset/events

This makes the stlink target use the std armv7m_arch_state giving
consistent OpenOCD output.

Added debug entry handler so we get debug entry reason.

Change-Id: Ia3c1380fd5033a8e541b0d45a7c3559f1b05957d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/379
Tested-by: jenkins
7 years agostlink: enable cortex special reg writes
Spencer Oliver [Fri, 13 Jan 2012 11:23:27 +0000 (11:23 +0000)]
stlink: enable cortex special reg writes

Change-Id: I5aa02e8de6dd5ac5a6ca628ba4068decb200c689
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/378
Tested-by: jenkins
7 years agocleanup: rename armv4_5 to arm for readability
Spencer Oliver [Thu, 19 Jan 2012 10:06:37 +0000 (10:06 +0000)]
cleanup: rename armv4_5 to arm for readability

Nothing more than a name change, just to make reading
the code a bit simpler.

Change-Id: I73a16b7302b48ce07d9688162955aae71d11eb45
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/390
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoflash: print bank usage on failure
Spencer Oliver [Thu, 19 Jan 2012 15:08:50 +0000 (15:08 +0000)]
flash: print bank usage on failure

This makes use of the newly introduced usage field in the flash bank
structure.

Also remove the assertion if usage field is null and
lets print a DEBUG_LOG message instead.

Change-Id: I384bf0e2c444fcc99deef73aec9ef01149a91c76
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/391
Tested-by: jenkins
7 years agoflash: add missing stellaris device classes
Spencer Oliver [Mon, 16 Jan 2012 17:36:41 +0000 (17:36 +0000)]
flash: add missing stellaris device classes

This adds missing classes to the stellaris flash driver.

Change-Id: I90f2218479e5eb60950046fef04429b9529f7ddf
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/382
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agodoc: Update patch procedure
Timo Ketola [Tue, 17 Jan 2012 14:10:10 +0000 (16:10 +0200)]
doc: Update patch procedure

Change-Id: I3e50357b4ddaf483712bbac68b6427b31529f666
Signed-off-by: Timo Ketola <timo@exertus.fi>
Reviewed-on: http://openocd.zylin.com/387
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agotarget: move regmaps to armv7m.c
Spencer Oliver [Fri, 13 Jan 2012 10:45:36 +0000 (10:45 +0000)]
target: move regmaps to armv7m.c

This move will enable use to share with regmaps with the stlink target.

Change-Id: If8f41c7c53323d5074cb22ec3440530c1e402004
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/377
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agocmd: add missing usage vars
Spencer Oliver [Mon, 16 Jan 2012 13:35:23 +0000 (13:35 +0000)]
cmd: add missing usage vars

we should have caught them all - hopefully.

Change-Id: I35435317fccaf5ad0216244d69f76db6857bb582
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/381
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agobuild: fix broken make distcheck
Spencer Oliver [Mon, 16 Jan 2012 09:16:04 +0000 (09:16 +0000)]
build: fix broken make distcheck

0a4b27ec4bcb303547af68490f007d65a00bff02 commit forgot to update required
distcheck files.

Change-Id: I3a5b94d4548c02cb9c1fc371a6fdcc2a3854e9c7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/380
Tested-by: jenkins
7 years agou8500: linux rtos config
Michel JAOUEN [Fri, 6 Jan 2012 11:19:37 +0000 (12:19 +0100)]
u8500: linux rtos config

Change-Id: I21a9dcc5fb260095aed2217e467b74ebecb39afb
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/349
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : linux awareness
Michel JAOUEN [Wed, 11 Jan 2012 09:59:29 +0000 (10:59 +0100)]
rtos : linux awareness

Change-Id: I41294ccaa4a3cd253919c8b1b558205903bcb695
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/348
Tested-by: jenkins
Reviewed-by: Heythem Bouhaja <heythem.bouhaja-nonst@stericsson.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : create qsymbol interface and add str_to_hex interface
Michel JAOUEN [Tue, 3 Jan 2012 16:12:29 +0000 (17:12 +0100)]
rtos : create qsymbol interface and add str_to_hex interface

Change-Id: I1b26f7efd3ad4a060f772dd12408e77a03d93cea
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/347
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : receive reset info
Michel JAOUEN [Tue, 3 Jan 2012 15:38:03 +0000 (16:38 +0100)]
rtos : receive reset info

Change-Id: I03c64f50eed9bec43303bf47ac1f226a0e8dbd53
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/346
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : ps command
Michel JAOUEN [Tue, 3 Jan 2012 15:18:22 +0000 (16:18 +0100)]
rtos : ps command

Change-Id: I1b00b6d72f425826c33b0df7dd63114ce642ce93
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/345
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : smp support
Michel JAOUEN [Tue, 3 Jan 2012 15:12:50 +0000 (16:12 +0100)]
rtos : smp support

Change-Id: I583cddf5e62ed77f108786a085569ab8699ad50d
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/344
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : current_threadid move to rtos context
Michel JAOUEN [Tue, 3 Jan 2012 15:07:55 +0000 (16:07 +0100)]
rtos : current_threadid move to rtos context

Change-Id: I49d9d6d64c418be601d8723cb3eea9c3716ecb6b
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/343
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos :introduce possible overload by rtos of gdb_thread_packet
Michel JAOUEN [Tue, 3 Jan 2012 14:41:53 +0000 (15:41 +0100)]
rtos :introduce possible overload by rtos of gdb_thread_packet

Change-Id: I17381b581556fa75098a84699dbbf69423fe20eb
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/342
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos : remove unused parameter
Michel JAOUEN [Tue, 3 Jan 2012 14:34:14 +0000 (15:34 +0100)]
rtos : remove unused parameter

Change-Id: I98c9f28a0085bd4713b694181ab544777091eac6
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/341
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agocfg: fix typo in str730.cfg
John [Fri, 13 Jan 2012 09:56:36 +0000 (09:56 +0000)]
cfg: fix typo in str730.cfg

Change-Id: Ie0222b68b3d8dd21726ac4f0cd4106da0e0456dd
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/376
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
7 years agostlink: handle wrong initialization file if no layout was specified
Mathias K [Thu, 12 Jan 2012 16:33:05 +0000 (17:33 +0100)]
stlink: handle wrong initialization file if no layout was specified

This patch remove the hardcoded default layout and return an error
if no layout was specified in the configuration file.

Change-Id: I0e7833faa2dc194e727122840bcbdacd321cc4fd
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/369
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agostlink: add none 32bit memory read/write functions
Mathias K [Thu, 12 Jan 2012 20:07:57 +0000 (21:07 +0100)]
stlink: add none 32bit memory read/write functions

This patch add none 32bit memory read/write  functions.

Change-Id: Ie3a761cf006249b30d0691d1ea167d69a012c36a
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/367
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agostlink: add read/write 8bit memory
Mathias K [Thu, 12 Jan 2012 12:32:03 +0000 (13:32 +0100)]
stlink: add read/write 8bit memory

This patch add layout api funtions and implementation
to read/write 8bit memory.

Change-Id: I8d145eb07e5afa9ce1830578e57d80a80d21e7dc
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/366
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agobuild: fix broken commit
Spencer Oliver [Thu, 12 Jan 2012 22:00:09 +0000 (22:00 +0000)]
build: fix broken commit

fixes commit 04fe2ca5547f76686c7dc555f90510eed6fcc551

Change-Id: Id7fcb82fa1a445f1df21b8d98e945f7c0e08ec93
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/375
Tested-by: jenkins
7 years agostlink: correctly signal stlink_interface_open failure
Spencer Oliver [Thu, 12 Jan 2012 14:15:28 +0000 (14:15 +0000)]
stlink: correctly signal stlink_interface_open failure

give the user a error msg on open failure.

Change-Id: If4a57bac7f3e1746c2a05c7a96747a38da188041
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/368
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agoflash: stm32f2x incorrectly using 512 as max family size
Spencer Oliver [Mon, 9 Jan 2012 12:44:48 +0000 (12:44 +0000)]
flash: stm32f2x incorrectly using 512 as max family size

Change-Id: I2bac348c6d0baabd3d88335c5aa0a318ef66653a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/353
Tested-by: jenkins
7 years agoflash: detect stm32f4x device id errata
Spencer Oliver [Mon, 9 Jan 2012 13:00:22 +0000 (13:00 +0000)]
flash: detect stm32f4x device id errata

This allows us to detect a device arrata where the device id returned is
incorrect.

This issue only effects stm32f4x Rev A silicon.

Change-Id: Ic9f4985f9abf562f97322dcf484199f0a4eb01bb
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/354
Tested-by: jenkins
7 years agocmd: add missing usage var
Spencer Oliver [Mon, 9 Jan 2012 16:14:18 +0000 (16:14 +0000)]
cmd: add missing usage var

Change-Id: I0f05d643b0801b19cc3beb88f0d12d7e4c83ef9c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/356
Tested-by: jenkins
7 years agostlink: add dummy speed handlers
Spencer Oliver [Mon, 9 Jan 2012 14:43:26 +0000 (14:43 +0000)]
stlink: add dummy speed handlers

Change-Id: I0445be7867637728145941b06225dc0acc5380e8
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/355
Tested-by: jenkins
7 years agoflash: use correct device_id mask
Spencer Oliver [Mon, 9 Jan 2012 12:42:31 +0000 (12:42 +0000)]
flash: use correct device_id mask

The stm32 drivers have been using 0x7ff as the DEV_ID mask, this should
have been 0xfff.

Change-Id: I232469620969d6dd1b9a2a2aa15ec18b947dbb05
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/352
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
7 years agooptimize: replace while loop by memcpy
Mathias K [Tue, 10 Jan 2012 22:21:30 +0000 (23:21 +0100)]
optimize: replace while loop by memcpy

There is no need to use a while loop here. This patch simple copy
the last bytes with the system function.

Change-Id: Ibda72dca449746efeba5a1af2e45c5990f9cf347
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/364
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agobuild: remove unused variables
Spencer Oliver [Mon, 9 Jan 2012 22:04:03 +0000 (22:04 +0000)]
build: remove unused variables

detected by clang.

Change-Id: Id9effcc5437870f37fecd33803f7753c6eca53d6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/361
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agoflash: pre-check flash unlock for stm32f2x
Bruno FLEURETTE [Tue, 10 Jan 2012 15:21:00 +0000 (16:21 +0100)]
flash: pre-check flash unlock for stm32f2x

add checking of the current flash lock status before performing the unlock sequence (which would fail in an unlocked state)

Change-Id: I693294c9cd2f59e69cb5bf3338120052fd680b1e
Signed-off-by: Bruno FLEURETTE <bruno.fleurette@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/363
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agoxsvf: fix clang warning
Spencer Oliver [Mon, 9 Jan 2012 21:43:27 +0000 (21:43 +0000)]
xsvf: fix clang warning

clang reports 'Function call argument is an uninitialized value'.

Change-Id: I50f4a7932b59930a5f1e3ece70b12c59e85ea3c6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/360
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agotarget: fix missing semihosting return path
Spencer Oliver [Mon, 9 Jan 2012 21:35:19 +0000 (21:35 +0000)]
target: fix missing semihosting return path

bug nicely caught by clang.

Change-Id: I7abf0fdd76666fb3eb1c83e3edfd01e0da485ffe
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/359
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoflash: support stm32f4x flash
Spencer Oliver [Wed, 4 Jan 2012 22:55:49 +0000 (22:55 +0000)]
flash: support stm32f4x flash

This uses the same controller as the stm32f2x family.

Change-Id: I931a9ceb0cd1219514d14b8b59475179e543dd0f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/338
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agoflash: use stm32f2x flash size register
Spencer Oliver [Wed, 4 Jan 2012 22:43:59 +0000 (22:43 +0000)]
flash: use stm32f2x flash size register

Use the flash size register to calculate flash info.

Change-Id: Ia230db8a08d440710c030a9e5001f20561c9f420
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/337
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agodocs: add initial st-link info
Spencer Oliver [Thu, 5 Jan 2012 10:31:03 +0000 (10:31 +0000)]
docs: add initial st-link info

Change-Id: I213bf26dec582fd8e273e604d43a6e849599dd50
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/340
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agocontrib: add stlink udev rules
Spencer Oliver [Wed, 4 Jan 2012 14:50:57 +0000 (14:50 +0000)]
contrib: add stlink udev rules

Change-Id: I3f11de8abfaf8821311a7aa0fd237006de3c2792
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/333
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agocfg: add stlink pseudo stm32 targets
Spencer Oliver [Wed, 4 Jan 2012 21:48:21 +0000 (21:48 +0000)]
cfg: add stlink pseudo stm32 targets

Change-Id: I71253c2090162b1214bbbb37396735bb9128f920
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/334
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
7 years agocfg: use consistent chipname
Spencer Oliver [Tue, 3 Jan 2012 21:42:49 +0000 (21:42 +0000)]
cfg: use consistent chipname

Change-Id: I41e0788f830d5ece13e6231a99d5b4013c9c678f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/331
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
7 years agodocs: fix doxygen build
Spencer Oliver [Fri, 6 Jan 2012 17:15:38 +0000 (17:15 +0000)]
docs: fix doxygen build

This fixes issues with newer versions of doxygen

Change-Id: Id5d3287857cb154e26064b4ce37f6b72117d5254
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/350
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agortos: fix bug in error handling
Øyvind Harboe [Sat, 7 Jan 2012 08:55:54 +0000 (09:55 +0100)]
rtos: fix bug in error handling

checking for != ERROR_FAIL is broken.

Change-Id: Id7085afac653bb9c38d08928227a9ea402d8e6e9
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/351
Tested-by: jenkins
Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agodocs: whitespace fixes
Spencer Oliver [Thu, 5 Jan 2012 10:30:39 +0000 (10:30 +0000)]
docs: whitespace fixes

Change-Id: I9c6c7017ce3077bb131a05ea9b53a115506c94d9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/339
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoChange return value on error.
Mathias K [Fri, 16 Dec 2011 06:48:39 +0000 (07:48 +0100)]
Change return value on error.

On wrong parameters a error is signalized to the calling function.

Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960
Signed-off-by: Mathias K <kesmtp@freenet.de>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/282
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agostlink: update to use ERROR_COMMAND_SYNTAX_ERROR
Spencer Oliver [Wed, 4 Jan 2012 17:36:56 +0000 (17:36 +0000)]
stlink: update to use ERROR_COMMAND_SYNTAX_ERROR

Change-Id: I21b669b09df65b56659d2f057cf389ba7b1cecfa
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/335
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoflash: introduce .usage field for nand and nor flash driver structure
Øyvind Harboe [Wed, 28 Dec 2011 12:10:52 +0000 (13:10 +0100)]
flash: introduce .usage field for nand and nor flash driver structure

Change-Id: I47e7ec8fa8c70d2addc3aa52d7c97e9e1e7bb662
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/301
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoretire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR
Øyvind Harboe [Wed, 28 Dec 2011 11:56:08 +0000 (12:56 +0100)]
retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR

Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/300
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agocommand: print BUG warning when usage is missing
Mathias K [Sat, 24 Dec 2011 14:26:12 +0000 (15:26 +0100)]
command: print BUG warning when usage is missing

These error messages will prompt patches to be submitted for missing
.usage or empty fields. All of the below must be resolved before next
release.

The Jim defined commands are excluded from this checklist because the
help text can be set later than during command registration.

strlen(.usage) == 0 means that the command expects no arguments.

Updates to this patch in Gerrit to fix problems below are most
welcome. Anyone can push updated versions of a patch to Gerrit. If
there are no further updates to this patch within a week, it will be
pushed to the master branch to prompt more fixes.

These were caught by launching OpenOCD.

Error: BUG: command 'command' does not have the '.usage' field filled out
Error: BUG: command 'script' does not have the '.usage' field filled out
Error: BUG: command 'power_restore' does not have the '.usage' field filled out
Error: BUG: command 'srst_deasserted' does not have the '.usage' field filled out
Error: BUG: command 'measure_clk' does not have the '.usage' field filled out
Error: BUG: command 'exit' does not have the '.usage' field filled out
Error: BUG: command 'shutdown' does not have the '.usage' field filled out
Error: BUG: command 'gdb_sync' does not have the '.usage' field filled out
Error: BUG: command 'interface_list' does not have the '.usage' field filled out
Error: BUG: command 'target' does not have the '.usage' field filled out
Error: BUG: command 'target init' does not have the '.usage' field filled out
Error: BUG: command 'flash' does not have the '.usage' field filled out
Error: BUG: command 'flash init' does not have the '.usage' field filled out
Error: BUG: command 'flash banks' does not have the '.usage' field filled out
Error: BUG: command 'nand' does not have the '.usage' field filled out
Error: BUG: command 'nand drivers' does not have the '.usage' field filled out
Error: BUG: command 'nand init' does not have the '.usage' field filled out
Error: BUG: command 'pld' does not have the '.usage' field filled out
Error: BUG: command 'pld init' does not have the '.usage' field filled out
Error: BUG: command 'mflash' does not have the '.usage' field filled out
Error: BUG: command 'mflash init' does not have the '.usage' field filled out
Error: BUG: command 'dummy' does not have the '.usage' field filled out
Error: BUG: command 'dummy foo' does not have the '.usage' field filled out
Error: BUG: command 'scan_chain' does not have the '.usage' field filled out
Error: BUG: command 'jtag' does not have the '.usage' field filled out
Error: BUG: command 'jtag init' does not have the '.usage' field filled out
Error: BUG: command 'arm' does not have the '.usage' field filled out
Error: BUG: command 'arm reg' does not have the '.usage' field filled out
Error: BUG: command 'etm' does not have the '.usage' field filled out
Error: BUG: command 'arm7_9' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu arm' does not have the '.usage' field filled out
Error: BUG: command 'arm reg' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu etm' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu arm7_9' does not have the '.usage' field filled out
Error: BUG: command 'target_request' does not have the '.usage' field filled out
^C
oyvind@fierce:~/openocd$ openocd -c "interface dummy" -f board/at91eb40a.cfg 2>&1 | grep -w BUG
Error: BUG: command 'command' does not have the '.usage' field filled out
Error: BUG: command 'script' does not have the '.usage' field filled out
Error: BUG: command 'power_restore' does not have the '.usage' field filled out
Error: BUG: command 'srst_deasserted' does not have the '.usage' field filled out
Error: BUG: command 'measure_clk' does not have the '.usage' field filled out
Error: BUG: command 'exit' does not have the '.usage' field filled out
Error: BUG: command 'shutdown' does not have the '.usage' field filled out
Error: BUG: command 'gdb_sync' does not have the '.usage' field filled out
Error: BUG: command 'interface_list' does not have the '.usage' field filled out
Error: BUG: command 'target' does not have the '.usage' field filled out
Error: BUG: command 'target init' does not have the '.usage' field filled out
Error: BUG: command 'flash' does not have the '.usage' field filled out
Error: BUG: command 'flash init' does not have the '.usage' field filled out
Error: BUG: command 'flash banks' does not have the '.usage' field filled out
Error: BUG: command 'nand' does not have the '.usage' field filled out
Error: BUG: command 'nand drivers' does not have the '.usage' field filled out
Error: BUG: command 'nand init' does not have the '.usage' field filled out
Error: BUG: command 'pld' does not have the '.usage' field filled out
Error: BUG: command 'pld init' does not have the '.usage' field filled out
Error: BUG: command 'mflash' does not have the '.usage' field filled out
Error: BUG: command 'mflash init' does not have the '.usage' field filled out
Error: BUG: command 'dummy' does not have the '.usage' field filled out
Error: BUG: command 'dummy foo' does not have the '.usage' field filled out
Error: BUG: command 'scan_chain' does not have the '.usage' field filled out
Error: BUG: command 'jtag' does not have the '.usage' field filled out
Error: BUG: command 'jtag init' does not have the '.usage' field filled out
Error: BUG: command 'arm' does not have the '.usage' field filled out
Error: BUG: command 'arm reg' does not have the '.usage' field filled out
Error: BUG: command 'etm' does not have the '.usage' field filled out
Error: BUG: command 'arm7_9' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu arm' does not have the '.usage' field filled out
Error: BUG: command 'arm reg' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu etm' does not have the '.usage' field filled out
Error: BUG: command 'at91eb40a.cpu arm7_9' does not have the '.usage' field filled out
Error: BUG: command 'target_request' does not have the '.usage' field filled out

Change-Id: I2c3e529530a15d2295a1950ffc59e8f2fc661012
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/299
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agobuild: fix make dist
Spencer Oliver [Tue, 3 Jan 2012 22:53:47 +0000 (22:53 +0000)]
build: fix make dist

add missing files to distribution after previous commit.

Change-Id: I0e4b278c090c71d15dd059b6755c9821427cc8ab
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/332
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agoAdd STM32F2X/STLINK target config file.
Mathias K [Sat, 17 Dec 2011 09:18:07 +0000 (10:18 +0100)]
Add STM32F2X/STLINK target config file.

Change-Id: I02161fa05da993b5b966c31a706667d1bd91935d
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/287
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoAdd STLINK/V2 interface config file.
Mathias K [Sat, 17 Dec 2011 09:17:40 +0000 (10:17 +0100)]
Add STLINK/V2 interface config file.

Change-Id: I6df27ce619a5938ef854ff89bf76c6de4e122204
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/286
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoSTM32 ST-LINK target initial release
Mathias K [Sat, 17 Dec 2011 08:51:09 +0000 (09:51 +0100)]
STM32 ST-LINK target initial release

STM32 ST-LINK target  added.

Change-Id: Ibe2b7a3c0d5a8cf73d8680d6019adbdb62d68fa2
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/279
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoST-LINK USB initial release
Mathias K [Wed, 21 Dec 2011 16:03:11 +0000 (17:03 +0100)]
ST-LINK USB initial release

ST-Link USB support added.

Change-Id: I2812646f2895b1529ff3f911edbdce7fa0051c8f
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/261
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoMake jim functions public accessible.
Mathias K [Thu, 15 Dec 2011 10:36:33 +0000 (11:36 +0100)]
Make jim functions public accessible.

Change this 2 functions to make it accessible for other tcl interfaces.

Change-Id: Idee07fcc779941b037a05a40c021e3fb0b1a4a7a
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/277
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoMake cortex_m3 functions public accessible.
Mathias K [Thu, 15 Dec 2011 10:38:35 +0000 (11:38 +0100)]
Make cortex_m3 functions public accessible.

Change this functions to make it accessible for other
target implementations.

Change-Id: Ib41fc793cfb4de5439af026c2e8b52e7a9507c85
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/278
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoadd private data pointer to the tap interface
Mathias K [Thu, 1 Dec 2011 11:16:54 +0000 (12:16 +0100)]
add private data pointer to the tap interface

This will give us the ability to add special data structures and new
interfaces without rewriting the complete jtag engine.

Change-Id: I21a6e1daa96c5f4d111bbb734c7c1fbc2eaee227
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/244
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agohelper: fix arm11 help text
Spencer Oliver [Tue, 20 Dec 2011 16:15:52 +0000 (16:15 +0000)]
helper: fix arm11 help text

This fixes a long standing bug: see Trac #4
Increased help text recursion limit and added LOG_DEBUG so we can
catch future errors like this.

Change-Id: I5fac95c4486eaddaf1e88a27ecb1835168f87711
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/291
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agobuild: fix mingw build issues
Spencer Oliver [Fri, 23 Dec 2011 11:59:15 +0000 (11:59 +0000)]
build: fix mingw build issues

8901fca0270fec41b12c30c7dbd806d460548c5b broke the build under mingw, this
fixes that.

Change-Id: I22b91e220dac3b68cc576b65a9f1b8711e64263a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/298
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoRenamed mx2.{c,h} to mxc.{c,h} and added copyright notice
Erik Ahlén [Wed, 14 Dec 2011 09:32:53 +0000 (10:32 +0100)]
Renamed mx2.{c,h} to mxc.{c,h} and added copyright notice

Change-Id: I07a280acdce58b8af4a145cd6beafccbb59f20d7
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/272
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoDocumentation for mxc NAND flash controller
Erik Ahlén [Wed, 14 Dec 2011 12:05:06 +0000 (13:05 +0100)]
Documentation for mxc NAND flash controller

Change-Id: I9e552491e8b4737c01e4f8ae2b9a582b6ff2bc5d
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/273
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoAdded support for i.MX35 NAND Flash Controller (v2)
Erik Ahlén [Wed, 14 Dec 2011 09:10:29 +0000 (10:10 +0100)]
Added support for i.MX35 NAND Flash Controller (v2)

Change-Id: I7237ec29792b6a7ee690751fa7e6cba0846d5aa8
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/271
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoAdded command to enable/disable/query BI-swap for MXC NAND
Erik Ahlén [Tue, 13 Dec 2011 10:47:49 +0000 (11:47 +0100)]
Added command to enable/disable/query BI-swap for MXC NAND

Change-Id: Ifa3eb739afe0760a974b57c5a17cc3bf7704ba79
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/270
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoMade BI-swap optional in mxc.
Erik Ahlén [Tue, 13 Dec 2011 10:39:52 +0000 (11:39 +0100)]
Made BI-swap optional in mxc.

Change-Id: Ibdf3b1e415adcf1fdb38de25fe05da726ef58ca4
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/269
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoAdded board type as a parameter to mx2 NFC as they have different base addresses.
Erik Ahlén [Tue, 13 Dec 2011 10:19:17 +0000 (11:19 +0100)]
Added board type as a parameter to mx2 NFC as they have different base addresses.

Change-Id: I7bc326e9a8d9f6817f046a7faeebede567c53dd2
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/268
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoat91sam3XXX.cfg: Configure JTAG clock to 500 kHz.
Ulf Samuelsson [Tue, 20 Dec 2011 18:09:26 +0000 (19:09 +0100)]
at91sam3XXX.cfg: Configure JTAG clock to 500 kHz.

This affects all configurations including target/at91sam3XXX.cfg

Change-Id: I2c1e1edf0986d30e63f109604a38bf402ded369e
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
Reviewed-on: http://openocd.zylin.com/292
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoOlimex-ARM-USB-OCD-H: Add udev rule
Ulf Samuelsson [Tue, 20 Dec 2011 13:47:43 +0000 (14:47 +0100)]
Olimex-ARM-USB-OCD-H: Add udev rule

Change-Id: Ifc9a1f7fa9445e05560c335b5bba3a33caeccc51
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
Reviewed-on: http://openocd.zylin.com/288
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agojtag: only if an in_value storage is provided will the captured IR value be checked
Øyvind Harboe [Thu, 22 Dec 2011 12:14:00 +0000 (13:14 +0100)]
jtag: only if an in_value storage is provided will the captured IR value be checked

added comments and removed bogus assert.

Change-Id: Ic7aa56570a84834b1265df03d25a47fd11c4d626
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/297
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agogit should ignore patches from format-patch
Ulf Samuelsson [Wed, 21 Dec 2011 21:15:30 +0000 (22:15 +0100)]
git should ignore patches from format-patch

Change-Id: Iafce872fa7559180834532ba80941dec3db7d079
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
Reviewed-on: http://openocd.zylin.com/295
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agojtag: stop using sharp corner of JTAG API
Øyvind Harboe [Wed, 14 Dec 2011 06:30:33 +0000 (07:30 +0100)]
jtag: stop using sharp corner of JTAG API

this particular edge case of the JTAG API will no
longer be supported.

the in_value buffer must be provided by the caller when
the callback needs the buffer.

Change-Id: I552c72a64af6875f4aa4fa9b923194dcf3b57b64
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/265
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agojtag: make caller always allocate buffer
Øyvind Harboe [Tue, 13 Dec 2011 22:44:34 +0000 (23:44 +0100)]
jtag: make caller always allocate buffer

simplifies the API and there is only one remaining user at this point.

Is the implementation busted where the check does not actually happen
now?

Change-Id: I776a43766f5576a08df320f6fe41a2750d101bde
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/264
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agojtag: retire jtag_alloc_in_value32
Øyvind Harboe [Tue, 13 Dec 2011 22:28:10 +0000 (23:28 +0100)]
jtag: retire jtag_alloc_in_value32

no longer used after arm7/9tdmi.c stopped using it.

Change-Id: I65bfe67641970e63e8276cbd378aa68f5701a8d9
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/263
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agojtag: retire jtag_alloc_in_value32 API
Øyvind Harboe [Tue, 13 Dec 2011 22:21:06 +0000 (23:21 +0100)]
jtag: retire jtag_alloc_in_value32 API

not needed, reduce area of interface and sharp edges to
API.

Change-Id: I5347352e7595686634bd0de13fcf6de6e55027b0
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/262
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoSTM32F2x: check flash unlock, add mass erase
Mathias K [Fri, 16 Dec 2011 06:51:17 +0000 (07:51 +0100)]
STM32F2x: check flash unlock, add mass erase

Add verification of the flash unlock sequence and return an error if the
flash is still locked.
Add mass erase subcommand.

Change-Id: Id586b1eaf983a3f25b933847dd6608c15bf0b07e
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/281
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agobuild: libusb use AC_CHECK_HEADER
Spencer Oliver [Mon, 12 Dec 2011 15:15:00 +0000 (15:15 +0000)]
build: libusb use AC_CHECK_HEADER

use AC_CHECK_HEADER rather than AC_CHECK_HEADERS so that we do not
generate a unrequired HAVE_LIBUSB_1_0_LIBUSB_H define.

Change-Id: I23a93d3813716dce797ca1514fdcb84533454c31
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/259
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agobuild: update to using new AC_OUTPUT macro
Spencer Oliver [Mon, 12 Dec 2011 15:11:06 +0000 (15:11 +0000)]
build: update to using new AC_OUTPUT macro

Change-Id: I4937fac73345a85fcad62a2aeb0a106bd4a62467
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/258
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
7 years agobuild: correctly quote m4 parameters
Spencer Oliver [Mon, 12 Dec 2011 15:10:26 +0000 (15:10 +0000)]
build: correctly quote m4 parameters

Change-Id: If7ccb52c107cb4ad7629ffcf237f9003f60e63d0
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/257
Tested-by: jenkins
7 years agoRenamed mx2/imx27 to mxc.
Erik Ahlén [Tue, 13 Dec 2011 09:24:11 +0000 (10:24 +0100)]
Renamed mx2/imx27 to mxc.

Renamed all functions, enums, structs and defines from mx2/imx27 to mxc. This is in preparation of adding support for mx35 NFC(v2).

Change-Id: I92ad23f0cfab605215bbf0d5846c5c288423facf
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/267
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoIndentation and white space fixes.
Erik Ahlén [Tue, 13 Dec 2011 08:34:33 +0000 (09:34 +0100)]
Indentation and white space fixes.

Change-Id: Iffbaefea4f3d5e9b56b3c36496b44969d7c07e82
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/266
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoInitialize return value.
Mathias K [Thu, 15 Dec 2011 16:43:23 +0000 (17:43 +0100)]
Initialize return value.

Because no future error checking we will initialize the pointer to
a know value.

Change-Id: I2466eeb413245a398927ec9f3742c2a9a3d51baf
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/283
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agocheckpatch: fix false indent trigger
Spencer Oliver [Fri, 16 Dec 2011 10:48:53 +0000 (10:48 +0000)]
checkpatch: fix false indent trigger

we have changed the indent to 4 to match OpenOCD coding style.

Change-Id: I4870a3410eb20fc2f6df6a3e5891d4d4e598131a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/285
Tested-by: jenkins
7 years agocheckpatch: disable extern and switch indent checks
Spencer Oliver [Fri, 16 Dec 2011 10:04:43 +0000 (10:04 +0000)]
checkpatch: disable extern and switch indent checks

We allow extern's in c files so disable checkpatch checks.

Change-Id: Ia649585cd70ec45289c4edaf26c1fd773a140db4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/284
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agoChange checkpatch.pl tab expanding to 4 characters.
Erik Ahlén [Thu, 15 Dec 2011 08:43:37 +0000 (09:43 +0100)]
Change checkpatch.pl tab expanding to 4 characters.

The C coding style guide says that tab width is 4 characters but checkpatch.pl expands tabs to 8 characters which produces false negatives.

Change-Id: Ibdabbb55269b7cf6bcd38042cccb8bd235e42ce2
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/275
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
7 years agoUpdating FSF Address.
Dean Glazeski [Thu, 15 Dec 2011 06:24:29 +0000 (00:24 -0600)]
Updating FSF Address.

Change-Id: Ic6895b89e8798a3636333dd50a8540eae643719a
Signed-off-by: Dean Glazeski <dnglaze@gmail.com>
Reviewed-on: http://openocd.zylin.com/274
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agozy1000: fix crash in JTAG over TCP/IP
Øyvind Harboe [Tue, 13 Dec 2011 16:57:20 +0000 (17:57 +0100)]
zy1000: fix crash in JTAG over TCP/IP

disable asynchronous callbacks and reads as minidriver requires
reads and callbacks to be synchronous.

Could possibly be fixed by some design work.

Change-Id: I7ca79a551085b2e8ba6928e1762d1baed6e95d4b
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/260
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
7 years agojlink libusb-1.0 driver.
Mauro Gamba [Mon, 21 Nov 2011 16:57:22 +0000 (17:57 +0100)]
jlink libusb-1.0 driver.

jlink modified to use the new usb abstaction layer.
During the configuration process we can select if use
libusb0 or libusb-1.0 library for this driver.

Change-Id: I70bc9ee2f89b7597e0f64ea80cad7f1b9070f01b
Signed-off-by: Mauro Gamba <maurillo71@gmail.com>
Reviewed-on: http://openocd.zylin.com/236
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>