Commit Graph

90 Commits

Author SHA1 Message Date
Nicolas Pitre ed59dfc80a basic ARM semihosting support
Semihosting enables code running on an ARM target to use the
I/O facilities on the host computer. The target application must
be linked against a library that forwards operation requests by
using the SVC instruction that is trapped at the Supervisor Call
vector by the debugger.  The "hosted" library version provided
with CodeSourcery's Sourcery G++ Lite for ARM EABI is one example.

This is currently available for ARM9 processors, but any ARM
variant should be able to support this with little additional work.

Tested using binaries compiled with Sourcery G++ Lite 2009q1-161
and ARM RVCT 3.0.

[dbrownell@users.sourceforge.net: doc tweaks, NEWS]

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-03 18:42:01 -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 896ac8d4ef allow #include directives to use module name
Includes the src directory in the search path, so header files may be
migrated from:

  #include "foo.h"

to
  #include <module/foo.h>

which is more conducive for installation.
2009-12-03 01:54:15 -08:00
Nicolas Pitre a976ce2dd4 feroceon.c should be part of ARM7_9_SRC
The Feroceon and Dragonite cores are similar to the ARM926 and ARM966
cores respectively.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-12-03 09:57:17 +01: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
Zachary T Welch 9d4c89f37f add 'testee' target type
Alliteration aside, this should provide the final piece of the puzzle
for developers that want to get started writing a new target type.
In this way, it also seeks to complement the 'dummy' interface driver
and 'faux' NOR flash driver.
2009-11-25 10:29:06 -08:00
David Brownell e6dc927e97 ARM: new DPM interface
First version of interface for sharing code between ARMv6 and ARMv7a
debug modules ... now the architecture includes debug support.  (Not
the same as for the trimmed-down v7m or v6m though!)  This is a first
version of an interface that will let the ARM11 and Cortex-A8 support
share code, features, and bugfixes.  Based on existing code from both
of those cores.

The ARM v7-AR architecture specification calls this commonality the
"Debug Programmer's Model (DPM)", which seemed to be an appropriate
acronym -- a TLA even! -- for use in our code.  Made it so.  :)

The initial scope of this just supports register access, and is geared
towards supporting top level "struct arm" mechanisms.  Later, things
like breakpoint and watchpoint support should be included.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-24 00:13:58 -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 b7b4efcdf1 makefiles: improve build order
Separates various groups of files to be built in logical succession.
In each layer, the core module (target.c, nand.c, etc.) is built _after_
their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of
their drivers (e.g. arm966e.c, mx3_nand.c).

This allows problems introduced at the bottom of the stack to result
in build failures as soon as possible, as the helpers and core should
wrap portions of them.
2009-11-11 05:40:48 -08:00
Zachary T Welch 53979244b1 Improve Makefile rules for XScale debug handler; fixes 'make distcheck'. 2009-10-19 19:59:02 -07:00
David Brownell 05d6716936 build tweak for bin2char
Work better when building outside the source tree.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-17 12:14:19 -07:00
David Brownell cb7965da15 xscale: better fix for debug_handler.bin
Generate a C struct with the data, and use that, instead of an
assembly language file.  The assembly language causes issues on
Darwin and MS-Windows, which don't necessarily use GNU AS; or
if they do, don't necessarily use its ELF syntax.

It's also better in two other ways:  fewer global symbols; and
the init-time size check gets optimized away at compile time.
(Unless it fails, in which case bigger chunks of the file vanish.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-16 13:52:40 -07:00
David Brownell 1ee8ef4210 Fix problems building xscale_debug.S 2009-10-14 11:04:37 +02:00
David Brownell 5e837387aa simplify XScale debug handler installation
Load the XScale debug handler from the read-only data section
instead of from a separate file that can get lost or garbaged.
This eliminates installation and versioning issues, and also
speeds up reset handling a bit.

Plus some minor bits of cleanup related to loading that handler:
comments about just what this handler does, and check fault codes
while writing it into the mini-icache.

The only behavioral changes should be cleaner failure modes after
errors during handler loading, and being a bit faster.

NOTE:  presumes GNU assembly syntax, with ".incbin"; and ELF,
because of the syntax of the ".size" directive.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-12 02:39:18 -07: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 6f7491c1c1 David Brownell Subset of Cortex-A8 support from Magnus: create an armv7a file
and seed it with DAP access support using the current ADIv5 code.
(With tweaks and cleanup from Øyvind and Dave.)

The ARMv7-AR architecture manual is not publicly available (even
in subset form like the ARMv7-M spec), so it's hard to distinguish
between the Cortex-A8 implementation and the ARMv7-A architecture.

The register set presumably is architectural, and so it's stored
here; it's like earlier ARMs, with small additions.  Ditto the
instruction set, though Thumb2 support is used (extending Thumb
support from ARMv6 with more 32-bit instructions) and there's this
ThumbEE thing too.  There is a new "debug monitor" mode, not yet
fully addressed here, to support debugging in environments (like
motor control) where halting debug mode is inadvisable.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2608 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-25 06:57:26 +00:00
zwelch 9eb3181cc8 Paulius Zaleckas <paulius.zaleckas@gmail.com>:
This is minimal patch to support FA526 ARMv4 compatible core.
Since it is very similar to ARM920T I tried to reuse as much
code as possible.

CPU and board configs will follow soon.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2292 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-19 22:39:35 +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 74df79d4d8 Final step in isolating target_type_s structure:
- Move definition of 'struct target_type_s' into new 'target_type.h' file.
- Forward delclaration remains in target.h, with comment pointing to new file.
- Replaces #define with #include in source files.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1971 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 12:38:28 +00:00
zwelch e8e0af3956 Whitespace-only updates to automake input files:
- use continuations to break long lines of variable assignments
- makes these variables more patch-friendly and conform to style guide


git-svn-id: svn://svn.berlios.de/openocd/trunk@1970 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 12:10:57 +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
oharboe 7a93100c2d Dirk Behme <dirk.behme@googlemail.com> Add minimalist Cortex A8 file
git-svn-id: svn://svn.berlios.de/openocd/trunk@1602 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-04 18:44:12 +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
oharboe e784db4fdd SimonQian <simonqian@simonqian.com> AVR wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1540 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-27 10:32:13 +00:00
mlu b0d04ab6c6 Changed armv7m and cortexm3 to use nev arm_adi_v5 instead of cortex_swjdp.
Added support for accessport ROM table identification, dap command. 

git-svn-id: svn://svn.berlios.de/openocd/trunk@1536 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-27 08:29:28 +00:00
oharboe ce1a29725f chain position is now required when creating a target
git-svn-id: svn://svn.berlios.de/openocd/trunk@1363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-28 13:08:06 +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
duane a28eaa85f7 jtag newtap change & huge manual update
git-svn-id: svn://svn.berlios.de/openocd/trunk@1194 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-30 22:25:43 +00:00
oharboe d0b1e6ebaa Alan Carvalho de Assis <acassis@gmail.com> imx27 config file
git-svn-id: svn://svn.berlios.de/openocd/trunk@1122 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-02 18:59:31 +00:00
oharboe e4218ebb8f Rick Altherr <kc8apf@kc8apf.net> switch to new syntax for target events
git-svn-id: svn://svn.berlios.de/openocd/trunk@1116 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-31 06:57:42 +00:00
oharboe 9b1ddfc1eb remove duplicate target
git-svn-id: svn://svn.berlios.de/openocd/trunk@1084 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-21 20:21:32 +00:00
oharboe ba29b4dc6b testing of syntax error in reset and at startup
git-svn-id: svn://svn.berlios.de/openocd/trunk@1054 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14 08:38:36 +00:00
oharboe 28f7fb41c3 John McCarthy <jgmcc@magma.ca> openocd-usb.cfg added
git-svn-id: svn://svn.berlios.de/openocd/trunk@1038 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-10 15:21:24 +00:00
oharboe a5dd5a45f3 zy1000 1.44 snapshot
git-svn-id: svn://svn.berlios.de/openocd/trunk@1034 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-09 11:23:54 +00:00
oharboe 76be215ee1 John McCarthy <jgmcc@magma.ca> adds support for DMA mode access as supported by EJTAG 1.0/2.0 processors
git-svn-id: svn://svn.berlios.de/openocd/trunk@1029 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-08 05:09:59 +00:00
oharboe a0eace708d s3c2440 OpenMoko target script
git-svn-id: svn://svn.berlios.de/openocd/trunk@978 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-04 12:04:47 +00:00
oharboe 7155e8067f lm3s3748 config file
git-svn-id: svn://svn.berlios.de/openocd/trunk@954 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-20 12:20:19 +00:00
oharboe 66ef0cee51 added wip imx31.cfg file
git-svn-id: svn://svn.berlios.de/openocd/trunk@931 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-19 09:20:36 +00:00
oharboe c1683a55bc deleted superfluous sam7s256 which was identical to sam7x256
git-svn-id: svn://svn.berlios.de/openocd/trunk@924 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-17 19:32:44 +00:00
oharboe b565b391bc updated syntax for post_reset scripts
git-svn-id: svn://svn.berlios.de/openocd/trunk@907 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-11 12:28:38 +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
oharboe 2cec23fc37 lpc2148 2MHz, RCLK and clockless config script versions
git-svn-id: svn://svn.berlios.de/openocd/trunk@897 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-07 16:35:26 +00:00
ntfreak 53590217ee - merged mips target into svn trunk
git-svn-id: svn://svn.berlios.de/openocd/trunk@874 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-26 10:32:11 +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
oharboe 7648d6b287 Duane Ellis <openocd@duaneellis.com> more interface files.
git-svn-id: svn://svn.berlios.de/openocd/trunk@825 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-18 06:32:08 +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
ntfreak 0edbe9145c - adding missing install entry for luminary-libftdi.cfg
git-svn-id: svn://svn.berlios.de/openocd/trunk@780 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-09 19:52:03 +00:00
ntfreak b36248beb9 - added event scripts for str73x and str75x targets
git-svn-id: svn://svn.berlios.de/openocd/trunk@751 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-04 17:46:41 +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