Commit Graph

361 Commits

Author SHA1 Message Date
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
994a63c3fe src/{server,pld,svf,xsvf}: remove 'extern' keyword
Removes 'extern' keyword from function declarations in header filess.
2009-11-09 09:44:33 -08:00
Zachary T Welch
2b78a4e82b Update all server port command to use new helper. 2009-11-05 18:03:19 -08:00
Zachary T Welch
ae5732b9e4 Add server port command helper function. 2009-11-05 18:03:18 -08:00
Øyvind Harboe
79bf27da71 Retired gdb_attach. gdb-detach event covers this functionality. 2009-10-13 13:44:15 +02:00
Øyvind Harboe
c8d935ab7c If halt times out, stop GDB. Allows e.g. manual reset via monitor commands. 2009-10-12 09:27:27 +02:00
Øyvind Harboe
c3428f5b7a Stop debug session if halt fails 2009-10-09 10:31:40 +02:00
Øyvind Harboe
f525f2ef0d Stop GDB when polling fails, srst assert or powerdropout is detected 2009-10-08 14:53:25 +02:00
oharboe
f4fce92f28 handle single threading
git-svn-id: svn://svn.berlios.de/openocd/trunk@2771 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-29 14:24:02 +00:00
oharboe
9bdbffb8cc httpd smoketest info
git-svn-id: svn://svn.berlios.de/openocd/trunk@2769 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-29 13:46:26 +00:00
oharboe
37755ffdb6 When attaching GDB to OpenOCD, the target state is no longer affected.
Added gdb_sync feature that allows GDB to sync up to target state.
Issue "monitor gdb_sync" and the next stepi, will return immediately
with updated register values to GDB.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2754 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-24 06:34:23 +00:00
dbrownell
86a7d813a1 Remove annoying end-of-line whitespace from most src/*
files; omitted src/httpd


git-svn-id: svn://svn.berlios.de/openocd/trunk@2742 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-21 18:40:55 +00:00
oharboe
388e94d5c1 fix bug when using 32 instead of 64 bit value in callback, caught by -Wall
git-svn-id: svn://svn.berlios.de/openocd/trunk@2711 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-15 14:20:37 +00:00
oharboe
d879faa3cb David Brownell <david-b@pacbell.net> start phasing out integers as target IDs
git-svn-id: svn://svn.berlios.de/openocd/trunk@2650 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-30 17:30:14 +00:00
oharboe
bf5f21e39a Steve Grubb <sgrubb@redhat.com> fix various and sundry leaks
git-svn-id: svn://svn.berlios.de/openocd/trunk@2606 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-24 07:53:46 +00:00
oharboe
8b73ec8d64 Florian Boor <florian.boor@kernelconcepts.de> fixes a segfault executing commands from the web interface using the
"Run Command" tab.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2601 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-21 06:22:01 +00:00
oharboe
5a824c934f Fix NPE in GDB_EVENT_END as logforwarding was not disabled early enough
git-svn-id: svn://svn.berlios.de/openocd/trunk@2570 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-27 18:56:43 +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
oharboe
d68096dcf2 typo in comment
git-svn-id: svn://svn.berlios.de/openocd/trunk@2496 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-08 10:25:23 +00:00
duane
261e04466d A bit more log detail about connections comming and going
git-svn-id: svn://svn.berlios.de/openocd/trunk@2410 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-28 02:54:19 +00:00
ntfreak
374f6c8b70 - fix issue when using gdb_port cmd
- bug introduced in r2240

git-svn-id: svn://svn.berlios.de/openocd/trunk@2403 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-25 15:11:57 +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
c493543fc9 - Replace '){' with ') {'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2378 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:49:06 +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
6d1d58a1fc - Fixes '[<>]' whitespace
- Replace ')\([<>]\)(' with ') \1 ('.
- 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@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:45:47 +00:00
zwelch
8959de9f67 - Fixes '+' whitespace
- Replace ')\(+\)(' with ') \1 ('.
- 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@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:44:17 +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
3813fda44a - Fixes '==' whitespace
- Replace ')\(==\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:42:03 +00:00
zwelch
aea6815462 - 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@2370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:41:13 +00:00
zwelch
128a733428 - Fixes '&&' whitespace
- Replace ')\(&&\)(' with ') \1 ('.
- Replace '\(\w\)\(&&\)(' with '\1 \2 ('.
- Replace '\(\w\)\(&&\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2366 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:39:47 +00:00
zwelch
d61714f4d5 - Fixes '[+]=' whitespace
- Replace '\(\w\)\([+]=\)(' with '\1 \2 ('.
- Replace '\(\w\)\([+]=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:39:18 +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
5e98c71436 - Fixes '-=' whitespace
- Replace '\(\w\)\(-=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(-=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2362 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:37:56 +00:00
zwelch
95d2a23724 - Replace 'for(' with 'for ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2360 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:37:21 +00:00
zwelch
9af5e445b7 - Replace 'switch(' with 'switch ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:36:56 +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
e43979e702 - Replace 'if(' with 'if ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:35:09 +00:00
duane
7e07b9abf1 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2298 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:01:21 +00:00
zwelch
86e4324f1b Finish transforming 'u32' to 'uint32_t'.
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:11:11 +00:00
zwelch
c18947b947 Transform 'u8' to 'uint8_t'
- Replace '\([^_]\)u8' with '\1uint8_t'.
- Replace '^u8' with 'uint8_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:07:12 +00:00
zwelch
ed5b5b834e Fix compilation for Ubuntu 9.04 on x86-64 when using --enable-httpd.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2262 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-17 06:10:10 +00:00
zwelch
4f4592539d David Brownell <david-b@pacbell.net>:
OpenOCD doesn't actually *need* to be keeping all TCP ports
active ... creating security issues in some network configs.

Instead, let config file specify e.g. "tcl_port 0" (or gdb_port,
telnet_port) to disable that particular remote access method.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 08:38:57 +00:00
zwelch
00228aa839 Fix make maintainer-clean for out-of-tree builds.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2172 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 10:28:16 +00:00
zwelch
0de78ed02c Add target_get_name wrapper:
- replaces all accesses to target->type->name.
- add documentation in target_s to warn not to access field directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1966 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:27 +00:00
zwelch
17fa4de854 Add target_step wrapper:
- replaces all calls to target->type->step.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1965 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:11 +00:00
zwelch
df4cf0615f Add target_get_gdb_reg_list wrapper:
- replaces all calls to target->type->get_gdb_reg_list.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1964 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:30:59 +00:00
kc8apf
35d8b2bf77 Author: Nicolas Pitre <nico@cam.org>
- Silence errors about keep_alive() not being called frequently enough unless
	a gdb session is active or debugging is enabled


git-svn-id: svn://svn.berlios.de/openocd/trunk@1933 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 20:30:17 +00:00
zwelch
dd86b54e6e Update build system to find moved scripts -- Step 3 of 2:
- Update references from using PKGLIBDIR to PKGDATADIR.
- Update built-in script search paths to reflect new install location:
  - $(pkgdatadir)       =>   $(pktdatadir)/site
  - $(pkglibdir)        =>   $(pktdatadir)/scripts
- Update installed location of httpd files:
  - $(pkglibdir)/httpd   =>   $(pkgdatadir)/httpd


git-svn-id: svn://svn.berlios.de/openocd/trunk@1920 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 07:49:58 +00:00
zwelch
5ecae346cc David Brownell <david-b@pacbell.net>:
Make startup for the various server ports be quiet, unless
debugging is active:  don't emit needless scarey messages.
Update the relevant documentation and its references:

 - For these port commands ... cover the default values;
   convert to @deffn syntax; include their use outside of
   the configuration stage; and alphabetize.

Similar updates to the rest of that small chapter:

 - Highlight that there even *IS* a configuration stage, after
   which some command functionality is no longer available.

 - For GDB commands ... convert to @deffn syntax; alphabetize;
   include a missing command (!); add missing helptext (!) for
   one non-missing command; update relevant cross-references
   and index entries.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1909 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 21:08:42 +00:00
zwelch
233ab439c7 Include files required to rebuild the HTTP web pages in distribution.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1773 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 10:14:40 +00:00
zwelch
f5e028bc46 Remove duplicate definition of encode in httpd.tcl.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1749 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 22:37:52 +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
zwelch
647e61cc6d Extend autotools build to create shared library libopenocd with libtool:
- Add libtoolize step too bootstrap script; creates ltmain.sh script.
- Add AC_PROG_LIBTOOL to configure.in to add libtool support to build.
- Change Makefile.am library rules from static (_a) to libtool (_la).
- Install libopenocd.{la,so,a} in $(libdir); update openocd link rules.
- Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1695 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 22:03:57 +00:00
zwelch
d209029ca8 Fix warnings in httpd.c; builds with libmicrohttpd-0.4.1.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1659 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 04:49:27 +00:00
zwelch
66add57aa5 Update autotools scripts to require automake 1.6. The configure.in script
already required autoconf 2.59 (circa 2006), so there is no reason to
support versions of automake older than 1.6 (circa 2002).

The first part of this patch upgrades the configure.in script:

     1. Use current calling conventions for the AC_INIT and
        AM_INIT_AUTOMAKE macros, bringing their usage up-to-date with
        the version of autoconf already specified by AC_PREREQ.
     2. Add AC_CONFIG_SRCDIR macro, required by new version of AC_INIT.
     3. Automatically enable all of automake's warnings except Makefile
        portability (which OpenOCD violates by using GNU make's $(wildcard)).
        [[ While automake has its own -Werror option, I did not enabled it
        due to existing warnings. ]]
     4. Add the missing AM_PROG_C_O check, required by the build rules for
        openocd.o in src/Makefile.am.
     5. Adjust version number to show progress toward the next release.
     6. Include a bug reporting e-mail address to direct users to this list.

This patch makes the following adjustments to the Makefile.am files:

     1. Update AUTOMAKE_OPTIONS to require automake version 1.6
     2. Rewrite all deprecated INCLUDES assignments as AM_CPPFLAGS
     3. Clean-up all AM_CPPFLAGS declarations to be patch-friendly.
     4. Remove vestigial references to $(all_includes)
     5. Remove erroneous references to @CPPFLAGS@ (only use AM_CPPFLAGS)
     6. Remove unused -I and -D directives in helper/, flash/, target/


git-svn-id: svn://svn.berlios.de/openocd/trunk@1591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-02 22:35:02 +00:00
zwelch
1de959ca1c Remove redundant declarations to allow building with -Wredundant-decls.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 01:43:01 +00:00
oharboe
adbe3ac817 eol-style native
git-svn-id: svn://svn.berlios.de/openocd/trunk@1549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-28 06:28:39 +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
dcdf71c21b - fix signed/unsigned build errors under win32. Thanks Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1489 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 09:02:42 +00:00
oharboe
40580e2d71 Zach Welch <zw@superlucidity.net> fix -Werror warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1472 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19 20:51:16 +00:00
oharboe
9f2a76e7b6 Hiroshi Ito <ito@mlb.co.jp> typos
git-svn-id: svn://svn.berlios.de/openocd/trunk@1417 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-03-18 11:59:31 +00:00
oharboe
b7593457bc Holger Schurig <hs4233@mail.mn-solutions.de> fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-02-18 07:39:20 +00:00
oharboe
2136238908 zy1000 1.49 snapshot
git-svn-id: svn://svn.berlios.de/openocd/trunk@1374 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-02-17 11:54:30 +00:00
kc8apf
93180753be Fix 'make maintainer-clean' courtesy of Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1345 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-20 03:55:38 +00:00
kc8apf
8f111ee313 Fix distcheck failure
git-svn-id: svn://svn.berlios.de/openocd/trunk@1329 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-16 07:31:55 +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
ec7a984b42 - add missing svn props from r1270 commit
- change mime-type for png files to image/png

git-svn-id: svn://svn.berlios.de/openocd/trunk@1273 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-23 12:52:14 +00:00
oharboe
fb86d0e76d httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1272 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-23 08:52:02 +00:00
oharboe
6e1184dcff httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1271 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 15:24:35 +00:00
oharboe
e7485b930a httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1269 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 15:10:18 +00:00
oharboe
6d3c1cd972 httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1268 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 15:02:09 +00:00
oharboe
ee94947ffe cygwin fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1266 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 10:28:11 +00:00
ntfreak
9d1f95e01a - fix rlink build under native win32 (mingw)
- remove rlink build warnings
- add usb_set_configuration to rlink_init, win32 requires this
- add win32 ETIMEDOUT define

git-svn-id: svn://svn.berlios.de/openocd/trunk@1260 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-19 13:58:15 +00:00
oharboe
bb56339761 houskeeping
git-svn-id: svn://svn.berlios.de/openocd/trunk@1255 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-17 13:39:40 +00:00
oharboe
ff2cb7714f fixed gaffe in post handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1254 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-17 12:50:07 +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
2a781c0346 allow setting/reading gdb_port at any time
git-svn-id: svn://svn.berlios.de/openocd/trunk@1247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-16 10:55:08 +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
b7d80ac0ab - fix issue with gdb_target_to_reg missing second byte
git-svn-id: svn://svn.berlios.de/openocd/trunk@1180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-20 12:01:46 +00:00
oharboe
6c15861bd8 big endian fix for GDB. Probably fixes a memory corruption(not reported) as well.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1174 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-18 19:26:07 +00:00
oharboe
0bbe570882 minor cleanup
git-svn-id: svn://svn.berlios.de/openocd/trunk@1149 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-10 08:33:03 +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
c2120ba28a Added telnet_async command to enable/disable asynchronous
messages.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1117 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-31 13:40:02 +00:00
oharboe
fdb7a1705d gdb_report_data_abort now ignores all target read errors, including address space wraps. Hopefully works around problems in 6.8
git-svn-id: svn://svn.berlios.de/openocd/trunk@1099 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-24 07:18:13 +00:00
oharboe
bf45445b5b produce syntax error
git-svn-id: svn://svn.berlios.de/openocd/trunk@1090 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-22 13:45:46 +00:00
oharboe
ed9c257551 Laurentiu Cocanu - more help text
git-svn-id: svn://svn.berlios.de/openocd/trunk@1087 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-22 09:30:33 +00:00
ntfreak
d58229e73b - remove build warnings
- add missing svn props

git-svn-id: svn://svn.berlios.de/openocd/trunk@1062 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14 20:58:28 +00:00
oharboe
2de5a007d1 Laurentiu Cocanu - more error handling fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1059 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14 13:14:52 +00:00
oharboe
0689815716 Duane Ellis: addresses protocol problems with GDB.
https://lists.berlios.de/pipermail/openocd-development/2008-October/003326.html

git-svn-id: svn://svn.berlios.de/openocd/trunk@1039 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-11 06:13:21 +00:00
oharboe
7fd9ba22ba Centralize error handling for buggy register handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1019 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-06 12:09:27 +00:00
oharboe
f9a3c36cf2 fix noise in gdb console when single stepping. Remove printing of log before processing halted event.
git-svn-id: svn://svn.berlios.de/openocd/trunk@994 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-24 09:43:31 +00:00
oharboe
7442b26d45 fixed false positives for keep_alive() not being invoked.
git-svn-id: svn://svn.berlios.de/openocd/trunk@993 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-24 08:42:13 +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
ef1cfb2394 Duane Ellis: "target as an [tcl] object" feature.
git-svn-id: svn://svn.berlios.de/openocd/trunk@975 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-01 07:20:21 +00:00
oharboe
f5507d8929 do not check checksums in noack case
git-svn-id: svn://svn.berlios.de/openocd/trunk@969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-26 11:29:59 +00:00
oharboe
8d73c2a9b0 duan ellis target tcl work in progress
converts a number of 'simple string lookup tables' into NVP tables.
  These NVP tables will be used by various commands coming in the next patch.


git-svn-id: svn://svn.berlios.de/openocd/trunk@962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-24 18:20:49 +00:00
ntfreak
a7144a759c - clear any existing breakpoints/watchpoints when restarting in gdb extended remote mode
git-svn-id: svn://svn.berlios.de/openocd/trunk@960 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-23 18:47:42 +00:00
ntfreak
9f6857ae0b - add support for new gdb QStartNoAckMode, which disables sending of ack's between remote packets
git-svn-id: svn://svn.berlios.de/openocd/trunk@959 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-22 19:58:19 +00:00
oharboe
e762857203 typo spotted by spen. gdb_breakpoint_override not tested yet.
git-svn-id: svn://svn.berlios.de/openocd/trunk@919 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-14 13:42:56 +00:00
oharboe
ba315ca440 added global gdb breakpoint override configuration command
git-svn-id: svn://svn.berlios.de/openocd/trunk@914 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-13 20:42:07 +00:00
oharboe
a71ca65c53 Clear all dangling breakpoints upon GDB connection.
git-svn-id: svn://svn.berlios.de/openocd/trunk@912 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-13 15:05:15 +00:00
oharboe
b38f2bb60e return halted signal if step/continue fails
git-svn-id: svn://svn.berlios.de/openocd/trunk@910 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-13 12:21:57 +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
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
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
06d501a192 wait 500ms for target to halt upon connect.
git-svn-id: svn://svn.berlios.de/openocd/trunk@865 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-24 06:07:55 +00:00
ntfreak
1c92ff6a04 - comment about dummy ack '+' char from gdb
git-svn-id: svn://svn.berlios.de/openocd/trunk@864 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-23 22:24:02 +00:00
oharboe
a332b4e8c4 fix <memory> is missing upon gdb connect warning when no flash is defined for target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@861 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-23 19:03:16 +00:00
oharboe
d0f32d0ed5 restart is a per-target action
git-svn-id: svn://svn.berlios.de/openocd/trunk@853 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 18:24:43 +00:00
oharboe
fa33b32903 Allows config scripts to override handling of 'R'(restart) GDB packet.
git-svn-id: svn://svn.berlios.de/openocd/trunk@852 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 18:06:36 +00:00
oharboe
dfbb9f3e89 - jtag_khz/speed are now single parameter only. These are used
from pre/post_reset event scripts. Adding the second parameter was
a mistake seen in retrospect. this gives precise control in post_reset
for *when* the post reset speed is set. The pre_reset event was
added *after* the second parameter to jtag_khz/speed
- the target implementations no longer gets involved in the reset mode
scheme. Either they reset a target into a halted mode or not.
target_process_reset()
detects if the reset halt failed or not.
- tcl target event names are now target_N_name.  Mainly internal
at this early stage, but best to get the naming right now.
- added hardcoded reset modes from gdb_server.c. I don't know precisely what
these defaults should be or if it should be made configurable. Perhaps some
hardcoded defaults will do for now and it can be made configurable later.
- bugfix in cortex_m3.c for reset_run_and_xxx?
- issue syntax error upon obsolete argument in target command instead of
printing message that will surely drown in the log

git-svn-id: svn://svn.berlios.de/openocd/trunk@849 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 15:59:41 +00:00
ntfreak
60ba4476df - fix incorrectly registered function openocd_array2mem
- removed unused variables
- reformatted lpc288x.[ch]
- fixed helper/Makefile.am dependencies
- add correct svn props to added files

git-svn-id: svn://svn.berlios.de/openocd/trunk@829 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-18 11:38:23 +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
8a14a72f57 Charles Hardin <ckhardin@gmail.com> move jim into helper
git-svn-id: svn://svn.berlios.de/openocd/trunk@822 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-17 17:34:53 +00:00
ntfreak
46b3e72528 - fix pre_resume script not being called
git-svn-id: svn://svn.berlios.de/openocd/trunk@771 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-08 10:49:58 +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
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
ee793f0fcb This matters for embedded devices, but is probably not observably better for PC hosted OpenOCD.
git-svn-id: svn://svn.berlios.de/openocd/trunk@647 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-07 14:25:34 +00:00
oharboe
2b9dbccfcf increase packet size to 16kBytes. Very slightly faster.
git-svn-id: svn://svn.berlios.de/openocd/trunk@645 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-07 12:14:26 +00:00
oharboe
ac1bd155c2 Edgar Grimberg found tiny memory leak
git-svn-id: svn://svn.berlios.de/openocd/trunk@644 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-06 13:05:17 +00:00
oharboe
3ce7afc0da regions outside flash are now read/write nocache by default. GDB 6.8 would mark non-flash areas as inacessible by default.
git-svn-id: svn://svn.berlios.de/openocd/trunk@607 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-23 08:07:39 +00:00
oharboe
fcf3b943d8 Enabled auto erase, gdb memory map and gdb flash programming by default.
git-svn-id: svn://svn.berlios.de/openocd/trunk@591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-18 07:33:03 +00:00
oharboe
f62ba35507 More robust handling of unknown target state for step/continue packet.
git-svn-id: svn://svn.berlios.de/openocd/trunk@573 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-13 13:29:33 +00:00
oharboe
c4a2fdbc39 Reset wip. Just adding hooks. This is just to reduce the size of the actual change, no change in behaviour.
git-svn-id: svn://svn.berlios.de/openocd/trunk@565 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-11 14:06:42 +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
ntfreak
a96f96d1f0 - gdb server was incorrectly sending null terminator on qXfer:features:read: packet
- armv7m now sends correct gdb register packet

git-svn-id: svn://svn.berlios.de/openocd/trunk@522 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-22 14:19:46 +00:00
oharboe
7de7bc80fc - adds two speeds to jtag_speed. reset and post reset speed. Default
is post reset = reset speed.
- removed infinite loop's and exit()'s upon poor arm7/9 communication
- cleaned up error messages a bit. Push ERROR() up into fn's that
  fail and can say something meaningful about what failed.


git-svn-id: svn://svn.berlios.de/openocd/trunk@511 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-13 10:14:41 +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
970e16603b Pavel Chromy: telnet line buffer size checking, history does not store repeating lines, improved history printing, log callback tweak
git-svn-id: svn://svn.berlios.de/openocd/trunk@491 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 08:15:54 +00:00
oharboe
cce7512ca9 Pavel Chromy: hopefully perfection for async output and prompt/partially typed command line handling.
git-svn-id: svn://svn.berlios.de/openocd/trunk@487 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-10 20:05:48 +00:00
oharboe
e7b7025cdd prettier async output
git-svn-id: svn://svn.berlios.de/openocd/trunk@485 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-10 15:07:21 +00:00
oharboe
703dc714c8 - fixed a problem with big endian XScale and GDB register packets.
- hmm..... did I screw up? Was XScale and not gdb_server busted here?
  My thinking was that OpenOCD has a canonical internal representation
  of registers that match GDB's expectations


git-svn-id: svn://svn.berlios.de/openocd/trunk@484 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-10 14:14:15 +00:00
oharboe
0424155dfc - Fixed various error handling when looking for memory leaks
- Fixed memory leak in gdb_server.c
- pushed "Error:" statements up into fn's that know something about what went wrong
- load_image now fails if target_write_memory() fails
- only issue an asynchronous halt() upon connect of GDB. Synchronous halt/reset
  doesn't really work as what's required to initialize the target might involve a
  special monitor sequence for the target in question
- syntax error handling improved(fewer exit()'s)


git-svn-id: svn://svn.berlios.de/openocd/trunk@482 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-10 12:11:07 +00:00
oharboe
c78b4fe426 - Improves error handling upon GDB connect
- switch to synchronous halt during connect. This fixes the bug
  where poll() was not invoked between halt() and servicing the
  'g' register packet
- halt() no longer returns error code when target is already halted, just
  logs a warning. Only the halt() implementation can say anything
  meaningful about why a halt() failed, so error messages are pushed
  up to halt()
- fixed soft_reset_halt infinite loop bug in arm7_9_common.c. The rest
  of the implementations are still busted.
- by using USER() instead of command_print() the log gets the 
  source + line #. Nice.
- no longer invoke exit() if soft_reset_halt fails. A reset can often 
  fix the problem.

git-svn-id: svn://svn.berlios.de/openocd/trunk@475 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-07 21:49:16 +00:00
oharboe
29fc9b2596 Asynchronous output information from e.g. a halt is now displayed again.
git-svn-id: svn://svn.berlios.de/openocd/trunk@474 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-07 21:41:34 +00:00
oharboe
c317ffe243 Removed code that inserted prompt after printing asynchronous information. Current implementation was broken beyond repair.
git-svn-id: svn://svn.berlios.de/openocd/trunk@463 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-07 10:53:50 +00:00
oharboe
652a5b18b4 Pavel Chromy: performance tweak of gdb_put_packet_inner() removing malloc and avoiding memcpy of larger blocks of data,
git-svn-id: svn://svn.berlios.de/openocd/trunk@453 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-06 12:04:27 +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
oharboe
6445cc6479 telnet_port can now be invoked multiple times
git-svn-id: svn://svn.berlios.de/openocd/trunk@444 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-05 06:55:14 +00:00
oharboe
8404dc3657 Bogus error message in GDB removed
git-svn-id: svn://svn.berlios.de/openocd/trunk@443 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-04 21:12:01 +00:00
oharboe
f955b90d28 Fixed GDB timeout crash - regression introduced back when log_add/remove_callback was added.
git-svn-id: svn://svn.berlios.de/openocd/trunk@442 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-04 13:13:55 +00:00
oharboe
82eda37fe3 log_remove_callback
git-svn-id: svn://svn.berlios.de/openocd/trunk@412 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-01 14:36:13 +00:00
oharboe
fad239c1db formatting fixes from Pavel Chromy
git-svn-id: svn://svn.berlios.de/openocd/trunk@392 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 12:16:02 +00:00
oharboe
3a3fc30014 - clean up target output strings a bit
- open_file_from_path() now uses logging feature
- open_file_from_path() no longer uses paths for anything but "r" mode. Fixes 
  bug  waiting to happen.


git-svn-id: svn://svn.berlios.de/openocd/trunk@389 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 11:31:49 +00:00
oharboe
67e0aea258 Summary: passing of variable argument list reduced, strings sent to logging are now formatted just once - more efficient.
As a result, ugly string malloc+strcpy are not needed anymore.


git-svn-id: svn://svn.berlios.de/openocd/trunk@386 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-29 11:16:38 +00:00
ntfreak
9e5a6679ca - added svn props
- fixed mixed line endings on flash.c, log.c, gdb_server.c

git-svn-id: svn://svn.berlios.de/openocd/trunk@371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-28 10:07:54 +00:00
oharboe
0689e3dd67 - Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This
provides a better impeadance match for debug output char fn's, e.g. eCos.
- Line endings are now added at the caller site of command_print*(). command_print()
  still adds a line ending
- echo of commands in scripts are now available via debug_level instead of
  forced echo
- Added a USER_SAMELINE() for printing without a lineend.


git-svn-id: svn://svn.berlios.de/openocd/trunk@364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-28 08:11:18 +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
7f1944a478 Pavel Chromy
- multiple log listeners
- added OUTPUT() to replace printf
- fix formatting

git-svn-id: svn://svn.berlios.de/openocd/trunk@346 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 17:32:53 +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
bcb0124b15 dos2unix fix.
git-svn-id: svn://svn.berlios.de/openocd/trunk@339 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 08:01:21 +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
oharboe
815c3b3533 - "flash write_binary" is now "flash write_bank" to clarify the focus of the
command and reduce confusion with "flash write_image".
- retired deprecated "flash erase" & "flash write".
- added flash_driver_protect/write/erase() that are wafer thin frontend
 functions to low level driver functions. They implement checks
 that were inconsistently handled by the drivers, e.g. check for
 target halted was done in a spotty fashion.
- use return ERROR_COMMAND_SYNTAX_ERROR to print out
 syntax of command instead of having lots of inlined replicas of
 the command line syntax(some of which were wrong).
- use logging instead of dubious translation of error values to
 human understandable explanations of why things failed.
 The lower levels log the precise reason and the higher
 levels can ammend context as the error propagates up
 the call stack.
- simplified flash API slightly with logging instead of
 allocating and returning information that the caller then
 has to translate into print statements.



git-svn-id: svn://svn.berlios.de/openocd/trunk@337 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 07:32:52 +00:00
oharboe
1aa854684d - fixed target->type->poll() return value
- added arch_state to show status of currently selected target
- simplified target->type->arch_state() api.
- clean up telnet output a bit
- fixed GDB output for arch_state
- removed a couple of unecessary exit()'s
- cleaned up error propagation a bit in a few places

git-svn-id: svn://svn.berlios.de/openocd/trunk@332 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-24 18:52:45 +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
ntfreak
95df797b2e - add search paths via new arg -s (-search). Thanks Ted Roth
- updated docs for new command

git-svn-id: svn://svn.berlios.de/openocd/trunk@312 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-19 20:04:57 +00:00
ntfreak
b02d64a1bf - reapply fix with telnet prompt while running/halting gdb
git-svn-id: svn://svn.berlios.de/openocd/trunk@309 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 18:48:04 +00:00
drath
17b65ad9a1 - Fix problems with stuck telnet sessions. Thanks to Øyvind Harboe for this patch.
git-svn-id: svn://svn.berlios.de/openocd/trunk@308 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 18:03:08 +00:00
drath
48709fba0b - ignore data aborts during gdb memory read packets by default, and return 0x0 instead
- add configuration option "gdb_report_data_abort <enable|disable> to enable reporting of data aborts during gdb memory read packets
- thanks to Øyvind Harboe for identifying the problem with GDB and data aborts
- fix some warnings in gdb_server.c



git-svn-id: svn://svn.berlios.de/openocd/trunk@307 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 17:59:06 +00:00
ntfreak
a92d27afb0 - Added a "User:" debug level. These are messages that are intended for the user and are part of normal operation.
- Faster DEBUG/INFO() when they are disabled
- target_read/write_buffer() now uses 16 and 32 bit access for single word aligned requests. Other requests are serviced as quickly as possible.
- *much* faster read/write GDB packets, removing timeout problems.
- GDB read/write packets w/single word aligned 32/16 bit access now use 32/16 bit word access.
- working area can now be changed on the fly. Provides a way to move working area about as MMU is enabled/disabled.
- cleaned up error messages for verify_image.
Thanks Øyvind Harboe

git-svn-id: svn://svn.berlios.de/openocd/trunk@302 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-18 14:32:43 +00:00
ntfreak
cf9646bda6 - combine similar functions in telnet_server.c
git-svn-id: svn://svn.berlios.de/openocd/trunk@301 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-17 11:06:58 +00:00
ntfreak
e859281eb3 - solve lots of problems with stuck GDB connections, making it impossible to connect to GDB, handle timeout of acknowledgement, etc.
- "monitor halt/resume" now works correctly
- "monitor sleep 10000" no longer makes the GDB protocol lock up. There is an error message and the protocol recovers nicely afterwards.
- it's now possible to connect to a target which needs a reset before halt works.
- handle failed memory access more gracefully. Connection is now closed instead of OpenOCD quitting.
- *much* improved handling of 2 second timeout on memory read packets. Especially important w/mouseover evaluation of  variables in Eclipse.
- fixed memory leak upon failed memory packet reply.
- 'O' packets w/progress info is no longer sent out randomly.
- faster packet reply code.
- Thanks to Øyvind Harboe for this patch

git-svn-id: svn://svn.berlios.de/openocd/trunk@300 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-16 15:21:13 +00:00
ntfreak
a32de76d61 - fix issue with telnet prompt while gdb running
git-svn-id: svn://svn.berlios.de/openocd/trunk@298 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-16 14:05:32 +00:00
mifi
2a0317e6f4 - added patch to Improving progress/error output for telnet & GDB monitor
(thanks to Øyvind for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-13 19:02:17 +00:00
ntfreak
01dd733dad - telnet prompt behaves correctly for new synchronous halt/resume/reset commands
- removed unused variables in tms470.c

git-svn-id: svn://svn.berlios.de/openocd/trunk@290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-11 09:11:50 +00:00
mifi
c882cb0894 - added autoprobe functionality
- corrected blocksize handling from GDB "info mem" command
(thanks to Øyvind and Spen for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@278 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-27 14:05:59 +00:00
ntfreak
5e9a5c0f28 - fix gdb packet retransmission omission
git-svn-id: svn://svn.berlios.de/openocd/trunk@253 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-10 20:10:53 +00:00
ntfreak
2511b52159 - _DEBUG_GDB_IO_ was left on by mistake
git-svn-id: svn://svn.berlios.de/openocd/trunk@252 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-10 19:34:33 +00:00
ntfreak
5eedf3e1ce - added faster gdb packet handling (thanks to oyvind harboe for the patch)
- code reformat

git-svn-id: svn://svn.berlios.de/openocd/trunk@251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-10 19:29:52 +00:00
ntfreak
0160320060 - rename flash_init and flash_erase to flash_init_drivers and flash_erase_address_range - stops conflicts with redboot. Thanks Øyvind Harboe
- gdb connection not dropped if we fail to allocate memory in query packets



git-svn-id: svn://svn.berlios.de/openocd/trunk@249 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-09 15:58:01 +00:00
mifi
2e01a1ad19 - added gdb flash fixes patch
https://lists.berlios.de/pipermail/openocd-development/2007-December/000548.html
- added synthesize in_check_mask/value and error handler patch
https://lists.berlios.de/pipermail/openocd-development/2008-January/000554.html

(thanks to oyvind harboe for these patches)

git-svn-id: svn://svn.berlios.de/openocd/trunk@248 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-01-07 17:11:11 +00:00
ntfreak
dfe1b3f314 - add support for extended gdb packet R (restart), requires gdb to be started with target extended-remote
git-svn-id: svn://svn.berlios.de/openocd/trunk@247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-29 17:41:43 +00:00
ntfreak
6c9b804d61 - minimum autoconf 2.59 is now required and verified - due to issues with AS_HELP_STRING
- native win32 now handles WSAECONNRESET - no longer exits openocd
- qCRC packet now works correctly under cygwin (gdb compare-sections command)
- removed __USE_GNU define from gdbserver.c
- gdb qSupported packet is now handled, with this we are able to tell gdb packet size, memory map of target
- added new target script gdb_program_config - called before gdb flash programming
- new gdb server command gdb_memory_map (enable|disable> - default is disable
- new gdb server command gdb_flash_program (enable|disable> - default is disable
- gdb flash programming supported - vFlash packets
- image_elf_read_section now does not clear any remaining data, this was causing the gdb checksum to fail with certain files
- reformat of usbprog.c
- memory leak in command_print fixed
- updated texi doc to include new commands
- added gdb programming section to docs

git-svn-id: svn://svn.berlios.de/openocd/trunk@246 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-29 13:51:48 +00:00
ntfreak
55f2fe830a - removed flash write_image - binary compare function has been moved to verify_image command
- minor code reformat and cleanup
- updated docs to include new commands

git-svn-id: svn://svn.berlios.de/openocd/trunk@243 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-20 16:19:10 +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
ntfreak
8c634335b4 - reset_run now works as expected on cortex-m3
- str9xpec erase status checked on option byte programming
- stm32x flash driver now supports sector protection
- surplus exit removed from flash.c
- openocd.texi documentation added

git-svn-id: svn://svn.berlios.de/openocd/trunk@212 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-11-21 16:37:17 +00:00
ntfreak
e27696f6b0 - add verify_image command
- add support for gdb qCRC packet (compare-sections command)

git-svn-id: svn://svn.berlios.de/openocd/trunk@210 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-10-22 08:44:34 +00:00
ntfreak
ce8768f463 - cleaned up str7, str9 and stm32 flash drivers
- str7 flash driver now checks correct busy bits depending on device
- str9 flash driver now disables ITCM order as per st programming manual
- added str7 disable_jtag command
- added gdb_detach command
- updated arm966e cp15 support
- fix crash on mingw build when enabling target_request debugmsgs

git-svn-id: svn://svn.berlios.de/openocd/trunk@209 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-10-08 13:12:39 +00:00
ntfreak
995326b600 - flash autoerase <on|off> cmd added, default is off - flash banks are calculated and erased prior to write (flash write_image only)
- corrected array overrun in armv7m.c
- corrected breakpoint memory allocation bug
- image read now uses fgets, vastly improves reading of large files
- improved hex file reading, support for Linear Address Record added

git-svn-id: svn://svn.berlios.de/openocd/trunk@208 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-10-01 08:31:30 +00:00
drath
c35cc0b8b7 - fixed several bugs in flash writing code (thanks to Pavel Chromy)
git-svn-id: svn://svn.berlios.de/openocd/trunk@196 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-08-16 09:09:44 +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
290e01c62a - reformat src/jtag/bitq.c (thanks to Pavel Chromy)
- fix multiple reads from FT2232 into same buffer location (thanks to Magnus Lundin)
- retry JTAG chain validation (thanks to Magnus Lundin)
- reworked GDB packet input handling (thanks to Pavel Chromy)
- output error message when setting a watchpoint failed
- removed duplicate out-of-bounds check in at91sam7.c (thanks to Pavel Chromy)


git-svn-id: svn://svn.berlios.de/openocd/trunk@181 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-07-25 10:06:57 +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
5ed126c4f9 - fixed arm926 cp15 command bug (thanks to Vincent Palatin for this patch)
- fixed compiler warnings throughout the code (thanks to Vincent Palatin for this patch)
- added support for accessing ETB (embedded trace buffer) registers


git-svn-id: svn://svn.berlios.de/openocd/trunk@134 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-03-26 21:47:26 +00:00
drath
a4f2e1eaac - disabled FT2232 debug output (that code should be fairly stable)
- fixed bug in jtag.c where JTAG command type was wrong for PATHMOVE commands
- added lattice ISP cable (experimental)
- properly initialize parallel port (clear tristate bit)
- fixed jtag/Makefile.am that failed with some versions of autotools
- print error number if read() in gdbserver.c failed on Windows
- fixed handling of opcodes with bits 27-25 b011 (comment was correct, code had a bug)
- added support for AT91SAM7SE internal flash


git-svn-id: svn://svn.berlios.de/openocd/trunk@122 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-01-09 17:19:41 +00:00