openocd.git
11 years agoimprove command handling examples
Zachary T Welch [Sun, 22 Nov 2009 03:27:20 +0000 (19:27 -0800)]
improve command handling examples

Removes hello and foo commands from top-level registration.  Instead,
the dummy interface driver and faux flash driver have been augmented
to register these commands as sub-commands.

11 years agoadd script_command_run helper
Zachary T Welch [Wed, 25 Nov 2009 03:51:49 +0000 (19:51 -0800)]
add script_command_run helper

Eliminates duplicated code in script_command and handle_unknown_command.
Fixes bug with duplicated help output generated by placeholder commands.

11 years agoencapsulate and re-use log capture, retval setup
Zachary T Welch [Wed, 25 Nov 2009 03:13:03 +0000 (19:13 -0800)]
encapsulate and re-use log capture, retval setup

Factors log capture while running script commands, eliminating
duplicated code between script_command and jim_capture.  Factors
setting a command's Jim "retval" into a new helper as well.

Using these new helpers in the new unknown command handler's
fixes possible regressions caused by these bits being missing.

11 years agocombine help and usage command handlers
Zachary T Welch [Wed, 25 Nov 2009 06:18:28 +0000 (22:18 -0800)]
combine help and usage command handlers

Remove duplicated handler code by checking the running command name.

11 years agoimprove usage and help command output
Zachary T Welch [Mon, 23 Nov 2009 20:00:31 +0000 (12:00 -0800)]
improve usage and help command output

Rewrite formatting code in C, removing last remenants of TCL help code.
Sinificantly improves the readability by using smarter indent and wrap.

11 years agoallow scripts to update usage information
Zachary T Welch [Mon, 23 Nov 2009 20:16:27 +0000 (12:16 -0800)]
allow scripts to update usage information

The add_usage_text command uses the same C handler, which was updated
to support its new polymorphic role.  This patch updates the two script
commands that needed this support: 'find' and 'script'.

11 years agohttpd: use register_commands()
Zachary T Welch [Tue, 24 Nov 2009 18:58:32 +0000 (10:58 -0800)]
httpd: use register_commands()

Updates httpd_start() to use register_commands() for 'readform' and
'writeform' commands.  Adds server/httpd.h to export the new signatures
for this function (and httpd_stop), which allows removing the obsoleted
declarations inside openocd.c.

11 years agoadd jim_handler to command_registration
Zachary T Welch [Mon, 23 Nov 2009 23:03:04 +0000 (15:03 -0800)]
add jim_handler to command_registration

Adding jim_handler field to command_registration allows removing the
register_jim helper.  All command registrations now go through the
register_command{,s}() functions.

11 years agorefactor command_new to use command_registration
Zachary T Welch [Mon, 23 Nov 2009 23:01:12 +0000 (15:01 -0800)]
refactor command_new to use command_registration

Save stack space: use a struct.  Makes it easier to add new parameters.

11 years agoremove register_commands from etm_capture_driver
Zachary T Welch [Mon, 23 Nov 2009 16:24:02 +0000 (08:24 -0800)]
remove register_commands from etm_capture_driver

Converts callback to an array of command_registration records.
Moves oocd_trace driver definition to end of file to eliminate
useless forward declaration.

11 years agoremove target_type register_command callback
Zachary T Welch [Mon, 23 Nov 2009 16:17:01 +0000 (08:17 -0800)]
remove target_type register_command callback

Uses chaining of command_registration structures to eliminate all
target_type register_callback routines.  Exports the command_handler
registration arrays for those target types that are used by others.

11 years agoxscale: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
xscale: use register_commands()

11 years agotrace: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
trace: use register_commands()

11 years agotarget_request: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
target_request: use register_commands()

11 years agotarget: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
target: use register_commands()

11 years agooocd_trace: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
oocd_trace: use register_commands()

11 years agoetm_dummy: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
etm_dummy: use register_commands()

11 years agoetm: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
etm: use register_commands()

11 years agoetb: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
etb: use register_commands()

11 years agocortex_m3: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
cortex_m3: use register_commands()

11 years agocortex_a8: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
cortex_a8: use register_commands()

11 years agoarmv7m: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:06 +0000 (07:43 -0800)]
armv7m: use register_commands()

11 years agoarmv7a: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
armv7a: use register_commands()

11 years agoarmv4_5: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
armv4_5: use register_commands()

11 years agoarm9tdmi: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm9tdmi: use register_commands()

11 years agoarm966e: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm966e: use register_commands()

11 years agoarm926ejs: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm926ejs: use register_commands()

11 years agoarm920t: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm920t: use register_commands()

11 years agoarm7_9_common: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm7_9_common: use register_commands()

11 years agoarm720t: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm720t: use register_commands()

11 years agoarm11: use register_commands()
Zachary T Welch [Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)]
arm11: use register_commands()

11 years agoremove nand_controller->register_callbacks
Zachary T Welch [Sun, 22 Nov 2009 14:24:19 +0000 (06:24 -0800)]
remove nand_controller->register_callbacks

Replace flash_driver callback with pointer to command_registration.
Eliminates all related routines and allows drivers to omit commands.

11 years agoremove flash_driver->register_callbacks
Zachary T Welch [Sun, 22 Nov 2009 14:12:04 +0000 (06:12 -0800)]
remove flash_driver->register_callbacks

Replace flash_driver callback with pointer to command_registration.
Eliminates all related routines and allows drivers to omit commands.

11 years agotms470: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
tms470: use register_commands()

11 years agostr9xpec: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
str9xpec: use register_commands()

11 years agostr9x: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
str9x: use register_commands()

11 years agostr7x: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
str7x: use register_commands()

11 years agostm32x: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
stm32x: use register_commands()

11 years agostellaris: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
stellaris: use register_commands()

11 years agopic32mx: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
pic32mx: use register_commands()

11 years agonand: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
nand: use register_commands()

Eliminates 'nand_cmd' global variable.

11 years agomflash: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
mflash: use register_commands()

11 years agolpc3180_nand_controller: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
lpc3180_nand_controller: use register_commands()

11 years agolpc2900: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
lpc2900: use register_commands()

11 years agolpc2000: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
lpc2000: use register_commands()

11 years agoflash: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
flash: use register_commands()

Eliminates 'flash_cmd' global variable.

11 years agoecos: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
ecos: use register_commands()

11 years agocfi: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
cfi: use register_commands()

11 years agoavrf: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
avrf: use register_commands()

11 years agoat91sam7: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
at91sam7: use register_commands()

11 years agoat91sam3: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 12:13:56 +0000 (04:13 -0800)]
at91sam3: use register_commands()

11 years agoremove register_callbacks from jtag interface
Zachary T Welch [Sat, 21 Nov 2009 06:01:59 +0000 (22:01 -0800)]
remove register_callbacks from jtag interface

Changes the jtag_interface->register_callbacks field to a list of
commands to be registered.  Changes callback to invocation of
register_commands() with that command registration list.  Removes all
JTAG interface driver register_command callback functions, which the
previous commits had converted into identical calls.

11 years agovsllink: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 05:06:28 +0000 (21:06 -0800)]
vsllink: use register_commands()

Use register_commands() with command registration array.

11 years agojtag: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 05:02:28 +0000 (21:02 -0800)]
jtag: use register_commands()

Use register commands with command registration array.

11 years agopresto: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 05:00:23 +0000 (21:00 -0800)]
presto: use register_commands()

Use register_commands() with command registration array.

11 years agoparport: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 04:17:52 +0000 (20:17 -0800)]
parport: use register_commands()

Use register_commands() with a command registration array.

11 years agojlink: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 04:12:21 +0000 (20:12 -0800)]
jlink: use register_commands()

Use register_commands() with command registration array.

11 years agogw16012: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 04:11:58 +0000 (20:11 -0800)]
gw16012: use register_commands()

Use register_commands() with command registration array.

11 years agoft2232: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 04:06:50 +0000 (20:06 -0800)]
ft2232: use register_commands()

Use register_commands() with a command registration array.

11 years agoat91rm9200: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 03:58:07 +0000 (19:58 -0800)]
at91rm9200: use register_commands()

Use register_commands() with command registration array.
---
This module was broken by previous changes, but no one has complained.
Are there still users for this modules?

11 years agoarm-jtag-ew: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 03:56:02 +0000 (19:56 -0800)]
arm-jtag-ew: use register_commands()

Uses register_commands() with command registration array.

11 years agoamt_jtagaccel: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 03:53:28 +0000 (19:53 -0800)]
amt_jtagaccel: use register_commands()

Use register_commands() with command_registration array.

11 years agopld: use static registration instead of callback
Zachary T Welch [Mon, 23 Nov 2009 17:30:02 +0000 (09:30 -0800)]
pld: use static registration instead of callback

Remove register_callbacks from pld_device structure, using an array
of command_registration records instead.

11 years agopld: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 09:50:22 +0000 (01:50 -0800)]
pld: use register_commands()

Updates core PLD and virtex2 commands to use register_commands().

11 years ago{,x}svf: use register_commands()
Zachary T Welch [Sun, 22 Nov 2009 09:11:18 +0000 (01:11 -0800)]
{,x}svf: use register_commands()

Use register_commands() for registering {,x}svf commands.

11 years agoserver: use register_commands
Zachary T Welch [Sat, 21 Nov 2009 22:42:05 +0000 (14:42 -0800)]
server: use register_commands

Converts server directory to use new command registration paradigm.

11 years agolog: use register_commands()
Zachary T Welch [Fri, 20 Nov 2009 23:52:18 +0000 (15:52 -0800)]
log: use register_commands()

Use register_commands() for logging callbacks.  Improve help and add
proper usage.

11 years agoioutil: use register_commands()
Zachary T Welch [Fri, 20 Nov 2009 23:47:08 +0000 (15:47 -0800)]
ioutil: use register_commands()

Use table instead of individual calls.  Add proper usage information.

11 years agoopenocd: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 00:58:45 +0000 (16:58 -0800)]
openocd: use register_commands()

Use register_commands() for top-level version and init command.

11 years agodemonstrate chaining with foo commands
Zachary T Welch [Sat, 21 Nov 2009 23:52:12 +0000 (15:52 -0800)]
demonstrate chaining with foo commands

Use the new command registration chaining capabilities to eliminate
the foo_register_commands helper, folding its remaining command
handler setup into the hello_command_handlers registration array.

11 years agohello: use register_commands()
Zachary T Welch [Sat, 21 Nov 2009 21:49:00 +0000 (13:49 -0800)]
hello: use register_commands()

Use new register_commands() with command registration table.

11 years agorewrite 'unknown' command dispatching in C
Zachary T Welch [Sun, 22 Nov 2009 03:55:50 +0000 (19:55 -0800)]
rewrite 'unknown' command dispatching in C

Rewrite the magical 'unknown' command in C as a Jim handler, allowing
it to dispatch commands to any level in the tree.

11 years agoadd public API for locating commands
Zachary T Welch [Sun, 22 Nov 2009 09:48:55 +0000 (01:48 -0800)]
add public API for locating commands

Allow other modules to find a command, primarily for the purpose of
registering and unregistering subcommands.

11 years agorefactor script_command context grabbing
Zachary T Welch [Sun, 22 Nov 2009 04:00:37 +0000 (20:00 -0800)]
refactor script_command context grabbing

Move command context acquisition to current_command_context() for re-use.

11 years agoadd command registration chaining
Zachary T Welch [Sat, 21 Nov 2009 21:59:51 +0000 (13:59 -0800)]
add command registration chaining

Adds the ability to chain registration structures.  Modules can define a
command with the 'chain' and 'num_chain' fields defined in their
registration table, and the register_commands() function will initialize
these commands.  If the registration record creates a new command, then
the chained commands are created under it; otherwise, they are created
in the same context as the other commands (i.e. the parent argument).

11 years agomore command registration refactoring
Zachary T Welch [Sat, 21 Nov 2009 21:33:32 +0000 (13:33 -0800)]
more command registration refactoring

Split out the handler registration into its own function, and add a
few obviously missing NULL pointer error checking.

11 years agocommand: use register_commands for handlers
Zachary T Welch [Fri, 20 Nov 2009 21:36:07 +0000 (13:36 -0800)]
command: use register_commands for handlers

Use register_commands() to register low-level command handlers,
adding a builtin_command_handlers declaration that is easy to understand.
Splits help and usage information into their appropriate fields.

11 years agoadd command usage, separate from help
Zachary T Welch [Fri, 20 Nov 2009 22:07:28 +0000 (14:07 -0800)]
add command usage, separate from help

Adds the usage command, to display usage information for commands.
The output for this command will remain erronenously empty until
commands are updated to use these new coventions.

11 years agoadd register_commands for batch registration
Zachary T Welch [Fri, 20 Nov 2009 20:46:06 +0000 (12:46 -0800)]
add register_commands for batch registration

The register_commands API takes multiple commands in one call, allowing
modules to declare and pass a much simpler (and more explicit) array of
command_registration records.

11 years agoadd struct command_registration
Zachary T Welch [Fri, 20 Nov 2009 19:23:34 +0000 (11:23 -0800)]
add struct command_registration

Add a structure to encapsulate command registration information, rather
than passing them all as parameters.  Enables further API changes that
require additional required or optional parameters.

Updates the register_command API and COMMAND_REGISTER macro to use it,
along with their documentation.

11 years agouse COMMAND_REGISTER macro
Zachary T Welch [Fri, 20 Nov 2009 19:26:35 +0000 (11:26 -0800)]
use COMMAND_REGISTER macro

Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.

11 years agoadd COMMAND_REGISTER macro
Zachary T Welch [Fri, 20 Nov 2009 19:30:00 +0000 (11:30 -0800)]
add COMMAND_REGISTER macro

Provides a migration path for the widely used register_command API,
which needs to be updated to provide new functionality.

This macro allows the API to change without having to update all of its
callers at the same time.

11 years agoimprove startup tcl scripts
Zachary T Welch [Sun, 22 Nov 2009 03:41:21 +0000 (19:41 -0800)]
improve startup tcl scripts

Fix a couple of layering violations missed in the last round.
Add missing comment headers.

11 years agoCortex-A8: avoid DSCR reads
David Brownell [Wed, 25 Nov 2009 05:24:44 +0000 (21:24 -0800)]
Cortex-A8: avoid DSCR reads

There was a lot of needless handshaking overhead in the current
Cortex-A8 DCC/ITR operations, since the status read by each step
was discarded rather than letting the next step know it.

This shrinks the handshaking by:  (a) passing status along from
previous steps, avoiding re-fetching; which enables the big win
(b) relying on a useful invariant:  that the DSCR_INSTR_COMP bit
is set after every call to a DPM method.

A "reg sp_usr" call previously took 17 flushes; now it takes just 9.
This visibly speeds common operations like entry to debug state and
stepping, as well as "arm reg" and so on.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoCortex-A8: hook up DPM
David Brownell [Wed, 25 Nov 2009 05:24:44 +0000 (21:24 -0800)]
Cortex-A8: hook up DPM

This replaces two versions of register access functions.  One
was commented out, and seemed to have uncertain intent.  The
other was fairly new, and helped motivate the DPM framework
once I observed that the ARM11 was doing the very same ops.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoCortex-A8: implement DPM
David Brownell [Wed, 25 Nov 2009 05:24:44 +0000 (21:24 -0800)]
Cortex-A8: implement DPM

This implements the DPM interface for Cortex-A8 cores.  It
also adds a synchronization operation to the DPM framework,
which is needed by the Cortex-A8 after CPSR writes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoCortex-A8: minor cleanup
David Brownell [Wed, 25 Nov 2009 05:24:44 +0000 (21:24 -0800)]
Cortex-A8: minor cleanup

Make various functions static, add some comments, report
vector catch as a flavor of DBG_REASON_BREAKPOINT, get
rid of needless/undesirable ARMV4_5_CORE_REG_MODE, etc.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoimprove alloc_vprintf
Andreas Fritiofson [Tue, 24 Nov 2009 20:24:06 +0000 (21:24 +0100)]
improve alloc_vprintf

The previous implementation was unnecessarily complex. Get rid of the loops,
let vsnprintf() tell us directly how much storage we need and allocate that. A
second pass writes the actual string. Also add a va_end() that was missing.
This should be much faster for large strings and less wasteful for small ones.

A quirk that has been retained is that some callers patch in a newline at the
end of the returned string and depend on alloc_vprintf to allocate at least
one byte extra.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
11 years agofix doxygen build
Zachary T Welch [Tue, 24 Nov 2009 16:59:45 +0000 (08:59 -0800)]
fix doxygen build

Update build rules to skip the PDF unless the TeX has been created.
Also, fixes a warning regarding pattern rules being a GNU make trick.

11 years agojlink: rewrite to use jtag_usb_open
Zachary T Welch [Thu, 19 Nov 2009 20:57:32 +0000 (12:57 -0800)]
jlink: rewrite to use jtag_usb_open

Rewrite jlink_usb_open to use jtag_usb_open helper.

11 years agojlink: remove superfluous indentation
Zachary T Welch [Thu, 19 Nov 2009 20:41:25 +0000 (12:41 -0800)]
jlink: remove superfluous indentation

Rewrite logic to remove indentation in jlink_usb_open, in prep
for further surgery.

11 years agorlink: use jtag_usb_open helper
Zachary T Welch [Thu, 19 Nov 2009 20:25:16 +0000 (12:25 -0800)]
rlink: use jtag_usb_open helper

Rewrite rlink_init routine to use jtag_usb_open helper.  Eliminates
some spurious calls to exit().

Wraps a tremendously long line of comment to fit 80 columns too.

11 years agorlink: eliminate spurious indentation
Zachary T Welch [Thu, 19 Nov 2009 20:12:21 +0000 (12:12 -0800)]
rlink: eliminate spurious indentation

Rework rlink_init to use less indentation.  Best viewed with diff -w.

11 years agovsllink: rewrite to use jtag_usb_open
Zachary T Welch [Thu, 19 Nov 2009 20:11:03 +0000 (12:11 -0800)]
vsllink: rewrite to use jtag_usb_open

Rewrite vsllink_usb_open to use jtag_usb_open helper.

Eliminates spurious calls to exit().

11 years agousbprog: use jtag_usb_open
Zachary T Welch [Thu, 19 Nov 2009 20:09:11 +0000 (12:09 -0800)]
usbprog: use jtag_usb_open

Rewrite usbprob_jtag_open to use jtag_usb_open helper.

11 years agoarm-jtag-ew: use jtag_usb_open
Zachary T Welch [Thu, 19 Nov 2009 20:06:05 +0000 (12:06 -0800)]
arm-jtag-ew: use jtag_usb_open

Rewrite armjtagwe_usb_open to use jtag_usb_open.

11 years agoadd jtag/usb_common.[ch] files
Zachary T Welch [Thu, 19 Nov 2009 20:02:07 +0000 (12:02 -0800)]
add jtag/usb_common.[ch] files

Begins to consolidate code used by several USB JTAG interfaces.
This first patch provides the required build system changes and
a common jtag_usb_open routine, which will replace the guts for
probing the busses and devices for possible VID/PID matches.
The following patches convert each driver to use it.

11 years agoARM11: remove old R0..R15/CPSR code
David Brownell [Tue, 24 Nov 2009 09:27:29 +0000 (01:27 -0800)]
ARM11: remove old R0..R15/CPSR code

This finishes the basic switchover to the new register code,
for everything except the debug registers.  (And maybe we
shouldn't have a cache for *those* which works this way...)

The context save/restore code now uses the new code, but
it's in a slightly different sequence.  That should be fine
since the R0/PC/CPSR stuff is all that really matters (and
if we can update those, we can update the rest).

Now there's no longer a way any code can be confused about
which copy of "r1" (etc) to use.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM11: use standard run_algorithm()
David Brownell [Tue, 24 Nov 2009 09:27:24 +0000 (01:27 -0800)]
ARM11: use standard run_algorithm()

As with single stepping, the previous stuff was needed because
the ARM11 code wasn't using the standard ARM base type and
register access ... but now those mechanisms work, so we can
switch out that special-purpose glue, in favor of the more
thoroughly tested/capable "standard" code.

Fixes a bug in the resume() implementation:  it wasn't handling
two of its arguments correctly, preventing the "flash erase_check"
algorithm from working.  (This code needs a *subsequent* update
for correct register handling, though... removing the confusion
about which "r2", for example, to use.)

This should resolve some "FIXME" comments too, for Thumb and
processor mode support.  It also gets rid of a nasty exit()
call; servers should only have *clean* shutdown paths.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM11: use standard single step simulation
David Brownell [Tue, 24 Nov 2009 09:27:21 +0000 (01:27 -0800)]
ARM11: use standard single step simulation

The previous stuff was needed because the ARM11 code wasn't using
the standard ARM base type and register access ... but now those
mechanisms work, so we can switch out that special-purpose glue.

This should resolve all the "FIXME -- handle Thumb single stepping"
comments too, and properly handle the processor's mode.  (Modulo
the issue that this code doesn't yet handle two-byte breakpoints.)

Clarify the comments about the the hardware single stepping.  When
we eventually share breakpoint code with Cortex-A8, we can just make
that be the default on cores which support it.  We may still want an
override command, not just to facilitate testing but to cope with
"instruction address mismatch" not quite being true single-step.

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

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)