Commit Graph

2934 Commits (627bd197689d71f7beb3e9cd11e2993fe0d4d880)

Author SHA1 Message Date
Zachary T Welch ab33bdd46c Improve xscale command argument parsing. 2009-11-05 18:03:19 -08:00
Zachary T Welch 6e542407e7 Improve pld command argument parsing. 2009-11-05 18:03:19 -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
Zachary T Welch 653ea7b25c Improve target.c command argument parsing.
Passes cmd_ctx into parse_load_image_command_args for reporting the
parsing errors therein.
2009-11-05 18:03:18 -08:00
Zachary T Welch b7b561aae8 Improve jtag command argument parsing. 2009-11-05 18:03:18 -08:00
Zachary T Welch f6f1dbfafd Improve debug_level command argument parsing. 2009-11-05 18:03:18 -08:00
Zachary T Welch 36a3646c22 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.
2009-11-05 17:27:25 -08:00
Zachary T Welch 68785af4da Add stringify macros in src/helper/types.h. 2009-11-05 17:20:18 -08:00
Øyvind Harboe 0f3117c19d 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>
2009-11-05 23:57:49 +01:00
Øyvind Harboe dc98c64d71 arm11: check if target is halted before executing mrc/mcr commands.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-05 23:57:49 +01:00
Øyvind Harboe 051eaf7950 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>
2009-11-05 23:57:49 +01:00
Øyvind Harboe 4e3c2676f1 target: check args to mrc/mcr.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-05 23:57:49 +01:00
Øyvind Harboe 4441c1ffdc ARM11: added mrc/mcr support to arm11 code.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-05 23:57:49 +01:00
Øyvind Harboe cca7cf1e74 TODO: Wrote up list of remaining tasks for target->type->mrc/mcr
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-05 23:56:37 +01:00
Øyvind Harboe b64503e37f 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>
2009-11-05 23:56:37 +01:00
Øyvind Harboe 1ebdc24494 cortex_a8: add mrc mcr interface.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-05 23:56:37 +01:00
David Brownell afed39c0fe 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>
2009-11-05 11:31:32 -08:00
David Brownell 98788d7a75 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>
2009-11-05 01:47:44 -08:00
David Brownell 16b4b8cf54 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>
2009-11-05 01:04:08 -08:00
David Brownell 8fb2baaa6b 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>
2009-11-05 01:03:54 -08:00
David Brownell 7acb2607ff 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>
2009-11-05 01:03:17 -08:00
David Brownell ff50caa8fa 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>
2009-11-05 01:02:52 -08:00
Øyvind Harboe d269122f91 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>
2009-11-05 09:53:31 +01:00
Øyvind Harboe 972924b2ad Make default implementation of mdw/mmw phys return error 'not implemented' 2009-11-05 09:26:08 +01:00
Øyvind Harboe af66678c9a 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>
2009-11-05 09:07:56 +01:00
Øyvind Harboe acff2521fb 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>
2009-11-05 09:05:10 +01:00
Øyvind Harboe a5e396b964 warnings: remove
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-05 09:03:24 +01:00
David Brownell 2d9863e121 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>
2009-11-04 21:41:08 -08:00
Krzysztof Kajstura 2970696e89 JTAG: support KT-LINK adapter
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-04 21:20:44 -08:00
David Brownell fd108f5737 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>
2009-11-04 21:11:44 -08:00
David Brownell 067501b0c7 Version 0.4.0-dev
Add "-dev" tag.  Update minor version number.
Archive old NEWS file, start a new one.
2009-11-04 19:44:36 -08:00
David Brownell 1d5a3a6bcd Version 0.3.0
Remove -dev tag, remove -rc tag.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-04 19:39:59 -08:00
David Brownell ecd9c0d8bf 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.
2009-11-04 17:49:06 -08:00
David Brownell 6455ae4a59 Doc: fix broken link
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-04 17:12:53 -08:00
David Brownell efa7f8b4bb NEWS: mention switch to git! 2009-11-04 17:03:20 -08:00
David Brownell 16f485aca2 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>
2009-11-04 16:46:27 -08:00
David Brownell 0e37ea6499 NEWS refs repository history, not ChangeLog
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-04 15:54:33 -08:00
David Brownell 1c51f342d7 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>
2009-11-04 15:38:06 -08:00
David Brownell 333601da4b 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>
2009-11-04 15:20:18 -08:00
Øyvind Harboe b8e7408b92 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>
2009-11-04 19:27:53 +01:00
Øyvind Harboe 099e5b6920 docs: add reference to git bisect docs on BUGS page
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-04 19:25:20 +01:00
Øyvind Harboe 1b60ce8d5b 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>
2009-11-03 15:38:09 +01:00
Øyvind Harboe f37c9b8d15 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>
2009-11-03 12:28:00 +01:00
Øyvind Harboe b5ce7fe812 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>
2009-11-03 11:56:05 +01:00
Dimitar Dimitrov e901cee72f 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>
2009-11-01 19:56:51 -08:00
David Brownell 72210fe3a3 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>
2009-11-01 17:54:47 -08:00
David Brownell 13e264426c 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.
2009-11-01 17:34:52 -08:00
Freddie Chopin 2120231afd 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>
2009-11-01 07:02:23 -08:00
David Brownell c352c96f74 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>
2009-10-31 18:03:54 -07:00