Commit Graph

2741 Commits

Author SHA1 Message Date
David Brownell
75cdc8a260 arm9tdmi vector_catch: reserved means "don't use"
Bit 5 shouldn't be used.  Remove all support for modifying it.
Matches the exception vector table, of course ... more than one
bootloader uses that non-vector to help distinguish valid boot
images from random garbage in flash.
2009-10-23 12:28:03 -07:00
Øyvind Harboe
bfefe85645 Improve help for arm9 vector_catch. 2009-10-23 16:18:00 +02:00
Øyvind Harboe
cb854323c9 Remove debug output that could cause compile warnings. 2009-10-23 13:09:16 +02:00
Øyvind Harboe
0a1356c9cc mcr/mrc interface work. Implemented for arm926ejs and arm720t. mcr/mrc commands added. 2009-10-23 12:39:00 +02:00
Øyvind Harboe
18aad44f71 Embedded ICE version is now dumped with debug_level 1 2009-10-23 12:39:00 +02:00
David Brownell
79f71fad58 jtag: clean up TAP state name handling
Some cosmetic cleanup, and switch to a single table mapping
between state names and symbols (vs two routines which only
share that state with difficulty).

Get rid of TAP_NUM_STATES, and some related knowledge about
how TAP numbers are assigned.  Later on, this will help us
get rid of more such hardwired knowlege.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-23 01:02:22 -07:00
David Brownell
814183a5c4 SVF: clean up, mostly for TAP state name handling
- Use the name mappings all the other code uses:
    + name-to-state ... needed to add one special case
    + state-to-name
 - Improve various diagnostics:
    + don't complain about a "valid" state when the issue
      is actually that it must be "stable"
    + say which command was affected
 - Misc:
    + make more private data and code be static
    + use public DIM() not private dimof()
    + shorten the affected lines

Re the mappings, this means we're more generous in inputs we
accept, since case won't matter.  Also our output diagnostics
will be a smidgeon more informative, saying "RUN/IDLE" not
just "IDLE" (emphasizing that there can be side effects).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-23 01:00:32 -07:00
Nicolas Pitre
517e812de3 Ferocion: fix corruption of r0 when resuming Thumb mode
The wrong variable (pc instead of r0) was used.  Furthermore, someone
did cover this error by stupidly silencing the compiler warning that
occurred before a dummy void reference to r0 was added to the code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-22 21:21:09 -07:00
David Brownell
f593ff0a3d have "reg" command print cache names too
When dumping over 100 registers (as on most ARM9 + ETM cores),
aid readability by splitting them into logical groups.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-22 12:05:04 -07:00
David Brownell
344bed2f7e ETM: rename registers, doc tweaks
The register names are perversely not documented as zero-indexed,
so rename them to match that convention.  Also switch to lowercase
suffixes and infix numbering, matching ETB and EmbeddedICE usage.

Update docs to be a bit more accurate, especially regarding what
the "trigger" event can cause; and to split the issues into a few
more paragraphs, for clarity.

Make "configure" helptext point out that "oocd_trace" is prototype
hardware, not anything "real".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-22 12:01:27 -07:00
Øyvind Harboe
3537c368fe disable ZY1000's UART forwarding test code. 2009-10-22 10:23:15 +02:00
Øyvind Harboe
fcf1301e52 mww_phys retired. Replaced by generic mww phys in target.c 2009-10-21 22:25:33 +02:00
Øyvind Harboe
e996452089 virt2phys is now implemented by target.c globally, retire target specific documentation. 2009-10-21 22:25:24 +02:00
Øyvind Harboe
1e5daf5886 retire obsolete mXY_phys commands. Handled by generic memory read/modify commands and target read/write physical memory callbacks. 2009-10-21 15:36:31 +02:00
Øyvind Harboe
2d45a10dfd read/write physical target fn's 2009-10-21 15:32:29 +02:00
Øyvind Harboe
85bf1627cd add support for target_read/write_phys_memory callbacks. 2009-10-21 14:46:12 +02:00
Øyvind Harboe
2783cba810 Added target_read/write_phys_memory() fn's. mdX/mwX commands updated to support phys flag to specify bypassing of MMU. 2009-10-21 14:45:39 +02:00
Øyvind Harboe
818cedaff3 Merge branch 'master' of ssh://gowinex@openocd.git.sourceforge.net/gitroot/openocd/openocd into HEAD 2009-10-21 13:20:29 +02:00
Øyvind Harboe
69a6037ce6 Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c 2009-10-21 13:14:27 +02:00
Øyvind Harboe
e895246966 Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c 2009-10-21 13:10:32 +02:00
Øyvind Harboe
a4a1de4dd1 First cut at implementing software breakpoints for mmu read only memory 2009-10-21 13:07:44 +02:00
Øyvind Harboe
62525792e0 Defined target_write_memory() to be able to handle implementing breakpoints for read only ram(e.g. MMU write protected. 2009-10-21 12:54:41 +02:00
Øyvind Harboe
a02411a15f eCos synthetic target updates. 2009-10-21 12:02:04 +02:00
David Brownell
7556a93aed XSVF: use svf_add_statemove()
XSVF improvements:

 - Layer parts of XSVF directly over SVF, calling svf_add_statemove()
   instead of expecting jtag_add_statemove() to conform to the SVF/XSVF
   requirements (which it doesn't).

   This should improve XSTATE handling a lot; it removes most users of
   jtag_add_statemove(), and the comments about how it should really do
   what svf_add_statemove() does.

 - Update XSTATE logic to be a closer match to the XSVF spec.  The main
   open issue here is (still) that this implementation doesn't know how
   to build and submit paths from single-state transitions ... but now
   it will report that error case.

 - Update the User's Guide to mention the two utility scripts for
   working with XSVF, and to mention the five extension opcodes.

Handling of state transition paths is, overall, still a mess.  I think
they should all be specified as paths not unlike SVF uses, and compiled
to the bitstrings later ... so that we can actually make sense of the
paths.  (And see the extra clocks, detours through RUN, etc.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-20 20:04:36 -07:00
Øyvind Harboe
a1609e5ad1 Removed unused interface_jtag_set_end_state and wrote down some notes on TCP/IP client/server scheme. 2009-10-20 15:54:53 +02:00
Øyvind Harboe
79e257a209 Added the faux flash driver and target. Used for testing. 2009-10-20 12:23:56 +02:00
Øyvind Harboe
ad75639611 Added 'unlock' option to flash write_image 2009-10-20 12:03:36 +02:00
Øyvind Harboe
e4dba30b63 More svn to git version string fixes. 2009-10-20 09:46:23 +02:00
David Brownell
6907ef9d50 SVF: better spec conformance for STATE switch
Don't add extra TCK in current state; exit from RESET had four extras.
Only IDLE --> IDLE needs such an extra clock.  (At least one TCK must
be issued.)

Allow entry to RESET; SVF allows it, so must we (despite those entries
being commented out of the statemove table).

When entering RESET, always use TLR ... we might end up with extra clocks
in reset that way, which is harmless, but we'll never end up in any other
state than RESET, which is useful paranoia.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-19 23:33:08 -07:00
David Brownell
c70073ef67 davinci: add watchdog reset method
Lightly tested on dm365.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-19 22:50:51 -07:00
David Brownell
d243e641d3 jtag_add_statemove() always uses TLR to get to RESET
As decided a while back, this isn't a transition we want to chance.
Whenever someone wants to got to RESET, force it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-19 22:50:51 -07:00
David Brownell
3cc147efd9 SVF/XSVF: comment and whitespace fixes
SVF: comment the predefined/default paths; make them static const

SVF, XSVF: whitespace fixes, mostly so copyrights display sanely

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-19 22:50:51 -07:00
Zachary T Welch
53979244b1 Improve Makefile rules for XScale debug handler; fixes 'make distcheck'. 2009-10-19 19:59:02 -07:00
Redirect 'Slash' NIL
fb61f52731 MinGW: always use "-D__USE_MINGW_ANSI_STDIO"
This is unfortunately needed to make stdio work like OpenOCD expects -- matching
the ANSI-C standard, instead of MS-Windows.

I tested it in both MinGW-W64 on Vista 64 and MinGW-W32 on XP, and I don't
see any adverse effects to enabling it for all MinGW versions.
2009-10-19 17:55:40 -07: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
David Brownell
6ec1026bbb Doc: jtag_init must validate scan chain too
Same requirement as like init_reset, and for the same reason:
we need to start with a known and working state.
2009-10-19 14:45:43 -07:00
Nicolas Pitre
6726b78707 fix single step of bx instruction going into Thumb mode
Without this fix, the following code cannot be single stepped:

	add	ip, pc, #1
	bx	ip
	[thumb code here]
2009-10-19 22:04:07 +02:00
David Brownell
97166327db Ignore openocd.exe for "git status" 2009-10-19 09:53:45 -07:00
Redirect 'Slash' NIL
113679ff59 corrective fix for MinGW GNU C99 printf compliance
Compilation on cygwin, using gcc v3 with option -mno-cygwin,
currently produces a large number of the following warnings:

   warning: `gnu_printf' is an unrecognized format function type

These have been introduced with the recent MinGW GNU C99 printf
compliance patch, as gnu_printf was only introduced with gcc v4.4
and is not recognized with earlier versions.

The attached fix adds gcc version detection to the previous patch
to avoid the problem.
2009-10-19 09:49:34 -07:00
oyvind
557d1b6490 Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
oyvind
89a8a37998 Switch from svn to git version string handling. 2009-10-19 15:08:52 +02:00
Dean Glazeski
76b4ee8935 SDRAM and clock configuration for the SAM9-L9260 board from Olimex 2009-10-18 22:26:38 +02:00
Redirect 'Slash' NIL
990f50a73b safer conversion to HANDLER on MinGW-W64
Assign to "intptr_t", which on some versions of MS-Windows
will widen the variable; then cast to HANDLE.
2009-10-17 22:18:38 -07:00
David Brownell
5cf0af002c Ignore two more generated files
On Windows the name is "bin2char.exe".
All operating systems now have "xscale_handler.h".
2009-10-17 17:50:23 -07:00
Redirect 'Slash' NIL
73349dc5ac More MinGW C99 printf compliance
Passing "--std=gun99" is unfortunately not sufficient to make current
MinGW compilers conform with respect to checking printf format strings.
(The C runtime seems not to have problems.)

Fix by using a "gnu_printf" format specifier not "printf".
2009-10-17 17:47:52 -07:00
Redirect \"Slash\" NIL
c9fbfbd95c jim-eventloop for MinGW-w64
Use JIM_WIDE_MODIFIER for the sscanf format, and apply it for MINGW32 as
well as other Windows environments.  (Microsoft doesn't conform to the
C99 standard, and uses "%I64d" not "%lld" for "long long".)

NB: __MINGW32__ should work on both w32 and w64,.
2009-10-17 12:15:13 -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
a61b57a87f another portability update
Just use "%p" instead of consing up some integral type for pointer printf.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-14 20:24:31 -07:00
David Brownell
510db585fd portability updates
Based on some patches from <redirect.slash.nil@gmail.com>
for preliminary Win64 compilation.  More such updates are
needed, but they need work.  Compile tested on 64 and 32 bit
Linuxes, and Cygwin.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-14 20:04:33 -07:00