- 02 Dec, 2009 11 commits
-
-
Zachary T Welch authored
Adds 'jtag init' command handler, which can be called as part of a fine-grained 'init' process.
-
Zachary T Welch authored
Split flash initialiation into 'flash init', called from 'init'.
-
Zachary T Welch authored
Splits mflash initialiation to 'mflash init', called from 'init'.
-
Zachary T Welch authored
Split NAND initialization into 'nand init', which gets called from the main 'init' command.
-
Zachary T Welch authored
Split PLD initialization into 'pld init', which gets called from 'init'.
-
David Brownell authored
Save and display the address of the instruction which triggered the watchpoint. Because of pipelining, that's well behind the PC value when debug entry completes. (Example in a subroutine that had been returned from...) Remove unused A8 stuff, mostly watchpoint hooks from the header. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
Except for USR/SYS mode, the labels for the shadowed SP and LR registers were reversed. LR is r14; SP is r13. Fix. This would not affect GDB users; GDB references are positional. Only folk working directly with OpenOCD register values would have noticed this bug. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
Øyvind Harboe authored
keep up with server_init() introduction. Signed-off-by:
Øyvind Harboe <oyvind.harboe@zylin.com>
-
David Brownell authored
Actually this should handle both breakpoints and watchpoints ... but the DPM framework only handles watchpoints for now. Works on Beagle. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
This is a NOP unless the underlying core exposes two new methods, and neither of the two cores using this (ARM11xx, Cortex-A8) do so yet. This patch only updates those cores so they pass a flag saying whether or not to update breakpoint and watchpoint status before resuming; and removing some now-needless anti-segfault code from ARM11. Cortex-A8 didn't have that code ... yes, it segfaulted when setting watchpoints. NOTE: this uses a slightly different strategy for setting/clearing breakpoints than the ARM7/ARM9/etc code uses. It leaves them alone unless it's *got* to change something, to speed halt/resume cycles (including single stepping). ALSO NOTE: this under-delivers for Cortex-A8, where regions with size up to 2 GBytes can be watched ... it handles watchpoints which ARM11 can also handle (size 1/2/4 bytes). Should get fixed later. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
These are architecturally defined, not core-specific. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
- 01 Dec, 2009 27 commits
-
-
David Brownell authored
Make them match the C code. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
Øyvind Harboe authored
Also updated to use target name when creating flash and set jtag_khz to 16000. Signed-off-by:
Øyvind Harboe <oyvind.harboe@zylin.com>
-
Øyvind Harboe authored
Keep up with Jim Tcl interpreter creation cleanup. Signed-off-by:
Øyvind Harboe <oyvind.harboe@zylin.com>
-
Øyvind Harboe authored
In embedded hosts, the Jim interpreter can come from the existing context rather than be created by OpenOCD. Signed-off-by:
Øyvind Harboe <oyvind.harboe@zylin.com>
-
David Brownell authored
We don't need this code, now that the DPM code handles it. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
We don't need this code, now that the DPM code handles it. Neither do we need the ARMv7-A CP15 operations; remove their remnants too. And disable a mostly-needless diagnostic. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
Instead of having separate ARM11 and Cortex-A8 implementations of this code, have one shared implementation which just builds on the existing "run instruction via R0" support. This enables followup patches to remove that now-unused code from those two drivers. (Patches to move the "mrc" and "mcr" code into "struct arm" are due too ... MIPS and other cores do not support those ARM-specific concepts.) Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
Switch "mrc" and "mcr" commands to be toplevel ARM operations, as they should initially have been. Correct the usage message for both commands: it matches ARM documentation (as one wants!) instead of reordering them to match the funky mrc() and mcr() method usage (sigh). For Cortex-A8: restore a line that got accidentally dropped, so the secure monitor mode shadow registers will show again. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
The ARMv7-A code uses read_cp15() to access fault registers. Instead, use DPM operations directly, passing in the relevant MRC instructions. This eliminates per-operation overhead (though it'll be hard to observe, this is uncommon) and helps eliminate read_cp15(). Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
There were two chunks of Cortex-A8 code which called the ARMv7-A CP15 operations; get rid of them, helping prepare to remove those methods completely: - post_debug_entry() can use the mrc() method to read its two registers. - write_memory() can use dpm->instr_write_data_r0() to flush the ICache and DCache ... doing it this way is actually faster since it reduces per-write overhead. Note that the mrc() method parameters are re-ordered with respect to the ARM instruction documentation, so that part can be confusing. Cleaned up the layout and comments in those areas a bit. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
Øyvind Harboe authored
There is no particular reason to invoke jtag_interface_quit() on the atexit() handler, it just makes the code more obtuse and stops other legitimate usage of atexit(). Signed-off-by:
Øyvind Harboe <oyvind.harboe@zylin.com>
-
Zachary T Welch authored
Ensures that the correct information gets displayed, depending on the mode of the command being denied. Fixes misreporting all commands as needing to run "before 'init'".
-
David Brownell authored
Clean up two aspects to this routine: bad naming, since it doesn't restore the context, just the banked registers; and excess indentation for the bulk of the code. Also make some of its call sites stash the function's return code; someday they should use it for error checking. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
This "loop over all registers" routine shared the same mess as full_context() in terms of dozens of needless number_to_mode() calls. Fix that, and comments, with related cleanup. The misnamed xscale_restore_context() had a related bug. It was restoring the *WRONG REGISTERS* ... always from whatever the current mode was, instead of using the copy from whichever register bank it was trying to restore. (But it marked the intended register as having been restored...) Fixed that. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
Zachary T Welch authored
Finish removing references to the 'interp' global variable from the command module, encapsulating all reference via command_context. Eliminates use of the global entirely, so it can be removed. Hurrah!
-
Zachary T Welch authored
Adds a log_capture_state structure to pass to the log capture callback used by the command module. Ensures that the capture occurs in the proper context.
-
Zachary T Welch authored
Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
-
Zachary T Welch authored
Adds 'interp' to target_event_action structure to avoid using the global variable of the same name.
-
Zachary T Welch authored
Adds 'interp' field to jtag_tap_event_action structure to avoid using the global variable of same name.
-
Zachary T Welch authored
Splits the old help strings to provide proper usage as well.
-
Zachary T Welch authored
The 'help' text will become more verbose, so its entire text will be far more than desired when you only borked your syntax. The usage still allows the commands to be looked up for more help.
-
Zachary T Welch authored
Somehow, the comment block for command handlers ended up associated with the output_handler. Move it to the command_handler_t declaration.
-
Zachary T Welch authored
command_done() does not need to return an error, but it needed Doxygen comment. Provide some for copy_command_context as well. Note: this audit revealed some potential bugs with the command context implementation. There was a reason that commands were added at the end of the list. Shallow copying of command_context means that the list is shared between them. And commands added at the top-level before the pre-existing commands will not be available in the shared context as they were before. Yikes! Fortunately, this does not seem to occur in general use, as 'add_help_text' gets registered in startup.tcl and claims the first slot in my own test cases. Thus, it seems that we have been masking the issue for now, but it shows the need for further architectural improvement in the core command module.
-
Zachary T Welch authored
With the ability to defer 'init', users can access the help system while still in CONFIG mode. This patch omits commands from the help and usage list when they cannot be run in the current command mode, making it much easier to see what can be done at a given time.
-
Zachary T Welch authored
Adds 'noinit' command to prevent OpenOCD from running 'init' at the end up startup, allowing it to be given from telnet or TCL. This provides the old behavior by default, and users can add this command to their scripts to get the new behavior.
-
Zachary T Welch authored
Moves the telnet and TCL server startup to server_init(), moving their respective command registration in to server_register_commands(). Adds proper error checking for these particular startup processes. Moves the core server startup to openocd_main(), improving related error checking and preparing to defer 'init'.
-
Zachary T Welch authored
Rework gdb_init to create flexible APIs (gdb_target_add_{one,all}) and static helper (gdb_target_start) for starting GDB services. Eliminates duplicated code and provides general mechanisms for adding GDB services. The 'init' command is updated to call the new API, and later patches can decouple its policy of adding all targets therein. Provides the new capability to use both piped and TCP servers when multiple targets are defined. The first target fills the pipe, and others will be started on TCP ports (unless disabled, i.e. gdb_port=0).
-
- 30 Nov, 2009 1 commit
-
-
Øyvind Harboe authored
Add missing COMMAND_REGISTRATION_DONE. For now the command syntax for zy1000 needs to be compatible across 0.3/0.4, the world outside OpenOCD interfaces to zy1000 using the old syntax. Post 0.4 release(0.4.1 even) I'll switch to subcommand scheme. Switch to subcommands post 0.3 lifecycle. Signed-off-by:
Øyvind Harboe <oyvind.harboe@zylin.com>
-
- 29 Nov, 2009 1 commit
-
-
David Brownell authored
Streamline the loop by continuing as soon as we know there's no work to be done; this lets us un-indent almost everything. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-