Commit Graph

57 Commits

Author SHA1 Message Date
Catalin Patulea 84dbf8ab5a Driver for USB-JTAG, Altera USB-Blaster and compatibles
The 10-pin JTAG layout used with these adapters is used by
a variety of platforms including AVR.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-26 15:05:06 -08:00
Øyvind Harboe eb1bc657ae build: add build/src to include path
This allows including generated include files.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08 10:16:10 +01:00
Zachary T Welch 87a0119fa2 reorder build order of src directory
Descend into the library modules in order, from bottom-to-top.
2009-12-04 16:56:24 -08:00
Zachary T Welch 822c06d9e3 remove tertiary include paths
With all #include directives converted, we only need to have the
top-level src/ directory in the search path.
2009-12-03 04:24:50 -08:00
Zachary T Welch f4a1070dcf adding files required for distribution
Add headers missing from Makefile rules to pass 'make distcheck'.
These were included in the tree but were not added with those commits.
2009-12-02 18:29:05 -08:00
Øyvind Harboe d1fbcc3589 build: fix breakage in building bin2char
bin2char build relied on $(builddir) which is not defined
for arm-elf X builds at least.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-22 13:35:13 +01: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 cb7dbc1af4 split startup.tcl file across modules
Moves definitions for each layer into their own file, eliminating
layering violations in the built-in TCL code.  Updates src/Makefile.am
rules to include all files in the final startup.tcl input file, and
others Makefile.am rules to distribute the new files in our packages.
2009-11-18 07:21:42 -08:00
Zachary T Welch 903daa796a move startup.c to libopenocd
Moves the creation of startup_tcl.c from src/helper/ to src/.
Prepares to split the startup.tcl file into its per-module parts.
2009-11-18 03:59:14 -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 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
Redirect 'Slash' NIL 0388a9c0e5 MinGW: use WinSock2
After reading a bit further, it appears that ws2_32 (Windows Sockets 2)
is included in all versions of Windows and backwards compatible with
wsock32, at least according to

 http://msdn.microsoft.com/en-us/library/ms740673%28VS.85%29.aspx.

Only Win95 seems to require a manual installation; is not a big deal.

So I think we can drop this whole business of detecting 64 bit MinGW and
just use -lws2_32 for all MinGW platforms.
2009-10-19 17:48:19 -07: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
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
duane 30814c2904 Add quick target - full cygwin builds take a long long long time, this shortens the edit/build/debug cycle
git-svn-id: svn://svn.berlios.de/openocd/trunk@2382 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-24 02:00:19 +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 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 140d6c8e79 Move TCL script files -- Step 1 of 2:
- Move src/target/{interface,target,board,test}/ into src/tcl/
- Remove existing rules in src/Makefile.am and src/target/Makefile.am.
- Add Makefile.am handling of *.cfg and *.tcl files in top Makefile.am:
  - Add dist-hook to include such files under src/tcl in the distribution.
  - Add install-data-hook to install contents of '$(top_srcdir)/src/tcl/'.
  - Add uninstall-hook to remove the installed script files.
- Change paths to (un)install script files in '$(pkgdatadir)/scripts'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1918 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 06:44:43 +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 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
ntfreak ca8c6cf430 - guess-rev.sh now works as expected when build_dir is not the same as src_dir
git-svn-id: svn://svn.berlios.de/openocd/trunk@1372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-02-13 09:56:51 +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
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 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
duane 21eff7095c Added dongle VSLLINK - from Simon Qian
git-svn-id: svn://svn.berlios.de/openocd/trunk@1280 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-27 02:56:55 +00:00
duane f7274784a2 Build Permutations with ftd2xx and libftdi addressed. Also added a new se of regression makefiles to build openocd in multiple ways
git-svn-id: svn://svn.berlios.de/openocd/trunk@1275 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-27 01:15:50 +00:00
kc8apf 063f4c182c - rlink interface support from Lou Deluxe <lou.openocd012@fixit.nospammail.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1258 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-19 04:25:22 +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
oharboe e127fb3a5a ZY1000 code
git-svn-id: svn://svn.berlios.de/openocd/trunk@1005 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-25 14:31:10 +00:00
oharboe 161deacc06 take path to eCos files from environment variable
git-svn-id: svn://svn.berlios.de/openocd/trunk@869 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-24 13:49:56 +00:00
oharboe 25572d2e48 Duane Ellis <openocd@duaneellis.com> stm32 peripherals scripts
git-svn-id: svn://svn.berlios.de/openocd/trunk@846 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 09:25:51 +00:00
oharboe 94efc64709 Duane Ellis <openocd@duaneellis.com> - script commands for stm32
git-svn-id: svn://svn.berlios.de/openocd/trunk@842 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-20 17:13:08 +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
oharboe a5914d0152 Charles Hardin ckhardin at gmail.com bin2char does not need to be installed as part of openocd
git-svn-id: svn://svn.berlios.de/openocd/trunk@816 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-17 06:21:29 +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
ntfreak de6acb2d36 - fix issue when building in separate build dir
- Thanks Duane Ellis

git-svn-id: svn://svn.berlios.de/openocd/trunk@801 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-12 22:40:49 +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
ntfreak 76dec044c0 - configure check added for tclsh
- startup.c manually added to clean deps

git-svn-id: svn://svn.berlios.de/openocd/trunk@796 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-11 18:25:21 +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 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 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 a521e674cf Jim Tcl support added
git-svn-id: svn://svn.berlios.de/openocd/trunk@739 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-04 06:31:43 +00:00
ntfreak 548bb19aa2 - added jlink support, based on Jürgen Stuber patch
git-svn-id: svn://svn.berlios.de/openocd/trunk@658 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-14 14:13:38 +00:00
ntfreak 54eee1b063 - add -lusb to link for using libftdi under win32
git-svn-id: svn://svn.berlios.de/openocd/trunk@635 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-01 19:31:13 +00:00
oharboe 0313c59555 reduce compare noise. If someone should be crazy enough to try to run OpenOCD under eCos, then they'v got some hooks to point them in the general direction.
git-svn-id: svn://svn.berlios.de/openocd/trunk@499 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-11 21:32:03 +00:00
bodylove 78d58dd16a Changed openocd version info creation to be more useful.
- Now displays subversion revision and svn URL

  
  

git-svn-id: svn://svn.berlios.de/openocd/trunk@220 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2007-12-10 16:55:14 +00:00