]> git.sur5r.net Git - openocd/log
openocd
13 years agogitmodules: use http protocol for git2cl module
Edgar Grimberg [Sun, 20 Feb 2011 23:07:39 +0000 (00:07 +0100)]
gitmodules: use http protocol for git2cl module

Use the http protocol for git2cl module, as it makes it easier for the
firewall safe mirror to keep all submodules firewall safe.

Signed-off-by: Edgar Grimberg <edgar.grimberg@gmail.com>
13 years agofix compile error under MinGW
SimonQian [Fri, 18 Feb 2011 12:39:55 +0000 (20:39 +0800)]
fix compile error under MinGW

13 years agostm32: add ID for medium density device Rev Z
Luca Ellero [Thu, 17 Feb 2011 20:51:32 +0000 (20:51 +0000)]
stm32: add ID for medium density device Rev Z

stm32-discovery evaluation board (STM32F100RBTB6):
reading device id register (0xE0042000) returns 0x10010420

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agoarm_adi_v5: add/move apsel member in struct adiv5_dap
Luca Ellero [Mon, 14 Feb 2011 21:46:53 +0000 (21:46 +0000)]
arm_adi_v5: add/move apsel member in struct adiv5_dap

This patch tries to make some order in "apsel" mess.
"dap apsel" command was quite useless (and broken) by itself.
With this patch we can use it to select between AHB or APB memory access
(previous patch 05ab8bdb813acdcd74afa71d6656c2df816cb230 was somehow broken).

- moves member apsel (in struct adiv5_dap) to ap_current
- adds apsel member

this strange choice is made trying to keep coherence in "dap apsel" command
 and to keep compatibility with other code (for example cortex_a8).

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agodsp563xx: minor fixes, code cleanup
Mathias K [Thu, 17 Feb 2011 08:11:25 +0000 (09:11 +0100)]
dsp563xx: minor fixes, code cleanup

This patch move the dsp563xx_target_create function to the
related code block. Also the target examine function was added
and the register cache is initialized in a separate function. The
missing functionality to invalidate the x memory context on memory
writes was also added.

13 years agodsp563xx_once: Correct wrong return value on jtag communication errors
Mathias K [Thu, 17 Feb 2011 08:05:42 +0000 (09:05 +0100)]
dsp563xx_once: Correct wrong return value on jtag communication errors

This patch change the return value on a jtag communication error
to TARGET_UNKNOWN because this function should return the current
target status and not a error code from the underlying api call.
Also the validity of the jtag_status is extended to all static
bits in this value.

13 years ago- remove pipeline context, use once register instead - fix wrong register write in...
Mathias K [Tue, 15 Feb 2011 19:17:10 +0000 (20:17 +0100)]
- remove pipeline context, use once register instead - fix wrong register write in resume and step function - add more conditional branch handling

13 years agolpc32xx: Flash driver
Bjarne Steinsbo [Tue, 15 Feb 2011 19:23:40 +0000 (20:23 +0100)]
lpc32xx: Flash driver

Based on the lpc3180 driver, but released as a separate driver for two reasons:
 1) I don't have an lpc3180 to test it against, so it might unintentionally break compatibility.
 2) It's using a different OOB layout than lpc3180.

Rewritten so that it no longer borrows code from the NXP CDL library.  Instead borrowing code from the u-boot port to lpc32xx, written by Kevin Wells.

Tested on lpc3250 (Hitex LPC3250-Stick).  OOB layout is compatible with LPCLinux.

13 years ago- add parameter flush to the once api to signalize if the jtag queue need to be flush...
Mathias K [Tue, 15 Feb 2011 16:25:10 +0000 (17:25 +0100)]
- add parameter flush to the once api to signalize if the jtag queue need to be flushed after the command

13 years ago- add bulk memory write function - execute jtag queue at the end of the memory transfer
Mathias K [Tue, 15 Feb 2011 15:59:23 +0000 (16:59 +0100)]
- add bulk memory write function - execute jtag queue at the end of the memory transfer

13 years agodsp563xx_once: Correct definition of JTAG_INSTR_CLAMP
Phil Fong [Tue, 15 Feb 2011 19:17:33 +0000 (20:17 +0100)]
dsp563xx_once: Correct definition of JTAG_INSTR_CLAMP

 I've been working on Rodrigo on adding support to flash
Freescale dsp56800e devices and have been looking at the
dsp563xx code.  I think the define for the JTAG CLAMP
instruction in dsp563xx_once.c is incorrect.  It should
be 0x05 according the Freescale AN2074 (and is also
0x05 in the dsp568xx according to AN1935).  It won't
actually change anything in OpenOCD since this define
is not used anywhere (as far as I can tell).

13 years agoft2232: add functions for ft2232 set data bits high/low byte command
Mathias K [Sun, 13 Feb 2011 12:21:42 +0000 (13:21 +0100)]
ft2232: add functions for ft2232 set data bits high/low byte command

reduce duplication. No change in behavior.

13 years agocortex_a9: move dap_ap_select to arm_avi_v5
Luca Ellero [Sat, 12 Feb 2011 11:54:42 +0000 (11:54 +0000)]
cortex_a9: move dap_ap_select to arm_avi_v5

dap_ap_select was used in the code at various points, but that can lead to
confusion, without any knowledge of what AP is really selected at some
points.
Some bugs derive from this (for example md/mw doesn't work well after
issueing "dap apsel" command).
Moving it to arm_adi_v5.c (using  mem_ap_sel* functions instead of mem_ap_*)
make the code more clear and more easier to maintain.
In the future it should be made "static" to avoid its use outside arm_adi_v5

One further benefit is the various goto has been removed as well

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agoarm_adi_v5: add wrapping transfer functions with selection of ap
Luca Ellero [Sat, 12 Feb 2011 11:54:41 +0000 (11:54 +0000)]
arm_adi_v5: add wrapping transfer functions with selection of ap

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agoarm_adi_v5: add transfer functions prototypes with selection of ap
Luca Ellero [Sat, 12 Feb 2011 11:54:40 +0000 (11:54 +0000)]
arm_adi_v5: add transfer functions prototypes with selection of ap

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agocortex_a9: check if MMU is enabled on APB read/write memory
Luca Ellero [Sat, 12 Feb 2011 11:54:39 +0000 (11:54 +0000)]
cortex_a9: check if MMU is enabled on APB read/write memory

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agocortex_a9: check target halted on APB read/write memory
Luca Ellero [Sat, 12 Feb 2011 11:54:38 +0000 (11:54 +0000)]
cortex_a9: check target halted on APB read/write memory

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agocortex_a9: trivial fixes
Luca Ellero [Sat, 12 Feb 2011 11:54:37 +0000 (11:54 +0000)]
cortex_a9: trivial fixes

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agobuikd: fix cygwin -mno-cygwin build error
Spencer Oliver [Thu, 10 Feb 2011 13:57:30 +0000 (13:57 +0000)]
buikd: fix cygwin -mno-cygwin build error

Remove duplicate inline that causes certain versions of gcc to choke.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agocortex_a9: implement read/write memory through APB-AP
Luca Ellero [Wed, 9 Feb 2011 20:36:14 +0000 (20:36 +0000)]
cortex_a9: implement read/write memory through APB-AP

This patch adds read/write capability to memory addresses not
accessible through AHB-AP (for example "boot ROM code").

To select AHB or APB, a "dap apsel" command must be issued:
dap apsel 0 -> following memory accesses are through AHB
dap apsel 1 -> following memory accesses are through APB

NOTE: at the moment APB memory accesses are very slow, compared
      to AHB accesses. Work has to be done to get it faster (for
      example LDR/STR instead od LDRB/STRB)

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agocortex_a9: fix dap_ap_select() usage
Aaron Carroll [Thu, 3 Feb 2011 01:06:14 +0000 (12:06 +1100)]
cortex_a9: fix dap_ap_select() usage

Save, select and restore AP in cortex_a9_step and cortex_a9_init_debug_access.
Fixes a bug where the wrong AP is selected after a reset.

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agobuspirate: Fix command parsing, fix errors to have more sense.
Michal Demin [Tue, 8 Feb 2011 10:59:01 +0000 (11:59 +0100)]
buspirate: Fix command parsing, fix errors to have more sense.

Signed-off-by: Michal Demin <michaldemin@gmail.com>
13 years agoperformance: committed wrong version of buf_set_buf optimization
Mathias K [Tue, 8 Feb 2011 10:06:56 +0000 (11:06 +0100)]
performance: committed wrong version of buf_set_buf optimization

oops...

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoomap4430: Add JRC TAPID for PandaBoard REV EA1 (PEAP platforms)
Luca Ellero [Mon, 7 Feb 2011 22:47:15 +0000 (22:47 +0000)]
omap4430: Add JRC TAPID for PandaBoard REV EA1 (PEAP platforms)

PandaBoard REV EA1 (Panda Early Adopter Program) has a different ID.
This patch add alternate REV EA1 TAP id to configuration file

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agodsp563xx: add x, y and p memory access
Mathias K [Thu, 3 Feb 2011 16:58:52 +0000 (17:58 +0100)]
dsp563xx: add x, y and p memory access

Hello,

this patch add commands to access to x,y and p memory. For run time optimization some local jtag
function was changed to static inline.

Regards,

Mathias

13 years agocortex_a8/a9: fix some comments
Luca Ellero [Tue, 8 Feb 2011 05:16:54 +0000 (05:16 +0000)]
cortex_a8/a9: fix some comments

Signed-off-by: Luca Ellero <lroluk@gmail.com>
13 years agobuf_set_buf around 30% speed increase
Mathias K [Fri, 4 Feb 2011 20:15:22 +0000 (21:15 +0100)]
buf_set_buf around 30% speed increase

Also i have checked the input of this function and in many cases
a simple byte copy is possible.

I have added this check now and is it possible the buffer is
copied byte by byte and not bit by bit.

With byte boundary input the test looks like this:

buf_set_buf 0x02000000 iteration test:
runtime (seconds): old: 6.828559 new: 0.436191 diff: 6.392368
runtime (seconds): old: 6.853636 new: 0.430389 diff: 6.423247
runtime (seconds): old: 6.794985 new: 0.423065 diff: 6.371920

Without:

buf_set_buf 0x02000000 iteration test:
runtime (seconds): old: 6.370869 new: 5.552624 diff: 0.818245
runtime (seconds): old: 6.420730 new: 5.665887 diff: 0.754843
runtime (seconds): old: 6.583306 new: 5.599021 diff: 0.984285

Regards,

Mathias

13 years agostm32x: add support for STM32F20x
Øyvind Harboe [Mon, 31 Jan 2011 11:32:07 +0000 (12:32 +0100)]
stm32x: add support for STM32F20x

ready for wider testing and comments on basic erase + programming.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agomore changes to dsp563xx code
Mathias K [Tue, 1 Feb 2011 12:00:59 +0000 (13:00 +0100)]
more changes to dsp563xx code

Hello,

this patch adds the missing cpu registers and the correct read/write register functions and fixed
most of the halt/step/resume issues. The complete missing error propagation was added.

+ fix tab/spaces

Regards,

Mathias

13 years ago24bit buffer support
Mathias K [Wed, 2 Feb 2011 16:38:38 +0000 (17:38 +0100)]
24bit buffer support

Hello,

this patch add 24bit support to the target buffer functions and little/big endian functions.

Regards,

Mathias

13 years agoomap4430: fix reset sequence
Aaron Carroll [Wed, 2 Feb 2011 07:16:26 +0000 (18:16 +1100)]
omap4430: fix reset sequence

* Write to the PRM reset control register should have been 'phys';
* Setup empty reset-assert handlers for the M3's, since the board-level reset
  takes care of them;
* Remove the dbginit cruft, because it gets called implicitly on reset.

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agocortex_m3: allow scripts to override reset
Aaron Carroll [Wed, 2 Feb 2011 07:16:25 +0000 (18:16 +1100)]
cortex_m3: allow scripts to override reset

If a handler for the reset-assert event it present, skip the usual reset
handling.  This is needed, for example, for board-level resets.

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agoerror: remove debug output when reporting errors
Øyvind Harboe [Mon, 31 Jan 2011 11:09:46 +0000 (12:09 +0100)]
error: remove debug output when reporting errors

The user does not need to know or care about "command handlers".

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocfi: use ARM32 machine code on all CPUs but Cortex M3
Øyvind Harboe [Mon, 31 Jan 2011 09:30:48 +0000 (10:30 +0100)]
cfi: use ARM32 machine code on all CPUs but Cortex M3

ARM11 broke with aa61a3b3d8b6acad19050987835ec05f3d298bdb
as the code only checked for arm 7/9.

CFI probably needs work for non-ARM targets but perhaps
not adding working area memory to e.g. MIPS will give
the default slow CFI support.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoTCL configs for OMAP4430 and Pandaboard
Aaron Carroll [Mon, 24 Jan 2011 07:06:48 +0000 (18:06 +1100)]
TCL configs for OMAP4430 and Pandaboard

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agocortex_a9: add source files for Cortex A9 support.
Aaron Carroll [Mon, 24 Jan 2011 07:06:46 +0000 (18:06 +1100)]
cortex_a9: add source files for Cortex A9 support.

add target and build support for A9

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agoarm_dpm: add some SCR/RCR macros
Aaron Carroll [Mon, 24 Jan 2011 07:06:45 +0000 (18:06 +1100)]
arm_dpm: add some SCR/RCR macros

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agoAdd '-coreid' target option to support multiple cores per TAP.
Aaron Carroll [Mon, 24 Jan 2011 07:06:44 +0000 (18:06 +1100)]
Add '-coreid' target option to support multiple cores per TAP.

ARM Cortex-A9 multi-core chips expose a single TAP/DAP which connects
to both cores.  The '-coreid' option selects which core the target
should connect to.

Note that at present, OpenOCD can connect to either core, but not both
simulatenously, until ADI contexts can be shared.

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agoAdd cscope to .gitignore
Aaron Carroll [Mon, 24 Jan 2011 07:06:43 +0000 (18:06 +1100)]
Add cscope to .gitignore

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agoopenocd.texi: minor fixes in Reset Configuration
Aaron Carroll [Fri, 28 Jan 2011 06:20:24 +0000 (17:20 +1100)]
openocd.texi: minor fixes in Reset Configuration

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
13 years agoadd cortex-r4 etm id to dap info
Mathias K [Thu, 27 Jan 2011 08:16:09 +0000 (09:16 +0100)]
add cortex-r4 etm id to dap info

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years ago- add xds100v2 configuaration file
Mathias K [Wed, 26 Jan 2011 16:35:56 +0000 (17:35 +0100)]
- add xds100v2 configuaration file

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoFixed small mistakes in at91sam3 info command
Thomas Schmid [Tue, 25 Jan 2011 16:15:30 +0000 (08:15 -0800)]
Fixed small mistakes in at91sam3 info command

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoadd basic TI xds100v2 support
Mathias K [Wed, 26 Jan 2011 12:28:48 +0000 (12:28 +0000)]
add basic TI xds100v2 support

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agofix segfault from stack corruption in ahbap_debugport_init
Andreas Fritiofson [Wed, 26 Jan 2011 12:13:14 +0000 (12:13 +0000)]
fix segfault from stack corruption in ahbap_debugport_init

ahbap_debugport_init was queueing reads to a local stack variable but
didn't execute the queue before returning. Since the result of the reads
are not used anyway, it's better to pass NULL as the destination instead of
a dummy variable. I changed this throughout the function, even for the
reads that were actually executed.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agostellaris: automatically generate and update device IDs
Eric Wetzel [Tue, 18 Jan 2011 16:17:22 +0000 (11:17 -0500)]
stellaris: automatically generate and update device IDs

Added a Perl script to contrib that uses the header files in StellarisWare complete Firmware Development Package provided by TI/Luminary to generate a new list of device IDs

Used Perl script and revision 6734 of TI/Luminary StellarisWare to update device IDs

13 years agoFlash driver for em357
Erik Botö [Mon, 10 Jan 2011 18:13:52 +0000 (19:13 +0100)]
Flash driver for em357

Hi,

I took the stm32x NOR flash driver and adapted it for the Ember EM357
chip. This chip is very similar to em351 and stm32w so the driver
should be easily extended to support those as well if anyone can get
their hands on some of those for testing.

changelog:
Added NOR flash driver em357

Best regards,
Erik Botö

13 years agostr9xpec: Find flash controller from the chain.
Santeri Salko [Thu, 13 Jan 2011 13:21:06 +0000 (15:21 +0200)]
str9xpec: Find flash controller from the chain.

Find the flash controller by position since it is before the core,
not after it.

This fixes the problem that str9xpec enable_turbo (or any other
str9xpec command) did not work. (See my post in
http://forum.sparkfun.com/viewtopic.php?f=18&t=25542)

Signed-off-by: Santeri Salko <santeri.salko@gmail.com>
13 years agotransport: fix transport command args gaffe
simon qian [Thu, 13 Jan 2011 07:27:42 +0000 (08:27 +0100)]
transport: fix transport command args gaffe

the wrong index of argv. argv[0] is the command itself,
argv[1] the the transport to select.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agotransport: fix LOG_DEBUG gaffe
simon qian [Thu, 13 Jan 2011 07:25:22 +0000 (08:25 +0100)]
transport: fix LOG_DEBUG gaffe

LOG_DEBUG() arguments are only evaluated when DEBUG logging
is enabled, do not use arguments that have side effects
like foo++.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agocfi: fix release build warnings
Spencer Oliver [Mon, 10 Jan 2011 09:37:18 +0000 (09:37 +0000)]
cfi: fix release build warnings

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agonit: more LOG_* \n fixes
Eric Wetzel [Thu, 6 Jan 2011 02:54:12 +0000 (21:54 -0500)]
nit: more LOG_* \n fixes

Remove extra \n from LOG_DEBUG, LOG_INFO, and LOG_WARNING messages

Remove LOG_INFO_N
LOG_INFO_N was only used once and had a \n at the end

Change LOG_USER_N calls that end with \n to LOG_USER

13 years agoAdd another level of procedures to LPC2xxx initialization - procedures for specific...
Freddie Chopin [Sat, 8 Jan 2011 11:29:31 +0000 (12:29 +0100)]
Add another level of procedures to LPC2xxx initialization - procedures for specific targets (setup_lpc<number>) take core clock and adapter clock as parameters. This way "constant" parameters (flash size and type, CPUTAPID, etc.) do not need to be copied if one wishes to change the "variable" parameters - like the core clock or adapter clock - in a board config file or somewhere else.

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
13 years agopresent CM3 Trace agenda
David Brownell [Sun, 9 Jan 2011 02:11:12 +0000 (18:11 -0800)]
present CM3 Trace agenda

13 years agoAdd common LPC2xxx setup procedure, use in all LPC2xxx files.
Freddie Chopin [Thu, 6 Jan 2011 11:48:05 +0000 (12:48 +0100)]
Add common LPC2xxx setup procedure, use in all LPC2xxx files.

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
13 years agocfi: use safer arch detection
Spencer Oliver [Thu, 6 Jan 2011 10:35:59 +0000 (10:35 +0000)]
cfi: use safer arch detection

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoloader: update loader src for armv7-m arch
Spencer Oliver [Thu, 6 Jan 2011 10:35:02 +0000 (10:35 +0000)]
loader: update loader src for armv7-m arch

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoAdd the support for the armv7m arch.
Jonathan Dumaresq [Wed, 5 Jan 2011 16:48:41 +0000 (11:48 -0500)]
Add the support for the armv7m arch.

Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
13 years agoAdd the contrib file for the armv7m arch
Jonathan Dumaresq [Wed, 5 Jan 2011 16:47:58 +0000 (11:47 -0500)]
Add the contrib file for the armv7m arch

Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
13 years agonit: do not add \n at end of LOG_ERROR
Eric Wetzel [Wed, 5 Jan 2011 19:24:54 +0000 (14:24 -0500)]
nit: do not add \n at end of LOG_ERROR

Fixed in many other places, and submitted in response to Øyvind's invitation.

13 years agomips32: add fastdata loader working area
Spencer Oliver [Tue, 4 Jan 2011 12:29:49 +0000 (12:29 +0000)]
mips32: add fastdata loader working area

Add a working area that is preserved between calls to
mips_m4k_bulk_write_memory - this gives us a speed increase
of approx 3kb/sec during flash writes to the pic32mx.

This area is released during a resume/reset.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agotarget: change working area free data type
Spencer Oliver [Fri, 24 Dec 2010 11:17:09 +0000 (11:17 +0000)]
target: change working area free data type

We only use the struct working_area member 'free' as a
true/false type so might as well use a bool data type.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agonit: do not add \n at end of LOG_ERROR
Øyvind Harboe [Mon, 3 Jan 2011 12:37:38 +0000 (13:37 +0100)]
nit: do not add \n at end of LOG_ERROR

This is done in many other places as well, patch
to fix gratefully accepted!

13 years agoerror handling: the error number is not part of the user interface
Øyvind Harboe [Mon, 3 Jan 2011 12:30:28 +0000 (13:30 +0100)]
error handling: the error number is not part of the user interface

Do not propagate error number to user. This is for internal
programming purposes only. Error messages to the user is
reported as text via LOG_ERROR().

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoactux3.cfg: add function to setup for u-boot debugging
Michael Schwingen [Sun, 2 Jan 2011 20:01:22 +0000 (21:01 +0100)]
actux3.cfg: add function to setup for u-boot debugging

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agocfi_protect is not implemented on Spansion flashes (many do not even have protection...
Michael Schwingen [Sun, 2 Jan 2011 20:01:20 +0000 (21:01 +0100)]
cfi_protect is not implemented on Spansion flashes (many do not even have protection bits). Demote from error to warning, so that common board code can use "flash write_image erase unlock" regardless of the flash type.

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agonon-CFI flash code uses data from CFI structures. Make sure that timeouts are filled...
Michael Schwingen [Sun, 2 Jan 2011 20:01:19 +0000 (21:01 +0100)]
non-CFI flash code uses data from CFI structures. Make sure that timeouts are filled in on non-CFI flashes, and print CFI information in all cases, nut just on CFI flashes.

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agosvf: implement sleep for RUNTEST min_time
Jon Povey [Sun, 2 Jan 2011 14:52:48 +0000 (23:52 +0900)]
svf: implement sleep for RUNTEST min_time

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
min_time was effectively ignored, I needed it to program a Lattice MachXO
which uses a RUNTEST to wait for an erase operation, amongst other things.

With this patch pauses happen and I can program the device with an SVF
generated in LSC ispVM (with "Rev D Standard" checked to suppress
nonstandard LOOP statements)

13 years agosvf: fix USAGE and related error reporting
Jon Povey [Sun, 2 Jan 2011 14:52:47 +0000 (23:52 +0900)]
svf: fix USAGE and related error reporting

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
13 years agoNAND/S3CXXXX: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:09 +0000 (19:46 +0800)]
NAND/S3CXXXX: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/ORION: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:08 +0000 (19:46 +0800)]
NAND/ORION: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/NUC910: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:07 +0000 (19:46 +0800)]
NAND/NUC910: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/MX3: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:06 +0000 (19:46 +0800)]
NAND/MX3: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/MX2: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:05 +0000 (19:46 +0800)]
NAND/MX2: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/LPC3180: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:04 +0000 (19:46 +0800)]
NAND/LPC3180: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/DAVINCI: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:03 +0000 (19:46 +0800)]
NAND/DAVINCI: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/AT91SAM9: remove private "target" copy
Antonio Borneo [Fri, 31 Dec 2010 11:46:02 +0000 (19:46 +0800)]
NAND/AT91SAM9: remove private "target" copy

Remove "target" form private data, and use
common one in struct nand_block.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/TCL: prepare for common "target" reference
Antonio Borneo [Fri, 31 Dec 2010 11:46:01 +0000 (19:46 +0800)]
NAND/TCL: prepare for common "target" reference

Every NAND driver keeps private copy of "target"
structure.
Prepare infostructure to move private "target"
copy in common/shared struct nand_device.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/TCL: fix segfault on syntax error
Antonio Borneo [Fri, 31 Dec 2010 11:18:11 +0000 (19:18 +0800)]
NAND/TCL: fix segfault on syntax error

Fix segfault if incomplete command "nand device dummy"
is executed.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/CORE: Comment use of alive_sleep()
Antonio Borneo [Fri, 31 Dec 2010 11:18:10 +0000 (19:18 +0800)]
NAND/CORE: Comment use of alive_sleep()

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoNAND/CORE: Replace decimal dot in messages
Antonio Borneo [Fri, 31 Dec 2010 11:18:09 +0000 (19:18 +0800)]
NAND/CORE: Replace decimal dot in messages

Table of NAND devices reports operating voltage.
Replace comma with proper decimal dot.

Øyvind: "." is correct for UK/US, but incorrect for
many other languages. OpenOCD is not localized at this
point, so sticking to "." for US/UK should be OK.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoflash/nand: review NAND driver interface
Antonio Borneo [Fri, 31 Dec 2010 11:18:08 +0000 (19:18 +0800)]
flash/nand: review NAND driver interface

From struct nand_flash_controller :
- remove unused field register_commands;
- remove field controller_ready, exported but
  never referenced.
Remove dead code pointed by controller_ready.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 years agoCORTEX A8: Fix broken CPU identification
Marek Vasut [Thu, 30 Dec 2010 03:54:24 +0000 (04:54 +0100)]
CORTEX A8: Fix broken CPU identification

This patch fixes the issue where the OMAP CPU (and possibly others) was mistaken
for iMX51 and therefore had misadjusted debug base.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoCompilation Warnings on OS X 10.5
Andrew MacIsaac [Wed, 29 Dec 2010 20:15:48 +0000 (12:15 -0800)]
Compilation Warnings on OS X 10.5

I received a number of "-Wshadow" related warnings (treated as errors) while
trying to build on OS X Leopard.  In addition, there were two miscellaneous
other warnings in the flash drivers.  Attached are two patches which correct
these issues and the commit messages to accompany them.

My system has the following configuration (taken from uname -a):

Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;
root:xnu-1228.15.4~1/RELEASE_I386 i386

=== Werror_patch.txt Commit Message ===
compilation: fixes for -Wshadow warnings on OS X

These changes fix -Wshadow compilation warnings on OS X 10.5.8

Compiled with the following configure command:

../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink
--enable-ft2232_libftdi

=== flash_patch.txt Commit Message ===
compilation: fixes for flash driver warnings on OS X

These changes fix two compilation warnings on OS X 10.5.8:

../../../../src/flash/nor/at91sam3.c:2767: warning: redundant redeclaration
of 'at91sam3_flash'
../../../../src/flash/nor/at91sam3.c:101: warning: previous declaration of
'at91sam3_flash' was here

and

../../../../src/flash/nor/stmsmi.c:205: warning: format not a string literal
and no format arguments

Compiled with the following configure command:

../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink
--enable-ft2232_libftdi
===

Andrew

13 years agowarning: fix warning where GCC didn't catch a doubly declared global structure
Øyvind Harboe [Wed, 29 Dec 2010 21:14:43 +0000 (22:14 +0100)]
warning: fix warning where GCC didn't catch a doubly declared global structure

Why hasn't earlier versions of GCC caught this? Bug?

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agowarnings: use more 'const' for char *
Øyvind Harboe [Wed, 29 Dec 2010 21:07:21 +0000 (22:07 +0100)]
warnings: use more 'const' for char *

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agotarget: do not expose error numbers to users
Øyvind Harboe [Wed, 29 Dec 2010 19:58:30 +0000 (20:58 +0100)]
target: do not expose error numbers to users

error numbers are only reported at DEBUG log levels and
used internally, they are not part of the user interface.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoinitial SWD transport (SWD infrastructure #2)
David Brownell [Sat, 25 Dec 2010 02:50:41 +0000 (18:50 -0800)]
initial SWD transport (SWD infrastructure #2)

This piggy backs on JTAG so it's not yet pretty, but that
seems unavoidable so far given today's OpenOCD internals.

SWD init and data transfer  are unfinished and untested, but
that should cause no regressions, and will be addressed by
the time drivers start using this infrastructure.  Checking
in whould get the code working better sooner, and turn up any
structural/architectural issues while they're easier to fix.

The debug adapter drivers will provide simple SWD driver
structs with methods that kick in as needed (instead of JTAG).
So far just one adapter driver has been updated (not yet
ready to use or circulate).

The biggest issues are probably
  - fault handling, where the ARM Debug Interface V5 pipelining
    needs work in both JTAG and SWD modes and
  - missing  rewrite of block I/O code to work on both of our
Cortex-ready transports (Current code is  hard-wired to JTAG);
relates also to the pipelining issue.
  - omitted support to activate/deactivate SWO/SWV trace (this is
    technically trivial, but configuring what to trace is NOT.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
----

 doc/openocd.texi        |   17 ++
 src/jtag/core.c         |    3
 src/jtag/interface.h    |    4
 src/jtag/jtag.h         |    2
 src/jtag/swd.h          |  114 +++++++++++++++++++
 src/jtag/tcl.c          |    2
 src/target/adi_v5_swd.c |  281 ++++++++++++++++++++++++++++++++++++++++++++++--
 src/target/arm_adi_v5.c |    8 +
 src/target/arm_adi_v5.h |    3
 9 files changed, 425 insertions(+), 9 deletions(-)

13 years agostm32x : always use valid flash base address
Spencer Oliver [Thu, 23 Dec 2010 13:10:15 +0000 (13:10 +0000)]
stm32x : always use valid flash base address

This change matches the previous behaviour of using the known
flash address.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agoflash: print flash bank name on flash info cmd
Spencer Oliver [Thu, 23 Dec 2010 12:39:22 +0000 (12:39 +0000)]
flash: print flash bank name on flash info cmd

The flash bank name is a required element in adding flash banks,
however other than looking at the config file there is no way of
getting the name used in openocd.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agostm32: fix reversed option byte write
Spencer Oliver [Thu, 23 Dec 2010 12:06:12 +0000 (12:06 +0000)]
stm32: fix reversed option byte write

This has been a long standing bug that has never been spotted.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agostm32: update option bytes for stm32xl family
Spencer Oliver [Thu, 23 Dec 2010 12:04:53 +0000 (12:04 +0000)]
stm32: update option bytes for stm32xl family

add supoort for xl family boot bank option.
The option byte handling will be cleaned up in a later patch.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agostm32: add stm32 xl family flash support
Spencer Oliver [Wed, 22 Dec 2010 17:20:11 +0000 (17:20 +0000)]
stm32: add stm32 xl family flash support

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agostm32: add dual flash bank support
Spencer Oliver [Wed, 22 Dec 2010 17:18:14 +0000 (17:18 +0000)]
stm32: add dual flash bank support

This patch adds the initial dual flash bank support for devices such
as the stm32xl family.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agocontrib: change stm32 flash loader extension
Spencer Oliver [Fri, 10 Dec 2010 10:35:03 +0000 (10:35 +0000)]
contrib: change stm32 flash loader extension

As the stm32 flash loader now uses the preprocessor change extension
so that it used by default.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
13 years agolpc2148: redo to the new target configuration scheme
Øyvind Harboe [Tue, 21 Dec 2010 19:59:12 +0000 (20:59 +0100)]
lpc2148: redo to the new target configuration scheme

Define a proc which PCBs can easily override.

Also demonstrates how to add multiple TAP exepcted-id's
using arguments.

Added 0x3f0f0f0f as expected TAP-id. Old LPC2148 silicon
I happened to have on my desk?

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoconfig: add init_targets proc that is executed just before init
Øyvind Harboe [Sun, 19 Dec 2010 10:24:51 +0000 (11:24 +0100)]
config: add init_targets proc that is executed just before init

this allows configuration scripts to export a init_targets proc
rather than setting up the target directly.

This allows for new conventions in how to set up target vs. board
script and how to transfer default settings between board and
target scripts.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agobootstrap: by default the submodules are initialized
Øyvind Harboe [Wed, 22 Dec 2010 13:29:34 +0000 (14:29 +0100)]
bootstrap: by default the submodules are initialized

use "nosubmodule" to skip setting up submodules.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoserver: remove error value from LOG_INFO
Øyvind Harboe [Tue, 21 Dec 2010 13:07:17 +0000 (14:07 +0100)]
server: remove error value from LOG_INFO

the error values is not part of the interface to the user,
so they should never be printed in LOG_INFO or LOG_USER.

Printing them in LOG_DEBUG() rarely makes much sense but
is OK.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agotcl/interface/flashlink.cfg: Fix broken ST URL
Tormod Volden [Sun, 19 Dec 2010 22:39:05 +0000 (23:39 +0100)]
tcl/interface/flashlink.cfg: Fix broken ST URL