openocd.git
13 years agoadd flash/nor/core.[ch]
Zachary T Welch [Fri, 4 Dec 2009 01:14:07 +0000 (17:14 -0800)]
add flash/nor/core.[ch]

The newly moved flash TCL routines access the internals of the module
too much.  Fix the layering issues by adding new core NOR flash APIs:

<flash/nor/core.h>:
  - flash_driver_find_by_name() - self-descriptive

<flash/nor/imp.h>:
  - flash_bank_add()            - encapsulates adding banks to bank list
  - flash_bank_list()           - encapsulates retreiving bank list

This allows the externs in flash/nor/imp.h to be removed, and
these mechanisms may now be re-used by other flash module code.

13 years agoadd flash/nor/{tcl.c,imp.h} from flash/flash.c
Zachary T Welch [Fri, 4 Dec 2009 00:47:49 +0000 (16:47 -0800)]
add flash/nor/{tcl.c,imp.h} from flash/flash.c

Moves the top-level 'flash' command handlers into flash/nor/tcl.c,
with flash/nor/imp.h providing an internal implementation header
to share non-public API components.

13 years agoseparate Jim from jtag/core.c
Zachary T Welch [Fri, 4 Dec 2009 00:25:51 +0000 (16:25 -0800)]
separate Jim from jtag/core.c

After previous efforts, only one Jim routine remained in jtag/core.c,
and moving it to jtag/tcl.c painlessly finishes separating these layers.
The headers need separating, but the implementation is clean.

13 years agoswitch 'rm' command away from using Jim
Zachary T Welch [Fri, 4 Dec 2009 00:22:46 +0000 (16:22 -0800)]
switch 'rm' command away from using Jim

Commands that do not need to use Jim should be registered as
high-level command handlers.

13 years agocheck top-level command registrations
Zachary T Welch [Fri, 4 Dec 2009 01:38:24 +0000 (17:38 -0800)]
check top-level command registrations

When calling module_register_commands, the return value needs to be
checked for failures.  Instead of duplicating code, use an array of
function pointers to the identical registration functions to iterate
over during startup.

13 years agoallow 'jtag init' to be run in any mode
Zachary T Welch [Fri, 4 Dec 2009 01:41:39 +0000 (17:41 -0800)]
allow 'jtag init' to be run in any mode

Help alleviate further potential problems with interactive startup.

13 years agotarget: cygwin build fixes
David Brownell [Fri, 4 Dec 2009 08:42:36 +0000 (00:42 -0800)]
target: cygwin build fixes

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agozy1000: FPGA revC wip
Øyvind Harboe [Fri, 4 Dec 2009 07:20:38 +0000 (08:20 +0100)]
zy1000: FPGA revC wip

The bug in revC register memory access is pretty much
cornered now.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agobasic ARM semihosting support
Nicolas Pitre [Thu, 3 Dec 2009 22:27:13 +0000 (17:27 -0500)]
basic ARM semihosting support

Semihosting enables code running on an ARM target to use the
I/O facilities on the host computer. The target application must
be linked against a library that forwards operation requests by
using the SVC instruction that is trapped at the Supervisor Call
vector by the debugger.  The "hosted" library version provided
with CodeSourcery's Sourcery G++ Lite for ARM EABI is one example.

This is currently available for ARM9 processors, but any ARM
variant should be able to support this with little additional work.

Tested using binaries compiled with Sourcery G++ Lite 2009q1-161
and ARM RVCT 3.0.

[dbrownell@users.sourceforge.net: doc tweaks, NEWS]

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agodoxygen: remove some warnings
David Brownell [Fri, 4 Dec 2009 02:31:38 +0000 (18:31 -0800)]
doxygen: remove some warnings

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoMake ARM NAND I/O operations aware of last op
Dean Glazeski [Mon, 16 Nov 2009 19:40:46 +0000 (13:40 -0600)]
Make ARM NAND I/O operations aware of last op

Updates the ARM NAND I/O code to look at and update the op
field of arm_nand_data to reflect the last operation performed.
It uses this field to copy the correct code to the target in the
case where the struct is used for reads and writes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoARM NAND I/O interface update
Dean Glazeski [Mon, 16 Nov 2009 19:34:24 +0000 (13:34 -0600)]
ARM NAND I/O interface update

Modify the arm_nand_data struct to better support both read and
write operations while using the same struct.  An additional
field was added, and initialized, to record the last operation
so that the correct code can be loaded to the working area.

[dbrownell@users.sourceforge.net: merge init patch, tweak GPL note]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoNAND page command refactoring.
Dean Glazeski [Fri, 20 Nov 2009 06:19:39 +0000 (00:19 -0600)]
NAND page command refactoring.

Created a new function that handles sending a command and the address
information for pages to a NAND device.

[dbrownell@users.sourceforge.net: tweaked line lengths, name 'oob_only']

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoARMv7-A: tweak arch_state()
David Brownell [Fri, 4 Dec 2009 00:18:24 +0000 (16:18 -0800)]
ARMv7-A: tweak arch_state()

Punt to the armv4_5_arch_state() for all the common stuff, to
shrink code and so we will get any improvements it provides.

Don't hide watchpoint status if we happen to be in "abort" mode.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoARM DPM: share debug reason logic
David Brownell [Fri, 4 Dec 2009 00:08:04 +0000 (16:08 -0800)]
ARM DPM: share debug reason logic

No point in both ARM11 and Cortex-A8 having private copies
of the logic sorting out e.g. DBG_REASON_WATCHPOINT.

Add and use a shared routine for this ... there's actually
a bunch more debug entry logic that could be shared, this
is just a start on that.  Note that this routine fixes a
bug observed in the ARM11 code, where some abort mode quirks
were displayed as being an unknown debug reason; and also
silences needless ARM11 chatter.

Likewise with private copies of DSCR ... add one to the DPM
struct.  Save it as part of setting DBG_REASON_* so later
patches can switch over to using that copy.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoARM11: use shared DSCR bit names
David Brownell [Fri, 4 Dec 2009 00:08:04 +0000 (16:08 -0800)]
ARM11: use shared DSCR bit names

For the bits now defined in "arm_dpm.h", switch to the
shared DSCR_* symbol and remove the ARM11_DSCR_* version.

Define DSCR_INT_DIS and use it instead of the ARM11_DSCR_*
sibling symbol.  (Note:  for both ARM11 and Cortex-A8, this
should arguably be enabled by default when single stepping.)

Remove some other unused declarations in "arm11.h".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agoARM DPM: make DSCR bit defs sharable
David Brownell [Fri, 4 Dec 2009 00:08:04 +0000 (16:08 -0800)]
ARM DPM: make DSCR bit defs sharable

Move the symbols for these bits from "armv7a.h" to "arm_dpm.h",
where they can be seen and used not just by Cortex-A but also
by the ARM11 (armv6) code.

Change them from bit numbers to bit masks ... this matches the
usage in ARM11 code, and also makes it easier to read.

Rename DSCR_EXT_INT_EN as DSCR_ITR_EN to match the docs; it's
enabling ITR functionality, not external interrupts, so this
changes the name to be less misleading.  (There *IS* a bit
affecting interrupts, and this isn't it.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agofix another init regression
David Brownell [Thu, 3 Dec 2009 22:44:03 +0000 (14:44 -0800)]
fix another init regression

This makes Beagle work again, instead of losing horribly because
the JTAG event handlers are no longer able to e.g. "runtest".  I
get the previous quirky behavior ... comes up OK but "reset halt"
somewhat mysteriously makes it all better.  (Instead of nothing
being able to work at all...)  However, I'm still seeing:

 The 'init' command must be used before 'init'.

That seems to come from invoking "jtag init", sometime after it
gets mapped to "ocd_jtag init", according to debug message traces.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
13 years agofix double 'init' regression
Zachary T Welch [Thu, 3 Dec 2009 13:23:16 +0000 (05:23 -0800)]
fix double 'init' regression

To prevent regression in the behavior of 'init', we allow it to run in
any mode.  If provided with -c init and with -c noinit, then the second
init at startup caused a spurious mode failure.  Let 'init' handle it.

13 years agofix regressions with GDB port numbers
Zachary T Welch [Thu, 3 Dec 2009 13:13:45 +0000 (05:13 -0800)]
fix regressions with GDB port numbers

Use a separate variable for iterating GDB service port numbers than
the one set by the user.  Restores the behavior of returning the
original port number and only incrementing the port used on success.

13 years agozy1000: include files have moved about
Øyvind Harboe [Thu, 3 Dec 2009 12:47:25 +0000 (13:47 +0100)]
zy1000: include files have moved about

now compiles again after include files were moved about
to reduce -I usage and stop using quotes but rather
angle brackets for include files.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 years agoremove tertiary include paths
Zachary T Welch [Sun, 29 Nov 2009 00:27:10 +0000 (16:27 -0800)]
remove tertiary include paths

With all #include directives converted, we only need to have the
top-level src/ directory in the search path.

13 years agochange #include "../hello.h" to "hello.h"
Zachary T Welch [Thu, 3 Dec 2009 11:46:15 +0000 (03:46 -0800)]
change #include "../hello.h" to "hello.h"

Before we can -I the top-level src/ directory alone, references to
"hello.h" must be updated.  This is an internal header, so it does
not need angle brackets.

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

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

#include "xsvf.h"

the following form should be used.

#include <xsvf/xsvf.h>

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

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

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

#include "svf.h"

the following form should be used.

#include <svf/svf.h>

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

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

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

#include "pld.h"

the following form should be used.

#include <pld/pld.h>

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

13 years agochange #include "telnet_server.h" to <server/telnet_server.h>
Zachary T Welch [Thu, 3 Dec 2009 12:15:03 +0000 (04:15 -0800)]
change #include "telnet_server.h" to <server/telnet_server.h>

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

#include "telnet_server.h"

the following form should be used.

#include <server/telnet_server.h>

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

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

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

#include "server.h"

the following form should be used.

#include <server/server.h>

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

13 years agochange #include "httpd.h" to <server/httpd.h>
Zachary T Welch [Thu, 3 Dec 2009 12:15:03 +0000 (04:15 -0800)]
change #include "httpd.h" to <server/httpd.h>

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

#include "httpd.h"

the following form should be used.

#include <server/httpd.h>

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

13 years agochange #include "gdb_server.h" to <server/gdb_server.h>
Zachary T Welch [Thu, 3 Dec 2009 12:15:02 +0000 (04:15 -0800)]
change #include "gdb_server.h" to <server/gdb_server.h>

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

#include "gdb_server.h"

the following form should be used.

#include <server/gdb_server.h>

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

13 years agochange #include "s3c24xx_regs.h" to <flash/nand/s3c24xx_regs.h>
Zachary T Welch [Thu, 3 Dec 2009 12:15:02 +0000 (04:15 -0800)]
change #include "s3c24xx_regs.h" to <flash/nand/s3c24xx_regs.h>

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

#include "s3c24xx_regs.h"

the following form should be used.

#include <flash/nand/s3c24xx_regs.h>

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

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

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

#include "ocl.h"

the following form should be used.

#include <flash/nor/ocl.h>

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

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

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

#include "nand.h"

the following form should be used.

#include <flash/nand.h>

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

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

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

#include "mflash.h"

the following form should be used.

#include <flash/mflash.h>

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

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

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

#include "flash.h"

the following form should be used.

#include <flash/flash.h>

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

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

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

#include "arm_nandio.h"

the following form should be used.

#include <flash/arm_nandio.h>

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

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

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

#include "trace.h"

the following form should be used.

#include <target/trace.h>

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

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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>
13 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.

13 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.

13 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'.

13 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.

13 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!

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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>
13 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.

13 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.

13 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.

13 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'.

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)