aboutsummaryrefslogtreecommitdiff
path: root/src/openocd.c
AgeCommit message (Collapse)AuthorFilesLines
2009-12-03change #include "xsvf.h" to <xsvf/xsvf.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "svf.h" to <svf/svf.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "pld.h" to <pld/pld.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "server.h" to <server/server.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "httpd.h" to <server/httpd.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "gdb_server.h" to <server/gdb_server.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "nand.h" to <flash/nand.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "mflash.h" to <flash/mflash.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "jtag.h" to <jtag/jtag.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "ioutil.h" to <helper/ioutil.h>Zachary T Welch1-1/+1
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.
2009-12-03change #include "configuration.h" to <helper/configuration.h>Zachary T Welch1-1/+1
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.
2009-12-02remove #if BUILD_HTTPDZachary T Welch1-4/+0
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 Welch1-6/+1
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 Welch1-14/+0
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 Welch1-5/+2
Adds 'target init' command handler, called as part of 'init'.
2009-12-02jtag: factor init into 'jtag init'Zachary T Welch1-7/+9
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 Welch1-3/+2
Split flash initialiation into 'flash init', called from 'init'.
2009-12-02mflash: factor init to 'mflash init'Zachary T Welch1-3/+2
Splits mflash initialiation to 'mflash init', called from 'init'.
2009-12-02nand: factor init to 'nand init'Zachary T Welch1-3/+2
Split NAND initialization into 'nand init', which gets called from the main 'init' command.
2009-12-02pld: factor init to 'pld init'Zachary T Welch1-2/+3
Split PLD initialization into 'pld init', which gets called from 'init'.
2009-12-01command: the Jim interpreter can now be provided rather than createdØyvind Harboe1-3/+3
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-01main: invoke jtag_interface_quit() explicitlyØyvind Harboe1-6/+2
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-30do not extern 'interp' from command.cZachary T Welch1-1/+1
Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
2009-11-30allow deferal of initZachary T Welch1-4/+23
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.
2009-11-30move server_init() to openocd_main()Zachary T Welch1-18/+13
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'.
2009-11-30improve gdb_init() sequenceZachary T Welch1-1/+1
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).
2009-11-28bugfix: 'init' changes state, not main()David Brownell1-1/+2
Code other than main() may invoke "init". When it does so, customized handlers may need to run ... so make sure the command context state is updated before they do so. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-25log: improve initializationZachary T Welch1-5/+4
Removes redundant assignment of start_ms from log_register_commands(). Eliminates command_context parameter and return value. Adds Doxygen comment block for this API call.
2009-11-25improve command handling examplesZachary T Welch1-4/+0
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.
2009-11-24httpd: use register_commands()Zachary T Welch1-5/+2
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.
2009-11-24openocd: use register_commands()Zachary T Welch1-6/+18
Use register_commands() for top-level version and init command.
2009-11-24use COMMAND_REGISTER macroZachary T Welch1-2/+2
Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
2009-11-20refactor command registrationZachary T Welch1-1/+1
Refactors the command registration to use helpers to simplify the code. The unregistration routines were made more flexible by allowing them to operate on a single command, such that one can remove all of a commands children in one step (perhaps before adding back a 'config' subcommand that allows getting the others back). Eliminates a bit of duplicated code and adds full API documentation for these routines.
2009-11-18pass startup_tcl to command_initZachary T Welch1-1/+2
Removes external linkage from helper module, making the startup code a parameter to a new command context's initialization routine.
2009-11-17command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch1-9/+9
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17command_handler: change to 'argc' to CMD_ARGCZachary T Welch1-2/+2
This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
2009-11-16#include "target.h" less wildlyDavid Brownell1-1/+0
Don't include "target.h" from more headers than necessary. This avoids needless interdependencies and duplicated include paths. Don't needlessly include it in source files, either. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16target: less implicit inclusion of "command.h"David Brownell1-1/+0
Lots of files still include it, often through needless duplicate inclusion of "log.h"; sigh. This cleans up the inclusion graph a bunch, so there are fewer inclusion paths, but it doesn't change much otherwise. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-14remove annoying $URL$ startup messageDavid Brownell1-17/+0
It's completely unused; the obnoxious "DANGER!!!" comments don't even explain what it was doing (shorthand SVN magic). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-13command_context_t -> struct command_contextZachary T Welch1-6/+6
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13target_t -> struct targetZachary T Welch1-1/+1
Remove misleading typedef and redundant suffix from struct target.
2009-11-13add src/hello.c to augment new command tutorialZachary T Welch1-0/+4
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.
2009-11-13use COMMAND_HANDLER macro to define all commandsZachary T Welch1-2/+2
2009-10-08Change most in-tree references from SVN to GIT.dbrownell1-1/+3
Also, talk about "mainline" not "trunk". The release.txt and release.sh files need more updates. git-svn-id: svn://svn.berlios.de/openocd/trunk@2825 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-10-07Change version labels to work better with GITdbrownell1-1/+1
- The guess-rev.sh script is now a tweaked version of "setlocalversion" as seen in Linux, U-Boot, and various other projects. When it finds source control support (git, hg, svn) it uses IDs from there. Else (specific to this project) it reports itself as "-snapshot", e.g. from gitweb. I verified this new "guess-rev.sh" script runs under Cygwin. - Also update the generic version strings to be like "0.3.0-dev" (during development) instead of the very long "0.3.0-in-development". These also show up in the PDF docs. For better tracking, we might eventually change these strings to include the version IDs too. - Change the startup banner version strings so they include the guess-rev output. Development and release versions with GIT will be like Open On-Chip Debugger 0.3.0-dev-00282-g7191a4f-dirty (2009-10-05-20:57) Open On-Chip Debugger 0.3.0 (2009-10-05-20:57) instead of the previous SVN-specific (even when using git-svn!) Open On-Chip Debugger 0.3.0-in-development (2009-10-05-01:39) svn:exported Open On-Chip Debugger 0.3.0 (2009-10-05-01:39) Release git-svn-id: svn://svn.berlios.de/openocd/trunk@2809 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-17Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixesoharboe1-1/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-30Make bug reporting output at program start-ups use fewer new lines:zwelch1-2/+3
- Move repository URL output associate it with the version; they relate. - 'openocd --version' output now appears much more terse, as expected. git-svn-id: svn://svn.berlios.de/openocd/trunk@2421 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace that occurs before ')'.zwelch1-2/+2
- Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace that occurs after '('.zwelch1-2/+2
- Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '=' whitespacezwelch1-5/+5
- Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60