Commit Graph

53 Commits

Author SHA1 Message Date
Uwe Hermann 1240ae459f fix typos in source files
Correct some spelling errors in source comments and printed output.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-26 10:11:26 -08:00
Zachary T Welch b4c4b5f71e server: use register_commands
Converts server directory to use new command registration paradigm.
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 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 23402315ce command_handler: change 'args' to CMD_ARGV
This patch converts all instances of 'args' in COMMAND_HANDLER routines
to use CMD_ARGV macro.
2009-11-17 11:38:07 -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
Zachary T Welch 4088b1e622 add openocd.h for top-level declarations
Create src/openocd.h to hold declarations previously made internally
by src/main.c and src/server/server.c.  This ensures all functions
are verified to be in-sync at compile time (rather than at link),
making it easier to track down bugs.
2009-11-14 07:29:16 -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 38d826cec1 connection_t -> struct connection
Remove misleading typedef and redundant suffix from struct connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch 8775a0f663 service_t -> struct service
Remove misleading typedef and redundant suffix from struct service.
2009-11-13 11:58:08 -08:00
Zachary T Welch 63a26b421b use COMMAND_HELPER for command helper functions
Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
2009-11-13 10:51:45 -08:00
Zachary T Welch cfc4d5c6b7 use COMMAND_HANDLER macro to define all commands 2009-11-13 10:51:45 -08:00
Zachary T Welch 23d88e5774 server: remove useless declarations
Remove server command declarations, make handler routines static.
2009-11-09 21:39:46 -08:00
Zachary T Welch ae5732b9e4 Add server port command helper function. 2009-11-05 18:03:18 -08: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 c97caebccd Remove whitespace at end of lines, step 2.
- Replace '\s*$' with ''.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:50:08 +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 50c086ffb9 - Replace 'while(' with 'while ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2358 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:36:11 +00:00
zwelch 164cb6d04e Audit and eliminate redundant #include directives from src/server.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1709 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 04:22:15 +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
oharboe a247833a5a Michael Bruck <mbruck@digenius.de> signed/unsigned incompatibility warning
git-svn-id: svn://svn.berlios.de/openocd/trunk@1511 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 17:36:00 +00:00
ntfreak ab87627c5c - add gdb pipe support to native win32 (--pipe option)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1294 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-01 16:06:46 +00:00
ntfreak 47d0449347 - add ability for openocd to communicate to gdb using pipes (stdin/stdout).
- this is enabled by new command line option option --pipe.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1242 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-15 09:43:26 +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
ntfreak 68c598e88d - added myself to copyright on files i remember adding large contributions for over the years
- cleaned up headers to match rest of code
- added missing svn props for previously added files

git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-20 10:50:53 +00:00
oharboe c76b0618d7 David Kuehling <dvdkhlng@gmx.de> - added jim-eventloop.c
git-svn-id: svn://svn.berlios.de/openocd/trunk@898 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-07 16:37:20 +00:00
ntfreak 33682ec49a - correct BUILD_ECOSBOARD definition is server.c
git-svn-id: svn://svn.berlios.de/openocd/trunk@896 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-07 16:13:54 +00:00
oharboe f370d70670 Duane Ellis: fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@890 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-05 12:27:18 +00:00
oharboe 526fe3d83e added yours sincerely for files where I feel that I've made non-trivial contributions.
git-svn-id: svn://svn.berlios.de/openocd/trunk@872 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-25 06:54:17 +00:00
oharboe 94e75e0c06 1. GDB will print cryptic error messages if it is not fed keep-alive packets
within the last 2000ms.

To fix this, add keep_alive() if you are spending >1000ms in an algorithm
thus holding up the server loop.

target_call_timer_callbacks() invokes keep_alive().

2. post_reset script is now executed at normal JTAG speed and not
reset speed.

3. Resume is now synchronous again. Hopefully it will work this time.



git-svn-id: svn://svn.berlios.de/openocd/trunk@826 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-18 10:20:10 +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 3642616171 - remove error message on shutdown
git-svn-id: svn://svn.berlios.de/openocd/trunk@672 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-21 19:23:35 +00:00
oharboe 0d4f8fc824 Spen fixed various issues w.r.t. setting up the sockets for optimal performance.
git-svn-id: svn://svn.berlios.de/openocd/trunk@545 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-07 17:29:21 +00:00
oharboe 2df3ca97a7 hooks for multithreading. Disable nagle
git-svn-id: svn://svn.berlios.de/openocd/trunk@524 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-26 13:18:23 +00:00
ntfreak d47e1b8f36 - rename log functions to stop conflicts under win32 (wingdi)
git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-25 15:45:17 +00:00
oharboe d1fe9bacbb tidy up output a bit. No longer show "accepted connection" inside Telnet session.
git-svn-id: svn://svn.berlios.de/openocd/trunk@497 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 21:17:46 +00:00
oharboe 6d95014674 * fixed malloc corruption in target->debug_reason
* GDB remote server will now remain online even if the target
	  is in a funny state, e.g. if it requires a reset, it is
	  running while GDB is not in the continue or step packet,
	  e.g. via monitor resume/halt commands in GDB script.
	* Added some _DEBUG_GDB_IO_ debug tools
	* Fixed a couple of GDB server lockups, e.g. when O packets
	  detect a severed connection
	* added ACK upon connection (send +).
	* added keep-alive messages to reset so GDB protocol remains happy.
	* fixed crash when timing out connection to GDB

git-svn-id: svn://svn.berlios.de/openocd/trunk@445 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-05 10:28:32 +00:00
ntfreak 5279d519f8 - remove build warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@348 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 20:18:26 +00:00
drath 3d6bcf0792 - convert all files to unix line-ending
git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 17:48:04 +00:00
oharboe 4edcbe0a54 committed bugfix from Michael Bruck
git-svn-id: svn://svn.berlios.de/openocd/trunk@340 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 08:08:31 +00:00
oharboe e482118106 - using ERROR_COMMAND_SYNTAX_ERROR to print syntax in a couple of places
- some more flash cleanup of checking halted state
- moved output handler into options.c
- very slightly tweaked server.c to make it a bit more compatible with eCos
- retired arch_state. Not quite sure how I managed to leave that out last time.

git-svn-id: svn://svn.berlios.de/openocd/trunk@338 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 07:50:03 +00:00
drath 885ae471ad - fixes possible crash when GDB connection is closed while target is running due to log callback sending messages to connection which does not
exist anymore (thanks to Pavel Chromy for this patch)


git-svn-id: svn://svn.berlios.de/openocd/trunk@325 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-24 12:30:45 +00:00
mifi 02f3765351 - added patch for new flash functionality like:
flash verify_image and flash erase_address.
- added patch for new parport_write_on_exit command.
Even this patch will fix some memory leaks.

(thanks too oyvind and Spen for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-18 21:20:28 +00:00
drath 20e4e77cdf - renamed M5960 USB JTAG to "flyswatter"
- make ep93xx and at91rm9200 bitbang JTAG interfaces dependant on ARM host (thanks to Vincent Palatin)
- various whitespace fixes
- removed various warnings
- add support for Debian GNU/kFreeBSD (thanks to Uwe Hermann)
- fix OpenOCD compilation for various platforms (thanks to Uwe Hermann and Vincent Palatin)
- switched order of JTAG chain examination and validation (examine first, then multiple validation tries even if examination failed)
- added target_request subsystem to handle requests from the target (debug messages and tracepoints implemented, future enhancements might include
semihosting, all ARM7/9 only for now)
- added support for GDB vFlashXXX packets (thanks to Pavel Chromy)
- added support for receiving data via ARM7/9 DCC
- reworked flash writing. the 'flash write' command is now deprecated and replaced by 'flash write_binary' (old syntax and behaviour) and 'flash
write_image' (write image files (bin, hex, elf, s19) to a target).
- added support for AMD/ST/SST 29F400B non-cfi flashes



git-svn-id: svn://svn.berlios.de/openocd/trunk@190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-10 19:44:06 +00:00
ntfreak eba4e394d8 - corrected stm32x_handle_options_write_command, incorrect options printed
- added prepare_reset_halt handler for cortex_m3

git-svn-id: svn://svn.berlios.de/openocd/trunk@184 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-26 12:28:22 +00:00
drath 1429d2c659 - added support for Asix Presto JTAG interface (thanks to Pavel Chromy and Asix for making this addition possible)
- added support for usbprog (thanks to Benedikt Sauter)
- make OpenOCD listen for WM_QUIT messages on windows (thanks to Pavel Chromy)
- register at_exit handler to do necessary unregistering (thanks to Pavel Chromy)
- added dummy ETM capture driver to allow ETM to be registered without a capture driver


git-svn-id: svn://svn.berlios.de/openocd/trunk@180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-15 11:19:33 +00:00
ntfreak 4b97f3cbb9 - added mingw elf patches from Vincent Palatin
- added str9x programming using flash controller tap (str9xpec), including option bytes and device lock/unlock
- inttypes.h now used for long long printf style declarations

git-svn-id: svn://svn.berlios.de/openocd/trunk@174 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-06-16 14:45:55 +00:00
drath 7d24476146 - allow building for MinGW using either -mno-cygwin or the MinGW gcc
- added GiveIO support to the amt_jtagaccel driver
- explicitly disable loopback mode for FT2232 devices
- changed configuration options n[st]rst_delay to jtag_n[st]rst_delay
- shutdown network services on exit


git-svn-id: svn://svn.berlios.de/openocd/trunk@80 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2006-08-01 09:45:22 +00:00