Commit Graph

212 Commits

Author SHA1 Message Date
Zachary T Welch 6ec526e706 remove #if BUILD_HTTPD
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-02 13:26:26 -08:00
Zachary T Welch eaf10f69de remove BUILD_IOUTIL symbol
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-02 13:26:26 -08:00
Zachary T Welch 34654359a9 remove #if logic for openocd_sleep_*lude
Adds server_stubs.c to hold these routines, using automake logic to
ensure it gets included under the right conditions.
2009-12-02 13:26:26 -08:00
Zachary T Welch 62fbb0f545 target: factor init to 'target init'
Adds 'target init' command handler, called as part of 'init'.
2009-12-02 13:26:23 -08:00
Zachary T Welch ac1887c703 jtag: factor init into 'jtag init'
Adds 'jtag init' command handler, which can be called as part of a
fine-grained 'init' process.
2009-12-02 13:26:22 -08:00
Zachary T Welch 37201c019f flash: factor init to 'flash init'
Split flash initialiation into 'flash init', called from 'init'.
2009-12-02 13:26:22 -08:00
Zachary T Welch 1de0b9d351 mflash: factor init to 'mflash init'
Splits mflash initialiation to 'mflash init', called from 'init'.
2009-12-02 13:26:22 -08:00
Zachary T Welch 747f8af672 nand: factor init to 'nand init'
Split NAND initialization into 'nand init', which gets called from
the main 'init' command.
2009-12-02 13:26:22 -08:00
Zachary T Welch 682910fdc2 pld: factor init to 'pld init'
Split PLD initialization into 'pld init', which gets called from 'init'.
2009-12-02 13:26:22 -08:00
Øyvind Harboe 5576a6240a command: the Jim interpreter can now be provided rather than created
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-01 09:53:23 +01:00
Øyvind Harboe 51e9b25c9a main: invoke jtag_interface_quit() explicitly
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-12-01 07:51:26 +01:00
Zachary T Welch 7b2906de24 do not extern 'interp' from command.c
Adds 'interp' field to command_context, chasing the few remaining
references to the global variable outside of the command module.
2009-11-30 16:29:34 -08:00
Zachary T Welch cee1f39f18 allow deferal of init
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-30 16:29:24 -08:00
Zachary T Welch 64653b0bbb move server_init() to openocd_main()
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-30 16:29:24 -08:00
Zachary T Welch ec6c1962c2 improve gdb_init() sequence
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-30 16:29:24 -08:00
David Brownell 3debd59c5e bugfix: 'init' changes state, not main()
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-28 23:11:31 -08:00
Zachary T Welch be482a5335 log: improve initialization
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-25 10:29:06 -08:00
Zachary T Welch a93b404161 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.
2009-11-25 10:29:05 -08:00
Zachary T Welch 8f5ff3ddcf 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.
2009-11-24 21:37:37 -08:00
Zachary T Welch 1595fd7c4b openocd: use register_commands()
Use register_commands() for top-level version and init command.
2009-11-24 21:37:32 -08:00
Zachary T Welch 833e7f5248 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.
2009-11-24 21:37:29 -08:00
Zachary T Welch 9e9633c6b9 refactor command registration
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-20 14:52:56 -08:00
Zachary T Welch 5e229bbf87 pass startup_tcl to command_init
Removes external linkage from helper module, making the startup
code a parameter to a new command context's initialization routine.
2009-11-18 07:22:22 -08:00
Zachary T Welch 2861877b32 command_handler: change 'cmd_ctx' to CMD_CTX
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17 11:40:06 -08:00
Zachary T Welch 7bf1a86e47 command_handler: change to 'argc' to CMD_ARGC
This patch converts all instances of 'argc' in COMMAND_HANDLER routines
to use CMD_ARGC.
2009-11-17 11:38:06 -08:00
David Brownell b695cb7522 #include "target.h" less wildly
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-16 00:35:24 -08:00
David Brownell 1186f7efa7 target: less implicit inclusion of "command.h"
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-16 00:35:11 -08:00
David Brownell 7f48f463a1 remove annoying $URL$ startup message
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-14 12:42:50 -08:00
Zachary T Welch 98723c4ecd command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13 13:25:47 -08:00
Zachary T Welch 0f1163e823 target_t -> struct target
Remove misleading typedef and redundant suffix from struct target.
2009-11-13 11:58:14 -08:00
Zachary T Welch 89870c86e7 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.
2009-11-13 10:57:57 -08:00
Zachary T Welch cfc4d5c6b7 use COMMAND_HANDLER macro to define all commands 2009-11-13 10:51:45 -08:00
dbrownell 03c9e48f88 Change most in-tree references from SVN to GIT.
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-08 00:13:50 +00:00
dbrownell b1f7b35983 Change version labels to work better with GIT
- 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-10-07 05:43:05 +00:00
oharboe 8b994145b8 Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-17 19:54:25 +00:00
zwelch 4d26afdf5c Make bug reporting output at program start-ups use fewer new lines:
- 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-30 05:33:41 +00:00
zwelch dc575dc5bf Remove whitespace that occurs before ')'.
- Replace '[ \t]*[)]' with ')'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:47:42 +00:00
zwelch f90d8fa45f Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:46:23 +00:00
zwelch 84df52f9ea - Fixes '=' whitespace
- 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
2009-06-23 22:42:54 +00:00
zwelch 53d605e12c - Fixes '!=' whitespace
- 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@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:38:12 +00:00
zwelch 335fee3f36 Encapsulate the global "jtag" jtag_interface pointer:
- Add jtag_interface_quit, factored from exit_handler() in openocd.c.
- Remove its extern declaration.
- Add static keyword to its definition.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1952 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 22:23:12 +00:00
zwelch f532c7faf8 Audit and eliminate redundant #include directives in main src/ files.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1716 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 05:00:17 +00:00
zwelch 490e271290 Remove redundant sys/types.h #include directives (now in types.h).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1700 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 02:27:16 +00:00
zwelch 104580e0bf Reverse revision 1691: all of its functionality has migrated elsewhere.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1694 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 21:33:53 +00:00
zwelch 72acdac71a Revive tclapi.c from r1650:
* Remove superfluous #include directives.
* Fix warnings and API usage to cure its bit rot.
* Build into libhelper library (for now).
Add tclapi.h to export tclapi_register_commands().
Register tclapi commands in openocd.c:setup_command_handler().



git-svn-id: svn://svn.berlios.de/openocd/trunk@1691 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 19:44:38 +00:00
oharboe ea3e49f4e2 fix embedded builds
git-svn-id: svn://svn.berlios.de/openocd/trunk@1598 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-03 20:48:20 +00:00
oharboe 6cacbd9575 Dick Hollenbeck <dick@softplc.com> moved stuff into openocd.c - should never have been in main.c in the first place. DLL will now build.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1590 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-02 19:31:30 +00:00
zwelch dee85e5a00 Add static keywords to main application helper functions.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1587 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-01 03:07:32 +00:00
zwelch 1743395250 Dick Hollenbeck <dick@softplc.com>: move OPENOCD_VERSION to use config.h
git-svn-id: svn://svn.berlios.de/openocd/trunk@1586 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-01 01:18:05 +00:00
kc8apf 15b4be1c9c Fixes for handling release versions
git-svn-id: svn://svn.berlios.de/openocd/trunk@1347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-20 04:03:31 +00:00
ntfreak 0bcbff348b - remove unused includes, fixes build issues under FreeBSD
git-svn-id: svn://svn.berlios.de/openocd/trunk@1341 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-19 19:54:44 +00:00
kc8apf c8bc0bb1ae SVF player courtesy of Simon Qian <simonqian@SimonQian.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1339 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-19 07:13:02 +00:00
oharboe 59ff8d24d8 moved ioutil init to the right spot: before config scripts
git-svn-id: svn://svn.berlios.de/openocd/trunk@1311 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-09 11:44:01 +00:00
oharboe e873a6d27c check syntax for init/version
git-svn-id: svn://svn.berlios.de/openocd/trunk@1257 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-17 14:55:12 +00:00
oharboe 0fc19255c3 work in progress to hook up libmicrohttpd + tcl integration
git-svn-id: svn://svn.berlios.de/openocd/trunk@1251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-16 22:20:10 +00:00
oharboe a98e1094a0 sync up to tap_xxx rename + add with-ioutil for standalone openocd implemetnations
git-svn-id: svn://svn.berlios.de/openocd/trunk@1243 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-15 11:32:22 +00:00
ntfreak 0cba0d4df3 - remove target specific variant and use target->variant member
- fix build warning in cortex_m3
- code cleanup - remove trailing lf and convert c++ comments

git-svn-id: svn://svn.berlios.de/openocd/trunk@1238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-13 12:44:39 +00:00
oharboe 71c7306885 fix telnet async messages. retired telnet_async command - no user serviceable parts inside.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1135 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-05 08:48:50 +00:00
oharboe a3035243dc unsik Kim <donari75@gmail.com> - mflash support
git-svn-id: svn://svn.berlios.de/openocd/trunk@1067 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-16 06:15:03 +00:00
ntfreak 4457800afe - fix tcl_port typo in docs
- remove build warning from openocd.c
- add missing svn props


git-svn-id: svn://svn.berlios.de/openocd/trunk@1065 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-15 15:11:36 +00:00
oharboe 30e5bff4b8 Richard Missenden exit now works during startup script
git-svn-id: svn://svn.berlios.de/openocd/trunk@1031 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-08 13:07:21 +00:00
oharboe 9d4f9dbd0b reduce patch problems by moving $xxx expansion into seperate fn
git-svn-id: svn://svn.berlios.de/openocd/trunk@1027 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-07 18:12:07 +00:00
ntfreak bdb5fd8c98 - renamed x7926 driver to aduc702x to match other flash drivers
- removed c99 types (mingw issues) from aduc driver and cleanup
- updated docs for aduc702x flash driver

git-svn-id: svn://svn.berlios.de/openocd/trunk@995 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-24 22:15:22 +00:00
oharboe 1b84df5be5 put instructions on how to report bugs onto the users radar
git-svn-id: svn://svn.berlios.de/openocd/trunk@988 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-21 08:24:23 +00:00
ntfreak ce16ff901c - fix target_examine declaration
- remove build warnings
- added --enable-gccwarnings to docs
- update mips_m4k_examine function

git-svn-id: svn://svn.berlios.de/openocd/trunk@893 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-06 14:36:37 +00:00
oharboe 09bb073239 GDB monitor commands now also get halted state upon e.g. "reset halt".
git-svn-id: svn://svn.berlios.de/openocd/trunk@892 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-05 14:58:37 +00:00
oharboe 91a16a3810 Better handling of OpenOCD command invocation result/context.
git-svn-id: svn://svn.berlios.de/openocd/trunk@866 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-24 10:16:44 +00:00
oharboe 2cac9c333f daemon_startup is now retired in favour of adding "init" and "reset halt/init/run" to the end of the config file/openocd command line.
git-svn-id: svn://svn.berlios.de/openocd/trunk@835 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-19 08:04:32 +00:00
oharboe 679592d42e Charles Hardin <ckhardin@gmail.com> move tcl stuff nearer to where it belongs.
git-svn-id: svn://svn.berlios.de/openocd/trunk@824 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-18 06:24:57 +00:00
oharboe 0ebb33b185 Charles Hardin ckhardin at gmail.com Instead of stashing the context in a global variable, just use the "context"
associated with the interp structure being passed around

And fixed the message referring to mem2array in the array2mem function


git-svn-id: svn://svn.berlios.de/openocd/trunk@821 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-17 17:31:07 +00:00
oharboe 5fefa83d07 Collect output from openocd commands into openocd_output local variable
git-svn-id: svn://svn.berlios.de/openocd/trunk@820 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-17 12:02:55 +00:00
oharboe 5a3712072f Charles Hardin ckhardin at gmail.com
There isn't a real value to the cfg_cmd_ctx since everything should be run thru the initial context created at start.


git-svn-id: svn://svn.berlios.de/openocd/trunk@819 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-17 08:39:06 +00:00
oharboe 44928321e6 Charles Hardin <ckhardin@gmail.com> and Øyvind Harboe
This patch just uses the command.c interface to create tcl commands for the root level commands and avoids a bit of the "TCL" bleed into the rest of the openocd code.

Multilevel commands also supported.


git-svn-id: svn://svn.berlios.de/openocd/trunk@818 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-17 08:34:14 +00:00
oharboe 3287b8661d Fixes to \ and / handling for OpenOCD
git-svn-id: svn://svn.berlios.de/openocd/trunk@815 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-16 20:20:15 +00:00
oharboe cb90c97f33 do not print jim tcl error message trace for ERROR_COMMAND_CLOSE_CONNECTION
git-svn-id: svn://svn.berlios.de/openocd/trunk@812 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-16 10:12:29 +00:00
oharboe 396d73ad0c better error messages for target event scripts.
git-svn-id: svn://svn.berlios.de/openocd/trunk@810 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-16 07:22:17 +00:00
oharboe acce2bcccb Charles Hardin <ckhardin@gmail.com>
This evaluates the file at the correct level for the interpreter and the
sets and all the globals are then done as expected.

added a const to find_file function to avoid typecasting

git-svn-id: svn://svn.berlios.de/openocd/trunk@806 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-14 06:34:23 +00:00
ntfreak 696a20fea4 - remove unused objcopy from configure.in
- make sure bin2char is built before openocd
- add generated startup_tcl.c to clean list
- pass startup_tcl directly to Jim_Eval

git-svn-id: svn://svn.berlios.de/openocd/trunk@805 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-13 21:07:14 +00:00
oharboe 766b0ca8ac Charles Hardin <ckhardin@gmail.com> - hopefully final word on startup.tcl => c conversion
git-svn-id: svn://svn.berlios.de/openocd/trunk@803 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-13 17:31:40 +00:00
oharboe 6956527849 Duane Ellis <openocd@duaneellis.com> fix to tcl puts
git-svn-id: svn://svn.berlios.de/openocd/trunk@802 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-13 08:25:33 +00:00
ntfreak 2e832a399a - remove requirement for file2c.tcl
git-svn-id: svn://svn.berlios.de/openocd/trunk@800 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-12 16:25:17 +00:00
oharboe 69c6f1f7ea work in progress to improve help
git-svn-id: svn://svn.berlios.de/openocd/trunk@792 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-11 15:07:58 +00:00
oharboe c5b718f5e8 - retired variable stuff.
- drscan is now a low level tcl command:
 execute DR scan <device> <num_bits> <value> <num_bits1> <value2> 
- removed obsolete partial command text support

git-svn-id: svn://svn.berlios.de/openocd/trunk@791 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-11 12:17:56 +00:00
oharboe efc6063df8 startup.tcl (former commands.tcl) is now embedded into OpenOCD executable.
git-svn-id: svn://svn.berlios.de/openocd/trunk@787 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-11 06:44:22 +00:00
oharboe 2b3f4fd293 Charles Hardin <ckhardin@gmail.com>
Add semantics to support memwrite(32,16,8) with an array2mem command
Move the global up in bits2bytes.tcl so the set puts the value in the global
context.
Add memwrite procs to memory.tcl

git-svn-id: svn://svn.berlios.de/openocd/trunk@786 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-10 18:47:50 +00:00
oharboe 2858a9f740 - added search paths before running tcl/commands.tcl.
- improved error handling for missing tcl/commands.tcl


git-svn-id: svn://svn.berlios.de/openocd/trunk@785 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-10 18:24:30 +00:00
oharboe bfa8c1b321 SEGFAULT fix for syntax error.
git-svn-id: svn://svn.berlios.de/openocd/trunk@783 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-10 08:57:35 +00:00
oharboe 92beb99bf7 improve error messages a little bit.
git-svn-id: svn://svn.berlios.de/openocd/trunk@781 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-09 22:19:05 +00:00
oharboe 66410d2537 "flash banks" is now implemented in Tcl on top of "flash_banks". openocd_throw prefix is no longer required when executing OpenOCD commands from tcl.
git-svn-id: svn://svn.berlios.de/openocd/trunk@779 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-09 15:22:05 +00:00
oharboe f0f5157e09 tcl regression fixes.
git-svn-id: svn://svn.berlios.de/openocd/trunk@774 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-08 16:05:59 +00:00
ntfreak 31e2500259 - apply correct formatting to openocd.c
- Thanks Charles Hardin

git-svn-id: svn://svn.berlios.de/openocd/trunk@770 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-08 08:55:53 +00:00
oharboe 225ac18450 more tcl cleanup.
git-svn-id: svn://svn.berlios.de/openocd/trunk@768 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-07 20:02:51 +00:00
oharboe b31d83c6c7 added pre/postlude fn's for when OpenOCD is sleeping.
git-svn-id: svn://svn.berlios.de/openocd/trunk@765 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-07 08:05:07 +00:00
ntfreak 655e4f88a6 - fixed build issues with win32
- fixed build warnings for last commit
- set svn props for last commit

git-svn-id: svn://svn.berlios.de/openocd/trunk@760 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06 23:22:17 +00:00
oharboe 163bd86071 moving Tcl stuff around slightly.
git-svn-id: svn://svn.berlios.de/openocd/trunk@759 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06 22:03:07 +00:00
oharboe 0bb7c9d109 fix a few compilation problems.
git-svn-id: svn://svn.berlios.de/openocd/trunk@758 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06 19:56:15 +00:00
oharboe 2b673d0c1e Charles Hardin <ckhardin@gmail.com> - Tcl Server
git-svn-id: svn://svn.berlios.de/openocd/trunk@757 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06 19:33:05 +00:00
oharboe dc796a2091 src/helper/configuration.h
- Log output handlers now get a "const char *line"
	- Added "const" to parameter.

src/helper/command.c
src/helper/command.h
	- New function:  'command_output_text()'
	- Log output handlers now get a "const char *line"
 
src/helper/options.c
	- Log output handlers now get a "const char *line"

src/server/telnet_server.c
	- DO not transmit NULL bytes via TELNET.
	- Log output handlers now get a "const char *line"
	
src/server/gdb_server.c
	- Log output handlers now get a "const char *line"
	
	*** THIS INCLUDES PORTIONS OF A PATCH FROM Oyvind sent 
	previously to the mailing list for TCL users try

src/target/target.c
	*** THIS INCLUDES PORTIONS OF A PATCH FROM Oyvind sent 
	previously to the mailing list for TCL users try
	
src/target/target.h
	*** THIS INCLUDES PORTIONS OF A PATCH FROM Oyvind sent 
	previously to the mailing list for TCL users try

src/openocd.c
    - **MAJOR** Work: New TCL/Jim function: mem2array
	- **MAJOR** Work: Redirect Tcl/Jim stdio output to remote users.
	- Previously: TCL output did not go to GDB.
	- Previously: TCL output did not go to TELNET
	- Previously: TCL output only goes to control console.
	- This fixes that problem.
	+ Created callbacks:
		+openocd_jim_fwrite()	
		+openocd_jim_fread()
		+openocd_jim_vfprintf()
		+openocd_jim_fflush()
		+openocd_jim_fgets()

src/Makefile.am
	- New TCL files.
	- Future note: This should be more automated.  As the list of
	  'tcl' files grows maintaning this list will suck.

src/Jim.c
	- ** THIS INCLUDES A PREVIOUS PATCH I SENT EARLIER **
	- that impliments many [format] specifies JIM did not support.
	- Jim_FormatString() - **MAJOR** work.
	- Previously only supported "%s" "%d" and "%c"
	- And what support existed had bugs.
	- NEW: *MANY* formating parameters are now supported.
	- TODO: The "precision" specifier is not supported.

	** NEW ** This patch.
	
	- Jim_StringToWide() test if no conversion occured.
	- Jim_StringToIndex() test if no conversion occured.
	- Jim_StringToDouble() test if no conversion occured.

	** NEW ** This Patch. Major Work.
	- Previously output from JIM did not get sent to GDB
	- Ditto: Output to Telnet session.
	- Above items are now fixed - By introducing callbacks
	  new function pointers in the "interp" structure.

	- Helpers that call the callbacks.
	
	- New function: Jim_fprintf()
	- New function: Jim_vfprintf()
	- New function: Jim_fwrite()
	- New function: Jim_fread()
	- New function: Jim_fflush()
	- New function: Jim_fgets()

	By default: the output is to STDIO as previous.
	The "openocd.c" - redirects the output as needed.
	
	- Jim_Panic() - Send panic to both STDERR and the interps
	specified STDERR output as a 2nd choice.

	- Now JIM's "stdin/stdout/stderr" paramters are "void *"
	and are no longer "FILE *".

src/Jim.h
	- **MAJOR**
	-  New JIM STDIO callbacks in the "interp" structure.
	-  change: "stdin/stdout/stderr" are now "void *" cookies.
	-  New JIM stdio helper functions.



git-svn-id: svn://svn.berlios.de/openocd/trunk@755 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06 19:17:43 +00:00
oharboe 002e3fcbdb added echo command in tcl. Issues a LOG_USER() for the single argument.
git-svn-id: svn://svn.berlios.de/openocd/trunk@746 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-04 13:37:34 +00:00
oharboe ef268c96bb tcl config script example
git-svn-id: svn://svn.berlios.de/openocd/trunk@744 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-04 08:08:29 +00:00