Zachary T Welch [Fri, 13 Nov 2009 12:57:03 +0000 (04:57 -0800)]
cable_t -> struct cable
Remove useless typedef and redundant suffix from parport struct cable.
Zachary T Welch [Fri, 13 Nov 2009 12:50:26 +0000 (04:50 -0800)]
pending_scan_result_t -> struct pending_scan_result
Remove misleading typedef from struct struct pending_scan_result.
Future patches need to remove these duplicated types and code.
Zachary T Welch [Fri, 13 Nov 2009 12:33:32 +0000 (04:33 -0800)]
armjtagew_jtag_t -> struct armjtagew
Remove useless typedef and redundant suffix from struct armjtatew_jtag.
Zachary T Welch [Fri, 13 Nov 2009 12:28:41 +0000 (04:28 -0800)]
use struct jtag_tap_event_action
Remove useless typedef and redundant suffix from jtag_tap_event_action.
Zachary T Welch [Fri, 13 Nov 2009 12:23:43 +0000 (04:23 -0800)]
jtag_event_callback_t -> struct jtag_event_callback
Remove useless typedef and redundant suffix from jtag_event_callback.
Add documentation for the structure.
Zachary T Welch [Fri, 13 Nov 2009 12:14:50 +0000 (04:14 -0800)]
jtag_interface_t -> struct jtag_interface
Remove useless typedef and redundant suffix from struct jtag_interface.
Zachary T Welch [Fri, 13 Nov 2009 12:10:56 +0000 (04:10 -0800)]
bitbang_interface_t -> struct bitbang_interface
Removes another useless typedef and suffix.
Zachary T Welch [Fri, 13 Nov 2009 12:08:19 +0000 (04:08 -0800)]
bitq_interface_t -> struct biq_interface
Remove useless typedef and redundant suffix.
Zachary T Welch [Fri, 13 Nov 2009 12:00:59 +0000 (04:00 -0800)]
encapsulate bitq_state structure
Move the bitq_state structure from the header to source file, as it
is used internally.
Also removes its silly typedef.
Zachary T Welch [Fri, 13 Nov 2009 11:28:03 +0000 (03:28 -0800)]
scan_field_t -> struct scan_field
Remove useless structure typedef.
Zachary T Welch [Fri, 13 Nov 2009 11:19:35 +0000 (03:19 -0800)]
jtag_tap_t -> struct jtag_tap
Search and destroy the jtag_tap_t typedef. This also cleans up a
layering violation, removing the declaration from types.h.
Zachary T Welch [Fri, 13 Nov 2009 11:08:29 +0000 (03:08 -0800)]
fileio_t -> struct fileio
Remove useless structure typedef.
Zachary T Welch [Fri, 13 Nov 2009 11:00:51 +0000 (03:00 -0800)]
log_callback_t -> struct log_callback
Removes useless and confusing typedef for log callback structure.
Types with _t should be suitable for passing by-value as arguments.
Zachary T Welch [Fri, 13 Nov 2009 19:52:53 +0000 (11:52 -0800)]
remove accidental artifact
Somehow I managed to slip a temporary build file into the tree.
Remove it and update the .gitignore file so it doesn't happen again.
Zachary T Welch [Wed, 11 Nov 2009 09:31:34 +0000 (01:31 -0800)]
add documention for writing built-in commands
This documentation update provides an introduction to the command
handling facilities provided by command.[ch]. A primer walks the user
through the elements of a pointedly pedantic module: src/hello.c.
A summary of the API is provided in the OpenOCD Architecture section.
Zachary T Welch [Wed, 11 Nov 2009 09:20:49 +0000 (01:20 -0800)]
add src/hello.c to augment new command tutorial
The hello module provides the 'hello' command, printing a greetings
to the command console. It can grow to serve as pedagogical example
of services that OpenOCD developers should use: a runnable style guide.
Zachary T Welch [Wed, 11 Nov 2009 07:01:44 +0000 (23:01 -0800)]
command_handler_t: make cmd an indirect parameter
This patch removes 'cmd' from the list of direct parameters, moving
that pointer to args[-1] (by way of the new CMD_NAME macro).
Zachary T Welch [Tue, 10 Nov 2009 12:37:17 +0000 (04:37 -0800)]
command_handler_t: make args parameter const
This patch prevents command handlers from modifying the strings passed
in the 'args' array.
Zachary T Welch [Tue, 10 Nov 2009 08:10:25 +0000 (00:10 -0800)]
command_handler_t: make cmd parameter const
Prevents the command name from being modified in command handlers.
Again, this has cascading effects, but the patches are fairly minimal.
Zachary T Welch [Tue, 10 Nov 2009 08:02:18 +0000 (00:02 -0800)]
command_handler_t: make argc unsigned
The number of command arguments will always be 0 or more, so use
the right type in handlers. This has a cascading effect up through
the layers, but the new COMMAND_HANDLER macros prevented total chaos.
Zachary T Welch [Wed, 11 Nov 2009 06:29:36 +0000 (22:29 -0800)]
add CMD_NAME macro for command handlers
By introducing the CMD_NAME macro, this parameter may be integrated
as args[-1] in command.[ch], without touching any other call sites.
Zachary T Welch [Wed, 11 Nov 2009 06:23:07 +0000 (22:23 -0800)]
use CALL_COMMAND_HANDLER instead of direct calls
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or
even removed in inherited signatures, without requiring revisiting
all of the various call sites.
Zachary T Welch [Tue, 10 Nov 2009 09:21:29 +0000 (01:21 -0800)]
add PLD_DEVICE_COMMAND_HANDLER macro
Update virtex module to use abstracted PLD command handling.
Zachary T Welch [Tue, 10 Nov 2009 08:53:40 +0000 (00:53 -0800)]
nand: add NAND_DEVICE_COMMAND_HANDLER macro
Abstracts the extended NAND command handling to allow the function
signature to be controlled by __COMMAND_HANDLER.
Zachary T Welch [Tue, 10 Nov 2009 09:41:30 +0000 (01:41 -0800)]
use FLASH_BANK_COMMAND_HANDLER macro
Defines all flash_bank_command handlers using the new macro.
Zachary T Welch [Tue, 10 Nov 2009 09:39:30 +0000 (01:39 -0800)]
add FLASH_BANK_COMMAND_HANDLER macro
The FLASH_BANK_COMMAND_HANDLER provides an extended command handler
using the __COMMAND_HANDLER macro, whereby changing that macro is
sufficient to update flash handlers with the new signature. It also
enforces uniform style and scope when implementing this handler.
Zachary T Welch [Tue, 10 Nov 2009 13:32:51 +0000 (05:32 -0800)]
s3c24xx: use COMMAND_HANDLER with command helper
Add S3C24XX_DEVICE_COMMAND macros to abstract common command handler
conventions.
Zachary T Welch [Tue, 10 Nov 2009 13:32:04 +0000 (05:32 -0800)]
arm_adi,armv7[am]: use COMMAND_HELPER for helpers
Rewrites the dap_* command helpers to use the COMMAND_HELPER paradigm.
Uses CALL_COMMAND_HELPER to hide inherited calling conventions.
Zachary T Welch [Tue, 10 Nov 2009 11:12:21 +0000 (03:12 -0800)]
use COMMAND_HELPER for command helper functions
Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
Zachary T Welch [Tue, 10 Nov 2009 07:56:52 +0000 (23:56 -0800)]
use COMMAND_HANDLER macro to define all commands
Zachary T Welch [Wed, 11 Nov 2009 03:00:01 +0000 (19:00 -0800)]
add command_handler_t type
This patch adds new typedefs for command handler callback functions.
Users of this type signature were updated to use these new types.
It uses the new __COMMAND_HANDLER macro to prevent duplication.
Zachary T Welch [Wed, 11 Nov 2009 02:51:32 +0000 (18:51 -0800)]
add COMMAND_HANDLER and COMMAND_HELPER macros
The COMMAND_HANDLER and COMMAND_HELPER macros allow commands to be
defined in a manner that decouples them from the exact order and type of
their parameters. Once converted, incremental changes to the command
handler type can be addressed in incremental patches that do not need to
touch the entire tree.
These macros' implementation, __COMMAND_HANDLER, is used to define the
new command_handler_t type, and additional patches will use it to derive
new macros to define extended command types (e.g. flash, nand, pld).
The CALL_COMMAND_HANDLER provides a means of calling helpers or nested
handlers from withing a command handler.
This patch uses C99 varadic macro expansion. Please report compilers
that cannot handle this code.
Zachary T Welch [Wed, 11 Nov 2009 02:42:45 +0000 (18:42 -0800)]
add command_output_handler_t
Add a typedef for command output handler function type, simplifying
the appearance of functions that use it and eliminating duplicate code.
David Brownell [Fri, 13 Nov 2009 16:45:20 +0000 (08:45 -0800)]
Cortex-A8: fix indent
The "remove (forward) declarations" patch goofed indentation on the
"cortexa8_target" struct; fix.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Zachary T Welch [Fri, 13 Nov 2009 05:19:41 +0000 (21:19 -0800)]
nand: rename device to nand
To be more informative (and consistent with flash and pld trees), change
'device' parameter name to 'nand' in NAND source files. This change
eliminates confusing 'device->device->' instance from the code, and
it simplifies the forthcoming command handler patches.
David Brownell [Fri, 13 Nov 2009 04:24:41 +0000 (20:24 -0800)]
ETM: start support for ETMv2+
ARM11 and newer cores include updated ETM modules. Recognize
their version codes and some key config differences. Sanity
checked on an OMAP2, with an ETM11RV r0p1 (ETMv3.1).
This still handles only scan chain 6, with at most 128 registers.
Newer cores (mostly, Cortex) will need to use the DAP instead.
Note that the newer ETM modules don't quite fit the quirky config
model of the older ones ... having more port widths is easy, but
the modes aren't the same. That still needs to change.
Fix a curious bug ... how did the register cache NOT get saved??
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Liam Redmond [Thu, 12 Nov 2009 20:50:41 +0000 (12:50 -0800)]
WinXP-x64: find right D2XX libraries
This trivial patch allows the config script to find the correct
FTDI2xx libraries under Windows XP x64 using msys.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Jonas Horberg [Thu, 12 Nov 2009 20:39:37 +0000 (12:39 -0800)]
parport: add support for the jtag_khz command.
Add the khz and speed_div functions to the parport interface driver.
Add the parport_toggling_time function that tells the parport driver
how long (in nanoseconds) it takes for the hardware to toggle TCK.
[dbrownell@users.sourceforge.net: tweak doc for clarity, mention
multimeter, and whitespace fixes]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 12 Nov 2009 05:57:44 +0000 (21:57 -0800)]
ETM: remove old mid-level ETM handle
Now that nothing uses the old ETM handle any more, remove it.
Add minimal header tweaks, letting non-ARM7 and non-ARM9 cores
access ETM facilities.
Now ARM11 could support standard ETM (and ETB) access as soon as
it derives from "struct arm" ... its scanchain 6 is used access
the ETM, just like ARM7 and ARM9.
The Cortex parts (both M3 and A8) will need modified access methods
(via ETM init parameters), so they use the DAP. Our first A8 target
(OMAP3) needs that for both ETM and ETB, but the M3 ETM isn't very
useful without SWO trace support (it's painfully stripped down), so
that support won't be worth adding for a while.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 12 Nov 2009 05:55:19 +0000 (21:55 -0800)]
ETM: use new toplevel ETM handle
Make ETM itself use the new toplevel ETM handle, instead
of the to-be-removed lower level one. As of this patch,
nothing should be using the old ARM7/ARM9-specific handle.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 12 Nov 2009 05:52:02 +0000 (21:52 -0800)]
ETM: update port drivers
Make both useful ETM port drivers (etb, etm_dummy) use the new
toplevel ETM handle, instead of the to-be-removed lower level one.
Do the same for the "oocd-trace" prototype too; and fix its
error reporting paths: return failure codes, don't exit(), etc
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 12 Nov 2009 05:50:10 +0000 (21:50 -0800)]
ETM: update arm[79]tdmi_examine()
Make ARM7 and ARM9 cores use the new toplevel ETM handle to
trigger ETM setup, not the to-be-removed lower level one.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 12 Nov 2009 05:49:14 +0000 (21:49 -0800)]
ARM: start generalized base type
Rename "struct armv4_5_common_s" as "struct arm". It needs
a bit more work to be properly generic, and to move out of
this header, but it's the best start we have on that today.
Add and initialize an optional ETM pointer, since that will
be the first thing that gets generalized.
The intent being: all ARMs should eventually derive from
this "struct arm", so they can reuse the current ETM logic.
(And later, more.) Currently the ARM cores that *don't* so
derive are only ARMv7-M (and thus Cortex-M3) and ARM11.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Zachary T Welch [Wed, 11 Nov 2009 07:10:26 +0000 (23:10 -0800)]
fix 'jtag interface' behavior
Without this patch, running "openocd -c 'jtag interface'" segfaults.
Now, it returns the string "undefined" when the interface is unset.
Zachary T Welch [Wed, 11 Nov 2009 18:20:55 +0000 (10:20 -0800)]
improve command registration
Eliminate duplicate code for linking commands into a list.
Adds a check to ensure the command does not already exist;
if it does, return that one instead of creating a duplicate.
Zachary T Welch [Wed, 11 Nov 2009 17:40:28 +0000 (09:40 -0800)]
add help regardless of callback
Add help for commands regardless of whether a handler is involved.
With this, all sorts of new commands can be found in 'help' text.
Hopefully, all of them have been documented....
Sadly, the lsort function appears to handle nested lists poorly, such
that sub-commands do not group with their parents.
Zachary T Welch [Wed, 11 Nov 2009 16:20:09 +0000 (08:20 -0800)]
eliminate duplicate helptext management
Add helpers to manage adding entries to the helptext list.
Adds support for arbitrarily nested commands.
Zachary T Welch [Wed, 11 Nov 2009 13:26:17 +0000 (05:26 -0800)]
add command_name helper
The command_name function returns a malloced string for a given
command and its parents. This can be used to display a message
to the user, but it is used internally to handle registration
and syntax errors. This helps permit arbitrary command nesting.
Zachary T Welch [Wed, 11 Nov 2009 15:19:13 +0000 (07:19 -0800)]
wrap help command
Use continuation characters to wrap the help command into 80 columns.
Zachary T Welch [Wed, 11 Nov 2009 11:19:29 +0000 (03:19 -0800)]
remove obsolete doxygen comments
Documenting command handler parameters is redundant and pointless.
Zachary T Welch [Tue, 10 Nov 2009 07:20:34 +0000 (23:20 -0800)]
remove more useless declarations
Removes forward declarations by moving command registration after
defintion of the command handlers.
Zachary T Welch [Wed, 11 Nov 2009 02:26:13 +0000 (18:26 -0800)]
cortex_a8: remove declarations, use static keyword
Zachary T Welch [Tue, 10 Nov 2009 12:27:15 +0000 (04:27 -0800)]
add const keyword to some APIs
Add 'const' keyword to 'char *' parameters to allow command handlers to
pass constant string arguments. These changes allow the 'args' command
handler to be changed to 'const' in a subsequent patch.
Zachary T Welch [Tue, 10 Nov 2009 10:43:11 +0000 (02:43 -0800)]
change argv to args in command handlers
Subsequent patches expect all command handlers to use a uniform
parameter naming scheme. In the entire tree, these two files used
standard 'argv' instead of our non-standard 'args'. This patch opts
to reduces the noise required to unify the command handlers, using
dominant 'args' form.
A future patch may be used to convert us back to the standard argv, but
that requires coordination with all developers to minimize disruptions.
Zachary T Welch [Mon, 9 Nov 2009 14:07:21 +0000 (06:07 -0800)]
script_debug(): improve types
Use unsigned type for number of arguments.
Zachary T Welch [Mon, 9 Nov 2009 14:09:30 +0000 (06:09 -0800)]
command.c: make private routines static
This patch also improves the signature of run_command function.
Zachary T Welch [Mon, 9 Nov 2009 14:12:02 +0000 (06:12 -0800)]
log: improve log_callback_fn signature
Use unsigned type for line number in log_callback_fn signature.
Zachary T Welch [Mon, 9 Nov 2009 13:45:57 +0000 (05:45 -0800)]
time_support: improve use of types
Update timeval_add_time to use long int; implement timeval_add with it.
Update timeval_ms to check gettimeofday return value, return int64_t.
Zachary T Welch [Tue, 10 Nov 2009 12:27:02 +0000 (04:27 -0800)]
makefiles: improve build order
Separates various groups of files to be built in logical succession.
In each layer, the core module (target.c, nand.c, etc.) is built _after_
their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of
their drivers (e.g. arm966e.c, mx3_nand.c).
This allows problems introduced at the bottom of the stack to result
in build failures as soon as possible, as the helpers and core should
wrap portions of them.
David Brownell [Wed, 11 Nov 2009 12:42:50 +0000 (04:42 -0800)]
ETM cleanup
Various cleanups of ETM related code.
- Saner error return paths
- Simplify arm7_9 init ... no need for extra zeroing!
- Shrink some lines
- Tweak some diagnostics
- Use shorter name for ETM struct type.
- Don't exit()
and similar. The diagnostics look forward to having
this ETM code work with more than just ARM7/ARM9.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Zachary T Welch [Wed, 11 Nov 2009 05:02:30 +0000 (21:02 -0800)]
fix bug in ARM720: bugfix
David Brownell [Wed, 11 Nov 2009 03:06:10 +0000 (19:06 -0800)]
ARM720: bugfix
The "ARM720 uses the new inheritance/nesting scheme" patch
wrongly scrubbed a calloc() from arm720t_target_create().
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Tue, 10 Nov 2009 19:58:31 +0000 (11:58 -0800)]
target: MMU-aware init for memory read/write
Start switching MMU handling over to a more sensible scheme.
Having an mmu() method enables MMU-aware behaviors. Not having
one kicks in simpler ones, with no distinction between virtual
and physical addresses.
Currently only a handful of targets have methods to read/write
physical memory: just arm720, arm920, and arm926. They should
all initialize OK now, but the arm*20 parts don't do the "extra"
stuff arm926 does (which should arguably be target-generic).
Also simplify how target_init() loops over all targets by making
it be a normal "for" loop, instead of scattering its three parts
to the four winds.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Tue, 10 Nov 2009 17:25:26 +0000 (09:25 -0800)]
target.cfg: (re)move some bogus reset_config lines
General rule, this is all board-specific and doesn't belong
in target config files. Some of these were just cosmetic.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Thomas Kindler [Tue, 10 Nov 2009 17:16:12 +0000 (09:16 -0800)]
stm32.cfg: remove reset_config
Here's a patch for the double-reset problem on STM32. I've tested
downloading and debugging with GDB and Eclipse, and everything seems
to work fine.
This effectively sets reset_config to none. trst_only would also
be ok, but that's better left to a board configuration file since
not all boards wire it up.
The NVIC is used to trigger reset, which at least on this chip also
pulses nSRST so the whole system does get rest -- exactly once.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Michael Bruck [Tue, 27 Oct 2009 21:41:00 +0000 (22:41 +0100)]
arm11: add etmr/etmw registers to access ETM via DBGTAP scan chain
First cut of these commands. Øyvind tinkered a bit with
the number parsing to bring it up to speed + rebased it.
Ready for testing.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Mon, 26 Oct 2009 13:39:32 +0000 (14:39 +0100)]
ARM11: remove old mrc/mcr commands
Switch to new commands in config scripts
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 10 Nov 2009 12:09:15 +0000 (13:09 +0100)]
telo.cfg: fix search paths
Add the missing "target/" prefix for scripts in the
target folder.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
David Brownell [Tue, 10 Nov 2009 10:01:20 +0000 (02:01 -0800)]
Target: minor cleanup
- improve some names -- a "default" prefix is not descriptive
- add doxygen @todo entries for some issues
- avr8 isn't ever going to need those MMU hooks
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Tue, 10 Nov 2009 09:36:59 +0000 (01:36 -0800)]
ARM920: implement basic MMU ops
mmu() works; virt2phys() fails and logs an error.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Tue, 10 Nov 2009 09:35:50 +0000 (01:35 -0800)]
ARM720: implement basic MMU ops
mmu() works; virt2phys() fails and logs an error.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Tue, 10 Nov 2009 09:33:59 +0000 (01:33 -0800)]
Target: fix bad error messages
And shrink a few too-long lines.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Øyvind Harboe [Sun, 8 Nov 2009 18:50:35 +0000 (19:50 +0100)]
httpd: fix warnings, more robust error handling, improved MIME handling
The httpd is work in progress...
No mime type set by default. Let the browser guess.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 10 Nov 2009 07:36:19 +0000 (08:36 +0100)]
tcl: HostOs now picks up eCos as well during compile time
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Zachary T Welch [Tue, 10 Nov 2009 05:24:45 +0000 (21:24 -0800)]
svf,xsvf,arm7_9_common: trim forard declarations
Remove forward declarations by reordering command registration.
Zachary T Welch [Tue, 10 Nov 2009 05:23:38 +0000 (21:23 -0800)]
command.c: make commands static
Removes useless declarations, moving the handler functions to appear
before their use in the (much bigger) command registriation function.
Zachary T Welch [Tue, 10 Nov 2009 05:22:48 +0000 (21:22 -0800)]
server: remove useless declarations
Remove server command declarations, make handler routines static.
Zachary T Welch [Tue, 10 Nov 2009 05:21:06 +0000 (21:21 -0800)]
jtag: remove useless declarations
Contrary to my previous assessment, some opportunities to remove forward
declarations were overlooked. Remove them by moving the definitions
of the command registration and interface structure to the end of files.
Zachary T Welch [Tue, 10 Nov 2009 03:24:06 +0000 (19:24 -0800)]
target.c: remove useless declarations
This patch removes the last batch of forward references from the tree,
moving the target command registration routines to the end of the file.
Zachary T Welch [Mon, 9 Nov 2009 17:20:34 +0000 (09:20 -0800)]
{pic32m,stm32}x.c: remove useless declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:34 +0000 (09:20 -0800)]
str{7,9}x*.c: remove useless forward declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:33 +0000 (09:20 -0800)]
flash/<various>.c: remove useless declarations
Remove useless forward declarations.
Moves flash structure definitions to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:33 +0000 (09:20 -0800)]
flash/<assorted>.c: remove useless declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:33 +0000 (09:20 -0800)]
flash/at91sam[37].c: remove useless declarations
Remove useless forward declarations.
Moves command registration to end of file.
Moves flash structure definitions to end of files.
Changes a few references to global flash structure to local refs.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:33 +0000 (09:20 -0800)]
flash/lpc2???.c: remove useless declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:33 +0000 (09:20 -0800)]
flash/*nand*.c: remove useless declarations
Remove useless forward declarations.
Moves command registration to end of files.
Moves flash structure definition to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Zachary T Welch [Mon, 9 Nov 2009 17:20:33 +0000 (09:20 -0800)]
flash/flash.c: remove forward declarations
Remove useless forward declarations.
Moves command registration to end of file.
Moves flash structure definition to end of file.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
David Brownell [Mon, 9 Nov 2009 22:46:23 +0000 (14:46 -0800)]
Revert "target: add target->type->has_mmu fn"
This patch introduced a bug preventing flash writes from working
on Cortex-M3 targets like the STM32. Moreover, it's the wrong
approach for handling no-MMU targets.
The right way to handle no-MMU targets is to provide accessors
for physical addresses, and use them everywhere; and any code
which tries to work with virtual-to-physical mappings should use
a identity mapping (which can be defaulted).
And ... we can tell if a target has an MMU by seeing if it's
got an mmu() method. No such methood means no MMU.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Mon, 9 Nov 2009 21:16:32 +0000 (13:16 -0800)]
finish removing deprecated/obsolete commands
It's been about a year since these were deprecated and, in most
cases, removed. There's no point in carrying that documentation,
or backwards compatibility for "jtag_device" and "jtag_speed",
around forever. (Or a few remnants of obsolete code...)
Removed a few obsolete uses of "jtag_speed":
- The Calao stuff hasn't worked since July 2008. (Those Atmel
targets need to work with a 32KHz core clock after reset until
board-specific init-reset code sets up the PLL and enables a
faster JTAg clock.)
- Parport speed controls don't actually work (tops out at about
1 MHz on typical HW).
- In general, speed controls need to live in board.cfg files (or
sometimes target.cfg files), not interface.cfg ...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Mon, 9 Nov 2009 20:02:23 +0000 (12:02 -0800)]
User's Guide: Flash/NAND doc tweaks
Rename the "Drivers, Options, and Commands" sections to be
just "Driver List" matching the earlier reference. Add an
example of parallel CFI flash.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Zachary T Welch [Mon, 9 Nov 2009 12:22:23 +0000 (04:22 -0800)]
src/target: remove 'extern' and wrap headers
Remove extern keywords from function prototypes and wrap long lines.
Zachary T Welch [Mon, 9 Nov 2009 12:21:36 +0000 (04:21 -0800)]
target.h: remove extern keyword and wrap
Removes 'extern' keyword from function prototypes and wraps long lines.
Zachary T Welch [Mon, 9 Nov 2009 11:38:34 +0000 (03:38 -0800)]
src/{server,pld,svf,xsvf}: remove 'extern' keyword
Removes 'extern' keyword from function declarations in header filess.
Zachary T Welch [Mon, 9 Nov 2009 11:10:11 +0000 (03:10 -0800)]
src/flash: remove 'extern' and wrap headers
Removes 'extern' keywords from function prototypes in the flash headers.
Wraps long lines to fit into 80 columns.
Adds multiple inclusion protection for s3c2xx_nand.h.
Zachary T Welch [Mon, 9 Nov 2009 10:53:22 +0000 (02:53 -0800)]
src/jtag: remove 'extern' and wrap headers.
Removes the 'extern' keyword from function declarations.
Wraps long prototypes to fit into 80 columns.
Fixes documentation for jtag_tap_s::{,has}idcode fields.
Zachary T Welch [Mon, 9 Nov 2009 10:47:00 +0000 (02:47 -0800)]
src/helper: wrap and clean headers.
Remove all useless 'extern' keywords from function prototypes.
Wraps long lines for readability.
David Brownell [Mon, 9 Nov 2009 17:40:55 +0000 (09:40 -0800)]
User's Guide: bugfix global state info
The "$ocd_HOSTOS" variable was wrongly documented. Fix its
documentation, and its value on Linux.
Shrink a few of the too-long lines.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Mon, 9 Nov 2009 17:34:51 +0000 (09:34 -0800)]
EmbeddedICE: minor cleanups
Add comments (Doxygen and normal), remove unused code,
shrink some overlong lines. Get rid of a forward decl.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Zachary T Welch [Sun, 8 Nov 2009 07:20:33 +0000 (23:20 -0800)]
Overhaul time support API
This patch changes the duration_* API in several ways. First, it
updates the API to use better names. Second, string formatting has
been removed from the API (with its associated malloc). Finally, a
new function added to convert the time into seconds, which can be
used (or formatted) by the caller. This eliminates hidden calls to
malloc that require associated calls to free().
This patch also removes the useless extern keyword from prototypes,
and it eliminates the duration_t typedef (use 'struct duration').
These API also allows proper error checking, as it is possible for
gettimeofday to fail in certain circumstances.
The consumers have all been chased to use this new API as well, as
there were relatively few cases doing this type of measurement.
In most cases, the code performs additional checks for errors, but
the calling code looks much cleaner in every case.
Zachary T Welch [Fri, 6 Nov 2009 11:50:26 +0000 (03:50 -0800)]
Add private header for ARM11 internals.
Reduces confusion about location of associated routines and
reduces clutter in the arm11 header.
Removes extra whitespace around the lines touched by these changes.
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)