]> git.sur5r.net Git - openocd/log
openocd
14 years agochange #include "target_request.h" to <target/target_request.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:51 +0000 (04:14 -0800)]
change #include "target_request.h" to <target/target_request.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "target_request.h"

the following form should be used.

#include <target/target_request.h>

The exception is from .c files in the same directory.

14 years agochange #include "target.h" to <target/target.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:51 +0000 (04:14 -0800)]
change #include "target.h" to <target/target.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "target.h"

the following form should be used.

#include <target/target.h>

The exception is from .c files in the same directory.

14 years agochange #include "register.h" to <target/register.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:50 +0000 (04:14 -0800)]
change #include "register.h" to <target/register.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "register.h"

the following form should be used.

#include <target/register.h>

The exception is from .c files in the same directory.

14 years agochange #include "mips_ejtag.h" to <target/mips_ejtag.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:49 +0000 (04:14 -0800)]
change #include "mips_ejtag.h" to <target/mips_ejtag.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "mips_ejtag.h"

the following form should be used.

#include <target/mips_ejtag.h>

The exception is from .c files in the same directory.

14 years agochange #include "mips32_pracc.h" to <target/mips32_pracc.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:49 +0000 (04:14 -0800)]
change #include "mips32_pracc.h" to <target/mips32_pracc.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "mips32_pracc.h"

the following form should be used.

#include <target/mips32_pracc.h>

The exception is from .c files in the same directory.

14 years agochange #include "mips32.h" to <target/mips32.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:48 +0000 (04:14 -0800)]
change #include "mips32.h" to <target/mips32.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "mips32.h"

the following form should be used.

#include <target/mips32.h>

The exception is from .c files in the same directory.

14 years agochange #include "image.h" to <target/image.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:47 +0000 (04:14 -0800)]
change #include "image.h" to <target/image.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "image.h"

the following form should be used.

#include <target/image.h>

The exception is from .c files in the same directory.

14 years agochange #include "etm.h" to <target/etm.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:46 +0000 (04:14 -0800)]
change #include "etm.h" to <target/etm.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "etm.h"

the following form should be used.

#include <target/etm.h>

The exception is from .c files in the same directory.

14 years agochange #include "embeddedice.h" to <target/embeddedice.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:45 +0000 (04:14 -0800)]
change #include "embeddedice.h" to <target/embeddedice.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "embeddedice.h"

the following form should be used.

#include <target/embeddedice.h>

The exception is from .c files in the same directory.

14 years agochange #include "breakpoints.h" to <target/breakpoints.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:44 +0000 (04:14 -0800)]
change #include "breakpoints.h" to <target/breakpoints.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "breakpoints.h"

the following form should be used.

#include <target/breakpoints.h>

The exception is from .c files in the same directory.

14 years agochange #include "avrt.h" to <target/avrt.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:44 +0000 (04:14 -0800)]
change #include "avrt.h" to <target/avrt.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "avrt.h"

the following form should be used.

#include <target/avrt.h>

The exception is from .c files in the same directory.

14 years agochange #include "armv7m.h" to <target/armv7m.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:43 +0000 (04:14 -0800)]
change #include "armv7m.h" to <target/armv7m.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "armv7m.h"

the following form should be used.

#include <target/armv7m.h>

The exception is from .c files in the same directory.

14 years agochange #include "armv7a.h" to <target/armv7a.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:43 +0000 (04:14 -0800)]
change #include "armv7a.h" to <target/armv7a.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "armv7a.h"

the following form should be used.

#include <target/armv7a.h>

The exception is from .c files in the same directory.

14 years agochange #include "armv4_5_mmu.h" to <target/armv4_5_mmu.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:42 +0000 (04:14 -0800)]
change #include "armv4_5_mmu.h" to <target/armv4_5_mmu.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "armv4_5_mmu.h"

the following form should be used.

#include <target/armv4_5_mmu.h>

The exception is from .c files in the same directory.

14 years agochange #include "armv4_5_cache.h" to <target/armv4_5_cache.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:42 +0000 (04:14 -0800)]
change #include "armv4_5_cache.h" to <target/armv4_5_cache.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "armv4_5_cache.h"

the following form should be used.

#include <target/armv4_5_cache.h>

The exception is from .c files in the same directory.

14 years agochange #include "armv4_5.h" to <target/armv4_5.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:42 +0000 (04:14 -0800)]
change #include "armv4_5.h" to <target/armv4_5.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "armv4_5.h"

the following form should be used.

#include <target/armv4_5.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm_jtag.h" to <target/arm_jtag.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:41 +0000 (04:14 -0800)]
change #include "arm_jtag.h" to <target/arm_jtag.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm_jtag.h"

the following form should be used.

#include <target/arm_jtag.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm_dpm.h" to <target/arm_dpm.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:40 +0000 (04:14 -0800)]
change #include "arm_dpm.h" to <target/arm_dpm.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm_dpm.h"

the following form should be used.

#include <target/arm_dpm.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm_adi_v5.h" to <target/arm_adi_v5.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:39 +0000 (04:14 -0800)]
change #include "arm_adi_v5.h" to <target/arm_adi_v5.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm_adi_v5.h"

the following form should be used.

#include <target/arm_adi_v5.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm9tdmi.h" to <target/arm9tdmi.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:39 +0000 (04:14 -0800)]
change #include "arm9tdmi.h" to <target/arm9tdmi.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm9tdmi.h"

the following form should be used.

#include <target/arm9tdmi.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm966e.h" to <target/arm966e.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:38 +0000 (04:14 -0800)]
change #include "arm966e.h" to <target/arm966e.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm966e.h"

the following form should be used.

#include <target/arm966e.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm7tdmi.h" to <target/arm7tdmi.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:37 +0000 (04:14 -0800)]
change #include "arm7tdmi.h" to <target/arm7tdmi.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm7tdmi.h"

the following form should be used.

#include <target/arm7tdmi.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm7_9_common.h" to <target/arm7_9_common.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:37 +0000 (04:14 -0800)]
change #include "arm7_9_common.h" to <target/arm7_9_common.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm7_9_common.h"

the following form should be used.

#include <target/arm7_9_common.h>

The exception is from .c files in the same directory.

14 years agochange #include "arm11.h" to <target/arm11.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:36 +0000 (04:14 -0800)]
change #include "arm11.h" to <target/arm11.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "arm11.h"

the following form should be used.

#include <target/arm11.h>

The exception is from .c files in the same directory.

14 years agochange #include "algorithm.h" to <target/algorithm.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:35 +0000 (04:14 -0800)]
change #include "algorithm.h" to <target/algorithm.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "algorithm.h"

the following form should be used.

#include <target/algorithm.h>

The exception is from .c files in the same directory.

14 years agochange #include "minidriver.h" to <jtag/minidriver.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:32 +0000 (04:14 -0800)]
change #include "minidriver.h" to <jtag/minidriver.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "minidriver.h"

the following form should be used.

#include <jtag/minidriver.h>

The exception is from .c files in the same directory.

14 years agochange #include "jtag.h" to <jtag/jtag.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:31 +0000 (04:14 -0800)]
change #include "jtag.h" to <jtag/jtag.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "jtag.h"

the following form should be used.

#include <jtag/jtag.h>

The exception is from .c files in the same directory.

14 years agochange #include "interface.h" to <jtag/interface.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:31 +0000 (04:14 -0800)]
change #include "interface.h" to <jtag/interface.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "interface.h"

the following form should be used.

#include <jtag/interface.h>

The exception is from .c files in the same directory.

14 years agochange #include "commands.h" to <jtag/commands.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:30 +0000 (04:14 -0800)]
change #include "commands.h" to <jtag/commands.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "commands.h"

the following form should be used.

#include <jtag/commands.h>

The exception is from .c files in the same directory.

14 years agochange #include "types.h" to <helper/types.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:30 +0000 (04:14 -0800)]
change #include "types.h" to <helper/types.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "types.h"

the following form should be used.

#include <helper/types.h>

The exception is from .c files in the same directory.

14 years agochange #include "time_support.h" to <helper/time_support.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:29 +0000 (04:14 -0800)]
change #include "time_support.h" to <helper/time_support.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "time_support.h"

the following form should be used.

#include <helper/time_support.h>

The exception is from .c files in the same directory.

14 years agochange #include "replacements.h" to <helper/replacements.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:28 +0000 (04:14 -0800)]
change #include "replacements.h" to <helper/replacements.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "replacements.h"

the following form should be used.

#include <helper/replacements.h>

The exception is from .c files in the same directory.

14 years agochange #include "membuf.h" to <helper/membuf.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:28 +0000 (04:14 -0800)]
change #include "membuf.h" to <helper/membuf.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "membuf.h"

the following form should be used.

#include <helper/membuf.h>

The exception is from .c files in the same directory.

14 years agochange #include "log.h" to <helper/log.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:28 +0000 (04:14 -0800)]
change #include "log.h" to <helper/log.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "log.h"

the following form should be used.

#include <helper/log.h>

The exception is from .c files in the same directory.

14 years agochange #include "jim.h" to <helper/jim.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:27 +0000 (04:14 -0800)]
change #include "jim.h" to <helper/jim.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "jim.h"

the following form should be used.

#include <helper/jim.h>

The exception is from .c files in the same directory.

14 years agochange #include "ioutil.h" to <helper/ioutil.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:26 +0000 (04:14 -0800)]
change #include "ioutil.h" to <helper/ioutil.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "ioutil.h"

the following form should be used.

#include <helper/ioutil.h>

The exception is from .c files in the same directory.

14 years agochange #include "fileio.h" to <helper/fileio.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:26 +0000 (04:14 -0800)]
change #include "fileio.h" to <helper/fileio.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "fileio.h"

the following form should be used.

#include <helper/fileio.h>

The exception is from .c files in the same directory.

14 years agochange #include "configuration.h" to <helper/configuration.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:26 +0000 (04:14 -0800)]
change #include "configuration.h" to <helper/configuration.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "configuration.h"

the following form should be used.

#include <helper/configuration.h>

The exception is from .c files in the same directory.

14 years agochange #include "command.h" to <helper/command.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:25 +0000 (04:14 -0800)]
change #include "command.h" to <helper/command.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "command.h"

the following form should be used.

#include <helper/command.h>

The exception is from .c files in the same directory.

14 years agochange #include "binarybuffer.h" to <helper/binarybuffer.h>
Zachary T Welch [Thu, 3 Dec 2009 12:14:25 +0000 (04:14 -0800)]
change #include "binarybuffer.h" to <helper/binarybuffer.h>

Changes from the flat namespace to heirarchical one.  Instead of writing:

#include "binarybuffer.h"

the following form should be used.

#include <helper/binarybuffer.h>

The exception is from .c files in the same directory.

14 years agonormalize headers to make changing easier
Zachary T Welch [Thu, 3 Dec 2009 12:20:31 +0000 (04:20 -0800)]
normalize headers to make changing easier

These headers need minor tweaks to paves the way for wholesale
scripted coversion of the header files.

14 years agochange autoconf #include in configure.in
Zachary T Welch [Sun, 29 Nov 2009 00:25:30 +0000 (16:25 -0800)]
change autoconf #include in configure.in

Updates "system.h" and "replacements.h" with <helpers/system.h> and
<helpers/replacements.h> respectively.

14 years agoallow #include directives to use module name
Zachary T Welch [Tue, 24 Nov 2009 22:59:16 +0000 (14:59 -0800)]
allow #include directives to use module name

Includes the src directory in the search path, so header files may be
migrated from:

  #include "foo.h"

to
  #include <module/foo.h>

which is more conducive for installation.

14 years agoferoceon.c should be part of ARM7_9_SRC
Nicolas Pitre [Thu, 3 Dec 2009 07:06:10 +0000 (02:06 -0500)]
feroceon.c should be part of ARM7_9_SRC

The Feroceon and Dragonite cores are similar to the ARM926 and ARM966
cores respectively.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
14 years agoremove #if HAVE_JTAG_INTERFACE_H from minidriver.h
Zachary T Welch [Thu, 3 Dec 2009 01:30:33 +0000 (17:30 -0800)]
remove #if HAVE_JTAG_INTERFACE_H from minidriver.h

Adds two "minidriver_imp.h" files, so the right one is allowed to be
"#included" by the Makefile logic.

14 years agomove jtag drivers to src/jtag/drivers
Zachary T Welch [Thu, 3 Dec 2009 01:18:05 +0000 (17:18 -0800)]
move jtag drivers to src/jtag/drivers

Moves JTAG interface drivers to src/jtag/drivers/,
Adds src/jtag/drivers/Makefile.am.
Builds libocdjtagdrivers.la.

Flattens the rlink driver files into the drivers/ directory, adding
the 'rlink_' prefix or '.rlink' suffix as appropriate.

14 years agomove nor drivers to src/flash/nor
Zachary T Welch [Wed, 2 Dec 2009 23:54:15 +0000 (15:54 -0800)]
move nor drivers to src/flash/nor

Moves NOR flash drivers to 'src/flash/nor/'.
Adds 'src/flash/nor/Makefile.am'.
Builds 'libocdflashnor.la'.

14 years agomove nand drivers to src/flash/nand/
Zachary T Welch [Wed, 2 Dec 2009 06:37:11 +0000 (22:37 -0800)]
move nand drivers to src/flash/nand/

Moves NAND drivers to src/flash/nand/.
Adds src/flash/nand/Makefile.am.
Builds libocdflashnand.la.

14 years agoARM11: don't expose DSCR
David Brownell [Thu, 3 Dec 2009 06:57:08 +0000 (22:57 -0800)]
ARM11: don't expose DSCR

Remove the remaining extra copy of DSCR, and the register cache
of which it was a part.  That cache wasn't a very safe, or even
necessary, idea; it was essentialy letting debugger-private state
be manipulated by Tcl code that couldn't know how to do it right.

This makes the "reg" output of an ARM11 resemble what most other
ARM cores produce ... forward motion in the "make ARM11 work like
the rest of the ARM cores" Jihad!

14 years agoARM11: store a clean copy of DSCR
David Brownell [Thu, 3 Dec 2009 06:57:08 +0000 (22:57 -0800)]
ARM11: store a clean copy of DSCR

Just store a clean copy of DSCR in the per-CPU struct, so we
trivially pass a pointer to a recent copy.  This replaces the
previous "last_dscr" and cleans up most of the related calling
conventions ... but it doesn't remove the other DSCR copy.

14 years agoARM11: don't expose WDTR
David Brownell [Thu, 3 Dec 2009 06:57:07 +0000 (22:57 -0800)]
ARM11: don't expose WDTR

Don't expose the WDTR register through the register cache any
more.  If anyone wants Tcl scripts to be able to use DCC based
communication with app code in the target, this wouldn't do it.

Bugfix:  don't trust the Tcl-accessible version of DSCR to
flag whether WDTR needs to be restored when resuming.

14 years agoARM11: don't expose RDTR
David Brownell [Thu, 3 Dec 2009 06:57:07 +0000 (22:57 -0800)]
ARM11: don't expose RDTR

Don't expose the RDTR register through the register cache any
more.  If anyone wants Tcl scripts to be able to use DCC based
communication with app code in the target, this wouldn't do it.

Bugfix:  don't trust the Tcl-accessible version of DSCR to
flag whether RDTR needs to be restored when resuming.

14 years agoARM11: streamline debug entry
David Brownell [Thu, 3 Dec 2009 06:57:07 +0000 (22:57 -0800)]
ARM11: streamline debug entry

Streamline arm11_on_enter_debug_state() entry:

 - It should handle the standard updates:
    * target->debug_reason
    * target->state

 - Don't waste time re-reading DSCR; just pass it in

Also rename the routine to "arm11_debug_entry()", matching the
convention used elsewhere in OpenOCD.

14 years agoARM11: remove arm11->target
David Brownell [Thu, 3 Dec 2009 06:57:07 +0000 (22:57 -0800)]
ARM11: remove arm11->target

Don't need/want arm11->target; we have arm11->arm.target instead.
Also remove some unused watchpoint stuff.

14 years agoARM DPM: tweak initialization
David Brownell [Thu, 3 Dec 2009 06:57:07 +0000 (22:57 -0800)]
ARM DPM: tweak initialization

Move the initial breakpoint/watchpoint disable calls to
arm_dpm_initialize(), and start using that routine.  This
split helps with arm11 support.

14 years agofix configure problem when building w/o USB
Zachary T Welch [Thu, 3 Dec 2009 06:32:08 +0000 (22:32 -0800)]
fix configure problem when building w/o USB

If building OpenOCD without any USB drivers, a warning would appear
because $build_usb is never set to a sane default.  This fixes it.

14 years agoadding files required for distribution
Zachary T Welch [Thu, 3 Dec 2009 02:24:27 +0000 (18:24 -0800)]
adding files required for distribution

Add headers missing from Makefile rules to pass 'make distcheck'.
These were included in the tree but were not added with those commits.

14 years agofix 'target init' command registration
Zachary T Welch [Thu, 3 Dec 2009 00:12:10 +0000 (16:12 -0800)]
fix 'target init' command registration

The command handler registration was put at the top level, rather
than as a subcommand.  Move it to where it belongs.

14 years agostubs: buildfix
David Brownell [Wed, 2 Dec 2009 23:24:14 +0000 (15:24 -0800)]
stubs: buildfix

The new stubs for httpd and ioutil gave errors like:

  ioutil_stubs.c: In function ‘ioutil_init’:
  ioutil_stubs.c:27: error: implicit declaration of function ‘LOG_DEBUG’
  ioutil_stubs.c:28: error: ‘ERROR_OK’ undeclared (first use in this function)
  ioutil_stubs.c:28: error: (Each undeclared identifier is reported only once
  ioutil_stubs.c:28: error: for each function it appears in.)

Fix.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoremove #if BUILD_HTTPD
Zachary T Welch [Wed, 2 Dec 2009 03:58:32 +0000 (19:58 -0800)]
remove #if BUILD_HTTPD

Add httpd_stubs.c to provide no-op implementations of httpd_start()
and httpd_stop().

Allows these routines to be called unconditionally and ensures the
libocdserver ABI remains unchanged regardless of whether this feature
was built-in or not.

Prints a DEBUG message when the stub implementation is included.

14 years agoremove BUILD_IOUTIL symbol
Zachary T Welch [Wed, 2 Dec 2009 03:52:00 +0000 (19:52 -0800)]
remove BUILD_IOUTIL symbol

Add ioutil_stubs.c to provide an empty ioutil_init() routine.
Add ioutil.h to prevent applications from needing to declare it.

Allows unconditionally calling that function during startup, and the
resulting libocdhelper library API is now more stable.

Prints a DEBUG message when the stub implementation is included.

14 years agoremove #if logic for openocd_sleep_*lude
Zachary T Welch [Wed, 2 Dec 2009 03:41:16 +0000 (19:41 -0800)]
remove #if logic for openocd_sleep_*lude

Adds server_stubs.c to hold these routines, using automake logic to
ensure it gets included under the right conditions.

14 years agotarget: factor init to 'target init'
Zachary T Welch [Tue, 1 Dec 2009 02:45:38 +0000 (18:45 -0800)]
target: factor init to 'target init'

Adds 'target init' command handler, called as part of 'init'.

14 years agotarget: factor target_init() into pieces
Zachary T Welch [Tue, 1 Dec 2009 02:27:23 +0000 (18:27 -0800)]
target: factor target_init() into pieces

Moves body of target initialization loop into a helper function,
cleaning up its visual flow in the process.

14 years agojtag: factor init into 'jtag init'
Zachary T Welch [Tue, 1 Dec 2009 02:30:38 +0000 (18:30 -0800)]
jtag: factor init into 'jtag init'

Adds 'jtag init' command handler, which can be called as part of a
fine-grained 'init' process.

14 years agoflash: factor init to 'flash init'
Zachary T Welch [Tue, 1 Dec 2009 01:38:02 +0000 (17:38 -0800)]
flash: factor init to 'flash init'

Split flash initialiation into 'flash init', called from 'init'.

14 years agomflash: factor init to 'mflash init'
Zachary T Welch [Tue, 1 Dec 2009 01:32:56 +0000 (17:32 -0800)]
mflash: factor init to 'mflash init'

Splits mflash initialiation to 'mflash init', called from 'init'.

14 years agonand: factor init to 'nand init'
Zachary T Welch [Tue, 1 Dec 2009 01:27:21 +0000 (17:27 -0800)]
nand: factor init to 'nand init'

Split NAND initialization into 'nand init', which gets called from
the main 'init' command.

14 years agopld: factor init to 'pld init'
Zachary T Welch [Tue, 1 Dec 2009 01:20:18 +0000 (17:20 -0800)]
pld: factor init to 'pld init'

Split PLD initialization into 'pld init', which gets called from 'init'.

14 years agoARMv7a/Cortex-A8: report watchpoint trigger insn
David Brownell [Wed, 2 Dec 2009 19:31:32 +0000 (11:31 -0800)]
ARMv7a/Cortex-A8: report watchpoint trigger insn

Save and display the address of the instruction which triggered the
watchpoint.  Because of pipelining, that's well behind the PC value
when debug entry completes.  (Example in a subroutine that had been
returned from...)

Remove unused A8 stuff, mostly watchpoint hooks from the header.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: label SP and LR correctly
David Brownell [Wed, 2 Dec 2009 19:31:32 +0000 (11:31 -0800)]
ARM: label SP and LR correctly

Except for USR/SYS mode, the labels for the shadowed SP and LR
registers were reversed.  LR is r14; SP is r13.  Fix.

This would not affect GDB users; GDB references are positional.
Only folk working directly with OpenOCD register values would
have noticed this bug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agozy1000: keep up with startup refactoring work.
Øyvind Harboe [Wed, 2 Dec 2009 11:45:12 +0000 (12:45 +0100)]
zy1000: keep up with startup refactoring work.

keep up with server_init() introduction.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoCortex-A8: basic watchpoint support
David Brownell [Wed, 2 Dec 2009 05:47:45 +0000 (21:47 -0800)]
Cortex-A8: basic watchpoint support

Actually this should handle both breakpoints and watchpoints ... but
the DPM framework only handles watchpoints for now.  Works on Beagle.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: core DPM support for watchpoints
David Brownell [Wed, 2 Dec 2009 05:47:45 +0000 (21:47 -0800)]
ARM: core DPM support for watchpoints

This is a NOP unless the underlying core exposes two new methods, and
neither of the two cores using this (ARM11xx, Cortex-A8) do so yet.

This patch only updates those cores so they pass a flag saying whether
or not to update breakpoint and watchpoint status before resuming; and
removing some now-needless anti-segfault code from ARM11.  Cortex-A8
didn't have that code ... yes, it segfaulted when setting watchpoints.

NOTE:  this uses a slightly different strategy for setting/clearing
breakpoints than the ARM7/ARM9/etc code uses.  It leaves them alone
unless it's *got* to change something, to speed halt/resume cycles
(including single stepping).

ALSO NOTE:  this under-delivers for Cortex-A8, where regions with size
up to 2 GBytes can be watched ... it handles watchpoints which ARM11 can
also handle (size 1/2/4 bytes).  Should get fixed later.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARMv7a: move constants out of Cortex-A8 header
David Brownell [Wed, 2 Dec 2009 04:39:58 +0000 (20:39 -0800)]
ARMv7a: move constants out of Cortex-A8 header

These are architecturally defined, not core-specific.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoTcl and doc: update to match new 'arm mcr ...' etc
David Brownell [Tue, 1 Dec 2009 09:09:10 +0000 (01:09 -0800)]
Tcl and doc: update to match new 'arm mcr ...' etc

Make them match the C code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agotarget: at91eb40a.cfg is a board, not a target.
Øyvind Harboe [Tue, 1 Dec 2009 09:03:15 +0000 (10:03 +0100)]
target: at91eb40a.cfg is a board, not a target.

Also updated to use target name when creating flash
and set jtag_khz to 16000.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: keep up with latest changes to command handling
Øyvind Harboe [Tue, 1 Dec 2009 07:42:53 +0000 (08:42 +0100)]
zy1000: keep up with latest changes to command handling

Keep up with Jim Tcl interpreter creation cleanup.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agocommand: the Jim interpreter can now be provided rather than created
Øyvind Harboe [Tue, 1 Dec 2009 07:41:41 +0000 (08:41 +0100)]
command: the Jim interpreter can now be provided rather than created

In embedded hosts, the Jim interpreter can come from the
existing context rather than be created by OpenOCD.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoARM11: remove previous mcr()/mrc() methods
David Brownell [Tue, 1 Dec 2009 08:49:16 +0000 (00:49 -0800)]
ARM11: remove previous mcr()/mrc() methods

We don't need this code, now that the DPM code handles it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoCortex-A8: remove previous mcr()/mrc() methods
David Brownell [Tue, 1 Dec 2009 08:49:11 +0000 (00:49 -0800)]
Cortex-A8: remove previous mcr()/mrc() methods

We don't need this code, now that the DPM code handles it.
Neither do we need the ARMv7-A CP15 operations; remove their
remnants too.  And disable a mostly-needless diagnostic.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: implement mrc()/mcr() as DPM ops
David Brownell [Tue, 1 Dec 2009 08:49:04 +0000 (00:49 -0800)]
ARM: implement mrc()/mcr() as DPM ops

Instead of having separate ARM11 and Cortex-A8 implementations of
this code, have one shared implementation which just builds on the
existing "run instruction via R0" support.

This enables followup patches to remove that now-unused code from
those two drivers.  (Patches to move the "mrc" and "mcr" code into
"struct arm" are due too ... MIPS and other cores do not support
those ARM-specific concepts.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agotarget: "mcr" and "mrc" are ARM-specific
David Brownell [Tue, 1 Dec 2009 08:48:53 +0000 (00:48 -0800)]
target: "mcr" and "mrc" are ARM-specific

Switch "mrc" and "mcr" commands to be toplevel ARM operations,
as they should initially have been.

Correct the usage message for both commands:  it matches ARM
documentation (as one wants!) instead of reordering them to
match the funky mrc() and mcr() method usage (sigh).

For Cortex-A8: restore a line that got accidentally dropped,
so the secure monitor mode shadow registers will show again.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARMv7-A: stop using CP15 ops
David Brownell [Tue, 1 Dec 2009 08:48:40 +0000 (00:48 -0800)]
ARMv7-A: stop using CP15 ops

The ARMv7-A code uses read_cp15() to access fault registers.
Instead, use DPM operations directly, passing in the relevant
MRC instructions.

This eliminates per-operation overhead (though it'll be hard
to observe, this is uncommon) and helps eliminate read_cp15().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoCortex-A8: stop using CP15 ops
David Brownell [Tue, 1 Dec 2009 08:48:40 +0000 (00:48 -0800)]
Cortex-A8: stop using CP15 ops

There were two chunks of Cortex-A8 code which called the
ARMv7-A CP15 operations; get rid of them, helping prepare
to remove those methods completely:

 - post_debug_entry() can use the mrc() method to read
   its two registers.

 - write_memory() can use dpm->instr_write_data_r0() to
   flush the ICache and DCache ... doing it this way is
   actually faster since it reduces per-write overhead.

Note that the mrc() method parameters are re-ordered with
respect to the ARM instruction documentation, so that part
can be confusing.

Cleaned up the layout and comments in those areas a bit.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agomain: invoke jtag_interface_quit() explicitly
Øyvind Harboe [Mon, 30 Nov 2009 08:13:56 +0000 (09:13 +0100)]
main: invoke jtag_interface_quit() explicitly

There is no particular reason to invoke jtag_interface_quit()
on the atexit() handler, it just makes the code more obtuse
and stops other legitimate usage of atexit().

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoimprove command prohibition error report
Zachary T Welch [Sun, 29 Nov 2009 00:29:41 +0000 (16:29 -0800)]
improve command prohibition error report

Ensures that the correct information gets displayed, depending on the
mode of the command being denied.  Fixes misreporting all commands as
needing to run "before 'init'".

14 years agoXScale: restore_context() cleanup
David Brownell [Tue, 1 Dec 2009 03:14:19 +0000 (19:14 -0800)]
XScale: restore_context() cleanup

Clean up two aspects to this routine:  bad naming, since it
doesn't restore the context, just the banked registers; and
excess indentation for the bulk of the code.

Also make some of its call sites stash the function's return
code; someday they should use it for error checking.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoXScale: context restore, cleanup/bugfix
David Brownell [Tue, 1 Dec 2009 03:14:19 +0000 (19:14 -0800)]
XScale: context restore, cleanup/bugfix

This "loop over all registers" routine shared the same mess as
full_context() in terms of dozens of needless number_to_mode()
calls.  Fix that, and comments, with related cleanup.

The misnamed xscale_restore_context() had a related bug.  It
was restoring the *WRONG REGISTERS* ... always from whatever
the current mode was, instead of using the copy from whichever
register bank it was trying to restore.  (But it marked the
intended register as having been restored...)  Fixed that.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoremove interp global variable!
Zachary T Welch [Mon, 30 Nov 2009 02:50:48 +0000 (18:50 -0800)]
remove interp global variable!

Finish removing references to the 'interp' global variable from the
command module, encapsulating all reference via command_context.

Eliminates use of the global entirely, so it can be removed.  Hurrah!

14 years agocommand output capture: do not use interp global
Zachary T Welch [Mon, 30 Nov 2009 02:39:13 +0000 (18:39 -0800)]
command output capture: do not use interp global

Adds a log_capture_state structure to pass to the log capture
callback used by the command module.  Ensures that the capture occurs
in the proper context.

14 years agodo not extern 'interp' from command.c
Zachary T Welch [Mon, 30 Nov 2009 02:27:45 +0000 (18:27 -0800)]
do not extern 'interp' from command.c

Adds 'interp' field to command_context, chasing the few remaining
references to the global variable outside of the command module.

14 years agotarget: avoid using interp global variable
Zachary T Welch [Mon, 30 Nov 2009 02:21:59 +0000 (18:21 -0800)]
target: avoid using interp global variable

Adds 'interp' to target_event_action structure to avoid using the
global variable of the same name.

14 years agojtag: avoid using interp global variable
Zachary T Welch [Mon, 30 Nov 2009 02:08:13 +0000 (18:08 -0800)]
jtag: avoid using interp global variable

Adds 'interp' field to jtag_tap_event_action structure to avoid
using the global variable of same name.

14 years agofix foo command group help messages
Zachary T Welch [Mon, 30 Nov 2009 00:48:40 +0000 (16:48 -0800)]
fix foo command group help messages

Splits the old help strings to provide proper usage as well.

14 years agomake syntax errors respond with 'usage'
Zachary T Welch [Mon, 30 Nov 2009 00:32:06 +0000 (16:32 -0800)]
make syntax errors respond with 'usage'

The 'help' text will become more verbose, so its entire text will be
far more than desired when you only borked your syntax.  The usage
still allows the commands to be looked up for more help.

14 years agomove improperly located documentation
Zachary T Welch [Mon, 30 Nov 2009 00:30:00 +0000 (16:30 -0800)]
move improperly located documentation

Somehow, the comment block for command handlers ended up associated
with the output_handler.  Move it to the command_handler_t declaration.

14 years agoimprove command_done() API and docs
Zachary T Welch [Sun, 29 Nov 2009 23:58:16 +0000 (15:58 -0800)]
improve command_done() API and docs

command_done() does not need to return an error, but it needed
Doxygen comment.  Provide some for copy_command_context as well.

Note: this audit revealed some potential bugs with the command context
implementation.  There was a reason that commands were added at the
end of the list.  Shallow copying of command_context means that
the list is shared between them.  And commands added at the top-level
before the pre-existing commands will not be available in the shared
context as they were before.  Yikes!

Fortunately, this does not seem to occur in general use, as
'add_help_text' gets registered in startup.tcl and claims the first slot
in my own test cases.  Thus, it seems that we have been masking the issue
for now, but it shows the need for further architectural improvement in
the core command module.

14 years agoonly display usable commands in help
Zachary T Welch [Sun, 29 Nov 2009 22:29:24 +0000 (14:29 -0800)]
only display usable commands in help

With the ability to defer 'init', users can access the help system while
still in CONFIG mode.  This patch omits commands from the help and usage
list when they cannot be run in the current command mode, making it much
easier to see what can be done at a given time.

14 years agoallow deferal of init
Zachary T Welch [Sun, 29 Nov 2009 22:04:21 +0000 (14:04 -0800)]
allow deferal of init

Adds 'noinit' command to prevent OpenOCD from running 'init' at the end
up startup, allowing it to be given from telnet or TCL.  This provides
the old behavior by default, and users can add this command to their
scripts to get the new behavior.