openocd.git
10 years agoImprove lpc288x.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 09:17:17 +0000 (02:17 -0700)]
Improve lpc288x.c command argument parsing.

10 years agoImprove lpc2000.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 09:17:17 +0000 (02:17 -0700)]
Improve lpc2000.c command argument parsing.

10 years agoImprove cfi.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 09:17:17 +0000 (02:17 -0700)]
Improve cfi.c command argument parsing.

10 years agoImprove avrf.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 09:17:17 +0000 (02:17 -0700)]
Improve avrf.c command argument parsing.

10 years agoImprove orion_nand.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:33:12 +0000 (22:33 -0700)]
Improve orion_nand.c command argument parsing.

10 years agoImprove davinci_nand.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:33:12 +0000 (22:33 -0700)]
Improve davinci_nand.c command argument parsing.

10 years agoImprove at91sam7.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:33:12 +0000 (22:33 -0700)]
Improve at91sam7.c command argument parsing.

10 years agoImprove at91sam3.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:33:12 +0000 (22:33 -0700)]
Improve at91sam3.c command argument parsing.

10 years agoImprove nand.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:33:12 +0000 (22:33 -0700)]
Improve nand.c command argument parsing.

10 years agoImprove flash.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:33:12 +0000 (22:33 -0700)]
Improve flash.c command argument parsing.

10 years agoAdd Flash/NAND bank command argument helpers.
Zachary T Welch [Fri, 23 Oct 2009 08:13:19 +0000 (01:13 -0700)]
Add Flash/NAND bank command argument helpers.

This eliminates redundant code for parsing and retreiving the bank
specified from a script command argument.  This patch was written to
replace existing functionality; however, the parsing logic can be
updated later to allow flash commands to accept bank names as well as
their numbers.

10 years agoImprove ETM tracemode update command.
Zachary T Welch [Thu, 22 Oct 2009 15:11:55 +0000 (08:11 -0700)]
Improve ETM tracemode update command.

10 years agoImprove etm command argument parsing.
Zachary T Welch [Thu, 22 Oct 2009 15:15:37 +0000 (08:15 -0700)]
Improve etm command argument parsing.

10 years agoImprove trace command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:06 +0000 (06:36 -0700)]
Improve trace command argument parsing.

10 years agoImprove arm_adi_v5 command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve arm_adi_v5 command argument parsing.

10 years agoImprove cortex_m3 command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:06 +0000 (06:36 -0700)]
Improve cortex_m3 command argument parsing.

10 years agoImprove xscale command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:06 +0000 (06:36 -0700)]
Improve xscale command argument parsing.

10 years agoImprove arm11 command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve arm11 command argument parsing.

10 years agoImprove arm966e command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve arm966e command argument parsing.

10 years agoImprove arm926ejs command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve arm926ejs command argument parsing.

10 years agoImprove arm920t command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve arm920t command argument parsing.

10 years agoImprove arm720t command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve arm720t command argument parsing.

10 years agoImprove arm7_9_common command argument parsing.
Zachary T Welch [Thu, 22 Oct 2009 14:03:20 +0000 (07:03 -0700)]
Improve arm7_9_common command argument parsing.

10 years agoImprove armv7m command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:06 +0000 (06:36 -0700)]
Improve armv7m command argument parsing.

10 years agoImprove armv7a command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:06 +0000 (06:36 -0700)]
Improve armv7a command argument parsing.

10 years agoImprove armv4_5 command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)]
Improve armv4_5 command argument parsing.

10 years agoImprove xscale command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 12:55:23 +0000 (05:55 -0700)]
Improve xscale command argument parsing.

10 years agoImprove pld command argument parsing.
Zachary T Welch [Sat, 24 Oct 2009 08:22:58 +0000 (01:22 -0700)]
Improve pld command argument parsing.

10 years agoUpdate all server port command to use new helper.
Zachary T Welch [Sat, 24 Oct 2009 08:12:56 +0000 (01:12 -0700)]
Update all server port command to use new helper.

10 years agoAdd server port command helper function.
Zachary T Welch [Sat, 24 Oct 2009 08:11:13 +0000 (01:11 -0700)]
Add server port command helper function.

10 years agoImprove target.c command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 04:04:23 +0000 (21:04 -0700)]
Improve target.c command argument parsing.

Passes cmd_ctx into parse_load_image_command_args for reporting the
parsing errors therein.

10 years agoImprove jtag command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 04:05:50 +0000 (21:05 -0700)]
Improve jtag command argument parsing.

10 years agoImprove debug_level command argument parsing.
Zachary T Welch [Fri, 23 Oct 2009 05:34:19 +0000 (22:34 -0700)]
Improve debug_level command argument parsing.

10 years agoAdd macro for parsing numeric command arguments.
Zachary T Welch [Thu, 22 Oct 2009 14:44:54 +0000 (07:44 -0700)]
Add macro for parsing numeric command arguments.

This helper eliminates significant amount of redundant code in command
handler functions throughout the system.  It wraps the lower-level
parse_* macros to implement a policy for reporting parse errors to the
active command context (cmd_ctx).  If errors do occur, this macro causes
the calling function to abort with the proper return code.

10 years agoAdd stringify macros in src/helper/types.h.
Zachary T Welch [Thu, 22 Oct 2009 14:39:23 +0000 (07:39 -0700)]
Add stringify macros in src/helper/types.h.

10 years agoarm920t: add mrcmcr interface fn's.
Øyvind Harboe [Tue, 3 Nov 2009 11:54:26 +0000 (12:54 +0100)]
arm920t: add mrcmcr interface fn's.

The arm920t has a concept of read modify write cycles
that may have to be represented in the mrcmcr interface
eventually.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoarm11: check if target is halted before executing mrc/mcr commands.
Øyvind Harboe [Tue, 27 Oct 2009 12:43:42 +0000 (13:43 +0100)]
arm11: check if target is halted before executing mrc/mcr commands.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agotarget: fix ordering of arguments to mcr and mrc commands
Øyvind Harboe [Mon, 26 Oct 2009 17:57:52 +0000 (18:57 +0100)]
target: fix ordering of arguments to mcr and mrc commands

Now matches machine code syntax and old arm11 syntax.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agotarget: check args to mrc/mcr.
Øyvind Harboe [Mon, 26 Oct 2009 17:53:19 +0000 (18:53 +0100)]
target: check args to mrc/mcr.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoARM11: added mrc/mcr support to arm11 code.
Øyvind Harboe [Mon, 26 Oct 2009 13:39:32 +0000 (14:39 +0100)]
ARM11: added mrc/mcr support to arm11 code.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoTODO: Wrote up list of remaining tasks for target->type->mrc/mcr
Øyvind Harboe [Sat, 24 Oct 2009 12:50:57 +0000 (14:50 +0200)]
TODO: Wrote up list of remaining tasks for target->type->mrc/mcr

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agotarget: Only register mrc mcr commands when one of the targets support them.
Øyvind Harboe [Sat, 24 Oct 2009 11:24:35 +0000 (13:24 +0200)]
target: Only register mrc mcr commands when one of the targets support them.

This avoids polluting help for targets that can never support mrc/mcr

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agocortex_a8: add mrc mcr interface.
Øyvind Harboe [Sat, 24 Oct 2009 11:17:04 +0000 (13:17 +0200)]
cortex_a8: add mrc mcr interface.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoUser's Guide: TAP setup tweakage
David Brownell [Thu, 5 Nov 2009 19:31:32 +0000 (11:31 -0800)]
User's Guide: TAP setup tweakage

Highlight that the "-expected-id" probably comes from vendor
documentation, and that it *should* be used where possible.

Don't use ircapture/irmask in examples, to help discourage
use of those params when they're not required.  Explain a
bit better about why/when those params get used.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agowatchpoint_add() cleanup
David Brownell [Thu, 5 Nov 2009 09:47:44 +0000 (01:47 -0800)]
watchpoint_add() cleanup

Fail watchpoint_add() if it's the same address but the
parameters are different ... don't just assume having
the same address means the same watchpoint!  (Note that
overlapping watchpoints aren't detected...)

Handle unrecognized return codes more sanely; don't exit()!
And describe command params right.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoCortex-M3: expose most DWT registers
David Brownell [Thu, 5 Nov 2009 09:04:08 +0000 (01:04 -0800)]
Cortex-M3: expose most DWT registers

Expose most DWT registers via Tcl; there are a few more, but
those are mostly for profiling along with the ITM.  Having
this set available enables operations which aren't possible
with just the standard watchpoint operations.

The cycle counter may be interesting.  Turn it on after reset
by setting the LSB of the dwt_ctrl register, and it counts
CPU clocks.  You can program the comparator 0 watchpoint to
trigger on a given cycle count, rather than a data address.

Likewise, comparator 1 may be able to match data values given
address matches from one or two other comparators.  (Not all
hardware supports this capability though; try it.  That is
something the standard watchpoint methods should eventually
handle, for the single address case.)

Minor cleanup:  remove needless functional indirection for
exposing the v7m architctural registers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoCortex-M3: minor cleanup
David Brownell [Thu, 5 Nov 2009 09:03:54 +0000 (01:03 -0800)]
Cortex-M3: minor cleanup

There's no reason to read which interrupts are enabled from
the NVIC; that state isn't used.  Plus, it's highly dynamic
since firmware can change it at any time; remove the support
for those state records.

Remove duplicate definition of DWT_CTRL address; shrink a line.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoCortex-M3: DWT cleanup/fixes
David Brownell [Thu, 5 Nov 2009 09:03:17 +0000 (01:03 -0800)]
Cortex-M3: DWT cleanup/fixes

Fix the watchpoint error checks, and do them in add(), not later
in set() when it's mostly too late.  Support the full range of
watchpoint sizes (1 to 32K bytes each), and check alignments.

Minor cleanup of DWT access:  shrink lines, use "+" for address
calculations, comment a few issues.  Add debug message reporting
DWT capabilities, matching the message for FBP, and some minor
code and spec review comments.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoARMv7M: add docs, remove exports
David Brownell [Thu, 5 Nov 2009 09:02:52 +0000 (01:02 -0800)]
ARMv7M: add docs, remove exports

Add Doxygen for the exported ARMv7-M interfaces.

Make the non-exported stuff static.  Remove functions and
data which are now observably unused.

Add comment about a small speedup that the run_algorithm()
logic could use.  Shrink a few too-long lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agotarget: add target->type->has_mmu fn.
Øyvind Harboe [Tue, 27 Oct 2009 13:02:16 +0000 (14:02 +0100)]
target: add target->type->has_mmu fn.

improve default target->read/write_phys_memory, produce
more sensible error messages if the mmu interface
functions have not been implemented yet vs. will
not be implemented(e.g. cortex m3).

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoMake default implementation of mdw/mmw phys return error 'not implemented'
Øyvind Harboe [Mon, 26 Oct 2009 20:47:41 +0000 (21:47 +0100)]
Make default implementation of mdw/mmw phys return error 'not implemented'

10 years agotarget: remove unused interface fn that clutters code
Øyvind Harboe [Sat, 31 Oct 2009 12:57:18 +0000 (13:57 +0100)]
target: remove unused interface fn that clutters code

The quit entry point was not being invoked. Just a source
of confusion at this point. XScale ran 100x reset upon
quit, but that code made no sense, wasn't commented
and never invoke.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agodebug interface: get rid of unused pre_debug fn
Øyvind Harboe [Fri, 30 Oct 2009 17:29:09 +0000 (18:29 +0100)]
debug interface: get rid of unused pre_debug fn

Removing unused code makes it much less mysterius.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agowarnings: remove
Øyvind Harboe [Thu, 5 Nov 2009 08:02:06 +0000 (09:02 +0100)]
warnings: remove

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoft2232: cleanup
David Brownell [Thu, 5 Nov 2009 05:41:08 +0000 (21:41 -0800)]
ft2232: cleanup

Previous patch somehow made GCC lose some of its cookies;
work around, zero-init that struct.

Clean up code from the previous patch.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoJTAG: support KT-LINK adapter
Krzysztof Kajstura [Thu, 5 Nov 2009 05:20:44 +0000 (21:20 -0800)]
JTAG: support KT-LINK adapter

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoPXA255: support Intel "Lubbock" platform
David Brownell [Thu, 5 Nov 2009 05:11:44 +0000 (21:11 -0800)]
PXA255: support Intel "Lubbock" platform

Config for Intel's "Lubbock" PXA255 development board.  Even more
so than the PXA255 itself, this is obsolete.  AFAIK this was the
first generally available development platform for PXA255.  Intel
stopped providing these after other devel boards became available.

One interesting thing about this board from the OpenOCD perspective
is probably its flash configuration.  Each bank is 32 bits wide,
built from two 16-bit StrataFlash chips wired in parallel.  This
doubles throughput ... it reads/writes 32 bits in the time a single
chip takes to write just 16 bits.

This conf mostly works, given XScale bugfixes, but has some issues
(notably: no access to the on-board SDRAM) flagged by FIXMEs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoVersion 0.4.0-dev
David Brownell [Thu, 5 Nov 2009 03:44:36 +0000 (19:44 -0800)]
Version 0.4.0-dev

Add "-dev" tag.  Update minor version number.
Archive old NEWS file, start a new one.

10 years agoVersion 0.3.0 v0.3.0
David Brownell [Thu, 5 Nov 2009 03:39:59 +0000 (19:39 -0800)]
Version 0.3.0

Remove -dev tag, remove -rc tag.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoRelease docs: fix notes
David Brownell [Thu, 5 Nov 2009 01:49:06 +0000 (17:49 -0800)]
Release docs: fix notes

We currently do something unusual:  version codes in config.in get
updated after the release, which means that "git describe" won't
match up to development version labels.  Comment that trouble spot.

We can fix this by switching away from the major/minor/micro type
release numbering, as various other projects have done.  The major
numbers basically don't tend to change, and doing a good job with
micro versions is so annoying that they rarely change either.

10 years agoDoc: fix broken link
David Brownell [Thu, 5 Nov 2009 01:12:53 +0000 (17:12 -0800)]
Doc: fix broken link

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoNEWS: mention switch to git!
David Brownell [Thu, 5 Nov 2009 01:03:20 +0000 (17:03 -0800)]
NEWS: mention switch to git!

10 years agoOther files: stop referring to ChangeLog too
David Brownell [Thu, 5 Nov 2009 00:46:27 +0000 (16:46 -0800)]
Other files: stop referring to ChangeLog too

The ChangeLog idiom is redundant given any decent SCM.
Time to phase it out here.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoNEWS refs repository history, not ChangeLog
David Brownell [Wed, 4 Nov 2009 23:54:33 +0000 (15:54 -0800)]
NEWS refs repository history, not ChangeLog

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoTweak release docs
David Brownell [Wed, 4 Nov 2009 23:38:06 +0000 (15:38 -0800)]
Tweak release docs

Contrast releases to git snapshot tarballs.  Mention that
releases have some quality-improvement focus, with special
non-"dev" version IDs.  Explain more about version IDs,
using "openocd -v" to see them, etc;

Make release milestone info be less specific about timing,
and presume we have both a merge window and an RC stage.

Rework the release process information to match reality a
bit more closely.  Reference the version.sh script (in one
place the wrong script was referenced).  Bugfix branches
get special treatment, while non-bugfix releases are more
or less what *defines* being the mainline branch.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoRelease scripts: comments, run on Ubuntu
David Brownell [Wed, 4 Nov 2009 23:20:18 +0000 (15:20 -0800)]
Release scripts: comments, run on Ubuntu

The "source" command isn't accepted by ASH; easy to fix.
Failures with "-e" are harder to fix.  Remove the "-e"
(for now) and force bash, for safety.

Un-obfuscate the release steps, by using names instead
of numbers.  Comment the version-number manipulation.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoconfigure: fix build problems with eCos
Øyvind Harboe [Wed, 4 Nov 2009 12:16:38 +0000 (13:16 +0100)]
configure: fix build problems with eCos

Various include files require some other include files
to be included first. Copied solution from net/if.h.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agodocs: add reference to git bisect docs on BUGS page
Øyvind Harboe [Wed, 4 Nov 2009 18:25:20 +0000 (19:25 +0100)]
docs: add reference to git bisect docs on BUGS page

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agotarget: 20 second timeout/megabyte for CRC check
Øyvind Harboe [Tue, 3 Nov 2009 14:38:09 +0000 (15:38 +0100)]
target: 20 second timeout/megabyte for CRC check

There was a fixed 20 second timeout which is too little
for large, slow timeout checks.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoarm920t: memory writes were broken when MMU was disabled
Øyvind Harboe [Tue, 3 Nov 2009 11:28:00 +0000 (12:28 +0100)]
arm920t: memory writes were broken when MMU was disabled

To support breakpoints, flush data cache line and invalidate
instruction cache when 4 and 2 byte words are written.

The previous code was trying to write directly to the physical
memory, which was buggy and had a number of other situations
that were not handled.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agotarget: require working area for physical/virtual addresses to be specified
Øyvind Harboe [Mon, 2 Nov 2009 10:10:09 +0000 (11:10 +0100)]
target: require working area for physical/virtual addresses to be specified

Fixed bug: if virtual address for working memory was not specified
and MMU was enabled, then address 0 would be used.

Require working address to be specified for both MMU enabled
and disabled case.

For some completely inexplicable reason this fixes the regression
in svn 2646 for flash write in arm926ejs target. The logs showed
that MMU was disabled in the case below:

https://lists.berlios.de/pipermail/openocd-development/2009-November/011882.html

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
10 years agoFT2232: increase read retry counts
Dimitar Dimitrov [Fri, 30 Oct 2009 18:54:07 +0000 (20:54 +0200)]
FT2232: increase read retry counts

This change is necessary to debug AT91SAM9260 on my PC with a
FT2232H dongle.

Signed-off-by: Dimitar Dimitrov <dinuxbg@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoUser's Guide: more init info, autoprobing, etc
David Brownell [Mon, 2 Nov 2009 01:54:47 +0000 (17:54 -0800)]
User's Guide: more init info, autoprobing, etc

Mention the autoprobing as a tool that may be useful when
figuring out how to set up; and add a section showing how
to use that mechanism (with an example).

Strengthen the differences between config and run stage
descriptions; add a section for the latter.

Mention Dragonite.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agodoxygen: avoid most internals
David Brownell [Mon, 2 Nov 2009 01:34:52 +0000 (17:34 -0800)]
doxygen: avoid most internals

For some reason, all the interals are documented by default.
This is wrong for two basic reasons:

 - We need to focus on public interfaces, since those are
   the architectural interfaces and relationships.

 - Since virtually nothing has doxygen support yet, this
   maximizes the noise, and minimizes the usefulness of
   doxygen output.

So don't expose so much by default.

10 years agoremove "-ircapture 0x1 -irmask 0x1" from stm32.cfg
Freddie Chopin [Sun, 1 Nov 2009 10:58:48 +0000 (11:58 +0100)]
remove "-ircapture 0x1 -irmask 0x1" from stm32.cfg

Gets rid of the runtime warning "stm32.bs: nonstandard IR mask"

[dbrownell@users.sourceforge.net: line lengths, note issue, section ref]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoarm9tdmi: more correct fix for vector_catch
David Brownell [Sun, 1 Nov 2009 01:03:54 +0000 (18:03 -0700)]
arm9tdmi: more correct fix for vector_catch

Just use the array of names we're given, ignoring indices.
The "reserved means don't use" patch missed that change.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agotarget.cfg: use $_TARGETNAME for flash
Freddie Chopin [Thu, 29 Oct 2009 18:23:05 +0000 (19:23 +0100)]
target.cfg: use $_TARGETNAME for flash

This gets rid of runtime warnings from the use of numbers.
STM32 and LPC2103 were tested.  Other LPC updates are the
same, and so are safe.  The CFI updates match other tested
changes now in the tree.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoNEWS: more info
David Brownell [Sat, 31 Oct 2009 03:21:31 +0000 (20:21 -0700)]
NEWS: more info

There were a few more changes worth mentioning, including support
for more JTAG adapters, boundary scan improvements, another NAND
driver, and the Win64 stuff.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoARM926: fix arm926ejs_mmu() reading from bad pointer
David Brownell [Sat, 31 Oct 2009 00:29:38 +0000 (17:29 -0700)]
ARM926: fix arm926ejs_mmu() reading from bad pointer

I'm suspecting this code can never have worked, since the
original commit (svn #335) in early 2008.

Fix is just copy/paste from another (working) function.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agobin2char: for win32 set stdin/stdout to binary mode
Spencer Oliver [Fri, 30 Oct 2009 11:59:57 +0000 (11:59 +0000)]
bin2char: for win32 set stdin/stdout to binary mode

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
10 years agoSVF: fix checking bit pattern against length
Michael Roth [Thu, 29 Oct 2009 13:24:28 +0000 (14:24 +0100)]
SVF: fix checking bit pattern against length

The code works like follow (N = bit_len):

N -1 %4 2<< -1 ~ (binary)
--------------------------------------------------
1 0 0 2 1 1111 1110
2 1 1 4 3 1111 1100
3 2 2 8 7 1111 1000
4 3 3 16 15 1111 0000
5 4 0 2 1 1111 1110
6 5 1 4 3 1111 1100
7 6 2 8 7 1111 1000
8 7 3 16 15 1111 0000
... ... ... ... ... ...

Addresses a bug reported by FangfangLi <ffli@syntest.com.cn>.

[dbrownell@users.sourceforge.net: fix spelling bug too]

Signed-off-by: Michael Roth <mroth@nessie.de>
Cc: FangfangLi <ffli@syntest.com.cn>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoOlimex FT2232H JTAG adapters
Dimitar Dimitrov [Thu, 29 Oct 2009 22:39:03 +0000 (15:39 -0700)]
Olimex FT2232H JTAG adapters

Add interface configs for two new high speed JTAG
adapters from Olimex.  They need some other speed
related tweaks to work well at high speed.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoXSVF: bugfix handling state paths
David Brownell [Thu, 29 Oct 2009 19:42:41 +0000 (12:42 -0700)]
XSVF: bugfix handling state paths

Implement XSVF support for detailed state path transitions,
by collecting sequences of XSTATE transitions into paths
and then calling pathmove().

It seems that the Xilinx tools want to force state-by-state
transitions instead of relying on the standardized SVF paths.
Like maybe there are XSVF tools not implementing SVF paths,
which are all that we support using svf_statemove().

So from IRPAUSE, instead of just issuing "XSTATE DRPAUSE"
they will issue XSTATES for each intermediate state: first
IREXIT2, then IRUPDATE, DRSELECT, DRCAPTURE, DREXIT1, and
finally DRPAUSE.  This works now.

Handling of paths that go *through* reset is a trifle dodgey,
but it should be safe.

Tested-by: Wookey <wookey@wookware.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoBump rc version and add -dev tag.
Zachary T Welch [Thu, 29 Oct 2009 04:23:17 +0000 (21:23 -0700)]
Bump rc version and add -dev tag.

Bump rc package version number: 0.3.0-rc0 -> 0.3.0-rc1
Add '-dev' version tag: 0.3.0-rc1 -> 0.3.0-rc1-dev

10 years agoThe openocd 0.3.0-rc0 release. v0.3.0-rc0
Zachary T Welch [Thu, 29 Oct 2009 04:23:17 +0000 (21:23 -0700)]
The openocd 0.3.0-rc0 release.

Remove '-dev' version tag: 0.3.0-rc0-dev -> 0.3.0-rc0

10 years agoCortex-M3: remove exports and forward decls
David Brownell [Wed, 28 Oct 2009 17:53:11 +0000 (10:53 -0700)]
Cortex-M3: remove exports and forward decls

Unneeded exports cause confusion about the module interfaces.
Make most functions static, and fix some line-too-long issues.
Delete some now-obviously-unused code.

The forward decls are just code clutter; move their references
later, after the normal declarations.  (Or vice versa.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoARM926: remove exports and forward decls
David Brownell [Wed, 28 Oct 2009 17:42:23 +0000 (10:42 -0700)]
ARM926: remove exports and forward decls

Unneeded exports cause confusion about the module interfaces.
Only the Feroceon code builds on this, so only routines it
reuses should be public..  Make most remaining functions
static, and fix some of the line-too-long issues.

The forward decls are just code clutter; move their references
later, after the normal declarations.  Turns out we don't need
even one forward declaration in this file.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agobugfix: stack corruption loading IHex images
Franck HÉRÉSON [Wed, 28 Oct 2009 17:24:55 +0000 (10:24 -0700)]
bugfix: stack corruption loading IHex images

The Hex parser uses a fixed number of sections.  When the
number of sections in the file is greater than that, the
stack get corrupted and a CHECKSUM ERROR is detected
which is very confusing.

This checks the number of sections read, and increases
IMAGE_MAX_SECTIONS so it works on my file.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoAdd script to test the release process.
Zachary T Welch [Thu, 22 Oct 2009 10:04:08 +0000 (03:04 -0700)]
Add script to test the release process.

Runs the release.sh script in a freshly cloned repository, charting
one hypothetical future of OpenOCD's lineage.

10 years agoRewrite release script to use GIT.
Zachary T Welch [Wed, 21 Oct 2009 00:11:33 +0000 (17:11 -0700)]
Rewrite release script to use GIT.

Update documentation to reflect GIT methodology.  Rewrite release.sh
script to use appropriate process.  With this update, tools/release.sh
can be used for producing private release tags on local branches.
The documentation still needs work, but their use for v0.3.x should
help rectify the deficiences.

10 years agoFactor version munging capabilities out of release.sh.
Zachary T Welch [Wed, 21 Oct 2009 00:12:17 +0000 (17:12 -0700)]
Factor version munging capabilities out of release.sh.

10 years agoFactor release version functions into new script.
Zachary T Welch [Thu, 22 Oct 2009 08:38:22 +0000 (01:38 -0700)]
Factor release version functions into new script.

10 years agoAdd git2cl from repo.or.cz as a submodule in tools/git2cl.
Zachary T Welch [Sat, 24 Oct 2009 10:04:28 +0000 (03:04 -0700)]
Add git2cl from repo.or.cz as a submodule in tools/git2cl.

10 years agoImprove .gitignore rules.
Zachary T Welch [Sat, 24 Oct 2009 10:05:41 +0000 (03:05 -0700)]
Improve .gitignore rules.

A '.*' rule prevents the 'git submodule add' from correctly adding the
first submodule, because it creates the .gitmodule file.  This file will
not be added (without -f) result in incomplete submodule commits.
The new rules mask the specific files present in my own build tree, but
additional rules may be needed to hide other types of temporary files.

10 years agoARM: fix single-step of Thumb unconditional branch
Nicolas Pitre [Wed, 28 Oct 2009 01:19:43 +0000 (21:19 -0400)]
ARM: fix single-step of Thumb unconditional branch

Only type 1 branch instruction has a condition code, not type 2.
Currently they're both tagged with ARM_B which doesn't allow for the
distinction.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoARM: fix target address when disassembling Thumb BLX
Nicolas Pitre [Wed, 28 Oct 2009 01:19:42 +0000 (21:19 -0400)]
ARM: fix target address when disassembling Thumb BLX

A Thumb BLX instruction is branching to ARM code, and therefore the
first 2 bits of the target address must be cleared.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoSignalyzer: H2 and H4 support
Oleg Seiljus [Tue, 27 Oct 2009 19:40:24 +0000 (12:40 -0700)]
Signalyzer: H2 and H4 support

This patch includes partial support for these new JTAG adapters.
More complete support will require updates to the libftdi code,
for EEPROM access.

[dbrownell@users.sourceforge.net: fix whitespace, linelen, etc ]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoSignalyzer: new config files
Oleg Seiljus [Tue, 27 Oct 2009 18:56:04 +0000 (11:56 -0700)]
Signalyzer: new config files

Add configs for H2, H4, LITE.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoARM: fix Thumb mode handling when single-stepping register based branch insns
Nicolas Pitre [Tue, 27 Oct 2009 05:14:34 +0000 (01:14 -0400)]
ARM: fix Thumb mode handling when single-stepping register based branch insns

Currently, OpenOCD is always caching the PC value without the T bit.
This means that assignment to the PC register must clear that bit and set
the processor state to Thumb when it is set.  And when the PC register
value is transferred to another register or stored into memory then
the T bit must be restored.

Discussion: It is arguable if OpenOCd should have preserved the original
PC value which would have greatly simplified this code.  The processor
state could then be obtained simply by getting at bit 0 of the PC.  This
however would require special handling elsewhere instead since the T bit
is not always relevant (like when PC is used with ALU insns or as an index
with some addressing modes).  It is unclear which way would be simpler in
the end.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
10 years agoARM: allow proper single stepping of Thumb BL and BLX instructions
Nicolas Pitre [Tue, 27 Oct 2009 05:14:33 +0000 (01:14 -0400)]
ARM: allow proper single stepping of Thumb BL and BLX instructions

Whenever an unconditional branch with the H bits set to 0b10 is met, the
offset must be combined with the offset from the following opcode and not
ignored like it is now.

A comment in evaluate_b_bl_blx_thumb() suggests that the Thumb2 decoder
would be a simpler solution.  That might be true when single-stepping of
Thumb2 code is implemented.  But for now this appears to be the simplest
solution to fix Thumb1 support.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>