aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-12-02move nor drivers to src/flash/norZachary T Welch
Moves NOR flash drivers to 'src/flash/nor/'. Adds 'src/flash/nor/Makefile.am'. Builds 'libocdflashnor.la'.
2009-12-02move nand drivers to src/flash/nand/Zachary T Welch
Moves NAND drivers to src/flash/nand/. Adds src/flash/nand/Makefile.am. Builds libocdflashnand.la.
2009-12-02ARM11: don't expose DSCRDavid Brownell
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!
2009-12-02ARM11: store a clean copy of DSCRDavid Brownell
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.
2009-12-02ARM11: don't expose WDTRDavid Brownell
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.
2009-12-02ARM11: don't expose RDTRDavid Brownell
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.
2009-12-02ARM11: streamline debug entryDavid Brownell
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.
2009-12-02ARM11: remove arm11->targetDavid Brownell
Don't need/want arm11->target; we have arm11->arm.target instead. Also remove some unused watchpoint stuff.
2009-12-02ARM DPM: tweak initializationDavid Brownell
Move the initial breakpoint/watchpoint disable calls to arm_dpm_initialize(), and start using that routine. This split helps with arm11 support.
2009-12-02fix configure problem when building w/o USBZachary T Welch
If building OpenOCD without any USB drivers, a warning would appear because $build_usb is never set to a sane default. This fixes it.
2009-12-02adding files required for distributionZachary T Welch
Add headers missing from Makefile rules to pass 'make distcheck'. These were included in the tree but were not added with those commits.
2009-12-02fix 'target init' command registrationZachary T Welch
The command handler registration was put at the top level, rather than as a subcommand. Move it to where it belongs.
2009-12-02stubs: buildfixDavid Brownell
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>
2009-12-02remove #if BUILD_HTTPDZachary T Welch
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.
2009-12-02remove BUILD_IOUTIL symbolZachary T Welch
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.
2009-12-02remove #if logic for openocd_sleep_*ludeZachary T Welch
Adds server_stubs.c to hold these routines, using automake logic to ensure it gets included under the right conditions.
2009-12-02target: factor init to 'target init'Zachary T Welch
Adds 'target init' command handler, called as part of 'init'.
2009-12-02target: factor target_init() into piecesZachary T Welch
Moves body of target initialization loop into a helper function, cleaning up its visual flow in the process.
2009-12-02jtag: factor init into 'jtag init'Zachary T Welch
Adds 'jtag init' command handler, which can be called as part of a fine-grained 'init' process.
2009-12-02flash: factor init to 'flash init'Zachary T Welch
Split flash initialiation into 'flash init', called from 'init'.
2009-12-02mflash: factor init to 'mflash init'Zachary T Welch
Splits mflash initialiation to 'mflash init', called from 'init'.
2009-12-02nand: factor init to 'nand init'Zachary T Welch
Split NAND initialization into 'nand init', which gets called from the main 'init' command.
2009-12-02pld: factor init to 'pld init'Zachary T Welch
Split PLD initialization into 'pld init', which gets called from 'init'.
2009-12-02ARMv7a/Cortex-A8: report watchpoint trigger insnDavid Brownell
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>
2009-12-02ARM: label SP and LR correctlyDavid Brownell
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>
2009-12-02zy1000: keep up with startup refactoring work.Øyvind Harboe
keep up with server_init() introduction. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-01Cortex-A8: basic watchpoint supportDavid Brownell
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>
2009-12-01ARM: core DPM support for watchpointsDavid Brownell
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>
2009-12-01ARMv7a: move constants out of Cortex-A8 headerDavid Brownell
These are architecturally defined, not core-specific. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-01Tcl and doc: update to match new 'arm mcr ...' etcDavid Brownell
Make them match the C code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-01target: at91eb40a.cfg is a board, not a target.Øyvind Harboe
Also updated to use target name when creating flash and set jtag_khz to 16000. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-01zy1000: keep up with latest changes to command handlingØyvind Harboe
Keep up with Jim Tcl interpreter creation cleanup. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-01command: the Jim interpreter can now be provided rather than createdØyvind Harboe
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>
2009-12-01ARM11: remove previous mcr()/mrc() methodsDavid Brownell
We don't need this code, now that the DPM code handles it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-01Cortex-A8: remove previous mcr()/mrc() methodsDavid Brownell
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>
2009-12-01ARM: implement mrc()/mcr() as DPM opsDavid Brownell
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>
2009-12-01target: "mcr" and "mrc" are ARM-specificDavid Brownell
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>
2009-12-01ARMv7-A: stop using CP15 opsDavid Brownell
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>
2009-12-01Cortex-A8: stop using CP15 opsDavid Brownell
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>
2009-12-01main: invoke jtag_interface_quit() explicitlyØyvind Harboe
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>
2009-11-30improve command prohibition error reportZachary T Welch
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'".
2009-11-30XScale: restore_context() cleanupDavid Brownell
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>
2009-11-30XScale: context restore, cleanup/bugfixDavid Brownell
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>
2009-11-30remove interp global variable!Zachary T Welch
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!
2009-11-30command output capture: do not use interp globalZachary T Welch
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.
2009-11-30do not extern 'interp' from command.cZachary T Welch
Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
2009-11-30target: avoid using interp global variableZachary T Welch
Adds 'interp' to target_event_action structure to avoid using the global variable of the same name.
2009-11-30jtag: avoid using interp global variableZachary T Welch
Adds 'interp' field to jtag_tap_event_action structure to avoid using the global variable of same name.
2009-11-30fix foo command group help messagesZachary T Welch
Splits the old help strings to provide proper usage as well.
2009-11-30make syntax errors respond with 'usage'Zachary T Welch
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.