Commit Graph

736 Commits

Author SHA1 Message Date
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
818aa27a9d First step in hiding target_type_s from public interface:
- Add DEFINE_TARGET_TYPE_S symbol in files that need it defined.
- Forward declare 'struct target_type_s' only, unless that symbol is defined.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:32:28 +00:00
zwelch
4deb42ed00 Add target_examine_one wrapper:
- replaces all calls to target->type->examine.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1968 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:32:10 +00:00
zwelch
d00ac17e8e Add target breakpoint and watchpoint wrapper:
- replaces all calls to target->type->{add,remove}_{break,watch}point.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1967 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:52 +00:00
zwelch
0de78ed02c Add target_get_name wrapper:
- replaces all accesses to target->type->name.
- add documentation in target_s to warn not to access field directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1966 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:27 +00:00
zwelch
17fa4de854 Add target_step wrapper:
- replaces all calls to target->type->step.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1965 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:11 +00:00
zwelch
df4cf0615f Add target_get_gdb_reg_list wrapper:
- replaces all calls to target->type->get_gdb_reg_list.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1964 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:30:59 +00:00
zwelch
11edf22776 Add target_bulk_write_memory wrapper:
- replaces all calls to target->type->bulk_write_memory.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1963 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 09:39:04 +00:00
zwelch
9cb3af610a Add wrappers for target->type->examined:
- replace all checks of target->type->examined with target_was_examined().
- replace all setting of target->type->examined with target_set_examined().
- replace clearing of target->type->examined with target_reset_examined().
- add documentation in target_s to warn not to access field directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 09:38:43 +00:00
zwelch
fbe8cf72a5 Add target_run_algorithm wrapper:
- replaces all calls to target->type->run_algorithm.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1961 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 09:38:20 +00:00
zwelch
95e13054ca Add target_write_memory wrapper:
- replaces all calls to target->type->write_memory.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1960 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 09:37:57 +00:00
zwelch
b6db182c00 Add target_read_memory wrapper:
- replaces all calls to target->type->read_memory.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1959 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 09:37:35 +00:00
zwelch
6785193118 Simplify the handle_md_command routine in target.c:
- fix buffer overrun in mdw; final '\0' would overflow the output buffer.
 - return ERROR_COMMAND_SYNTAX_ERROR instead of ERROR_OK if:
   - less than one argument is provided
   - the command is called with a name other than mdb, mdh, or mdw.
 - factor all command output into new handle_md_output function


git-svn-id: svn://svn.berlios.de/openocd/trunk@1958 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 06:00:28 +00:00
zwelch
55f21192b0 Make nvp_target_event static; remove its external declaration.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1957 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 04:58:51 +00:00
zwelch
12df0f0090 Make target_buffer_get_uXX interfaces work with constant buffers.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1956 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 02:18:26 +00:00
zwelch
58e31916de Eliminate duplicated code in the handle_mw_command memory write loop.
- wordsize will always be 1, 2, or 4 due to preceeding switch statement.
- move call to keep_alive after successful writes, not upon failures


git-svn-id: svn://svn.berlios.de/openocd/trunk@1953 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 23:57:30 +00:00
zwelch
2327b8603c Remove trailing whitespace from oocd_trace source file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1946 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 01:44:22 +00:00
zwelch
91d55c0e50 David Brownell <david-b@pacbell.net>:
Provide basic documentation on the ARM ETM and ETB trace commands.

Fix minor goofs in registration of the ETM commands; and whitespace
issues in the proof-of-concept oocd_trace code.  (Plus include a
ref to Dominic's email saying that it's just proof-of-concept code.)

Note that I'm still not sure whether the ETM support works.  But
documenting how it's expected to work should help sort out which
behaviors are bugs, which will help get bugs patched.

ZW: whitespace changes were split out of this patch but will follow.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1945 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 01:43:21 +00:00
kc8apf
9a8650ec05 Author: Nicolas Pitre <nico@cam.org>
- cut out the "unknown EmbeddedICE version" message with Feroceon


git-svn-id: svn://svn.berlios.de/openocd/trunk@1934 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 21:03:51 +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
mifi
42c009e2be Added the options calc_checksum to the flash driver.
This was forgotten here. All other LPC targets use
this option.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1906 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 11:24:14 +00:00
zwelch
76d3131f48 Nicolas Pitre <nico@cam.org>: Update sheevaplug interface script:
When the CPU is in the WFI state, the JTAG interface simply doesn't 
respond at all and initial tap examination simply fails.  Let's simply
do it again when we come around to assert nSRST.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1905 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 02:08:17 +00:00
zwelch
eb385b2e70 David Brownell <david-b@pacbell.net>:
Update two oddball NAND commands to work with {offset, length}
instead of block numbers, matching the other commands as well
as usage in U-Boot and the Linux-MTD utilities.

Document them accordingly.  Update the single in-tree use of
those commands (sheevaplug).

ALSO:

 (a) Document the current 2 GByte/chip ceiling for NAND chipsize.
     (32 bit offset/length values can't represent 4 GBytes.)  Maybe
     after the upcoming release, the code can switch to 64-bits.

 (b) The "nand check_bad_blocks" should report "bad" blocks.  They
     are not "invalid" blocks; they're "bad" ones.

 (c) Tweak the "nand info" command to handle the "no arguments"
     case sanely (show everything, instead of showing garbage) and
     not listing the blocksize in hex kbytes (duh).


git-svn-id: svn://svn.berlios.de/openocd/trunk@1904 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 01:57:13 +00:00
zwelch
c0fc8f93f1 David Brownell <david-b@pacbell.net>:
NAND support for DaVinci-family drivers, with HW ECC support.
Declare the NAND chip on the DM355 EVM board.

Currently tested on DM355 for Linux interop using the standard
large page (2KB) chip in the EVM socket; "hwecc1" and "hwecc4"
work fine.  (Using hwecc4 relies on patches that haven't quite
made it through the Linux-MTD bottlenecks yet.)

Not yet tested:  1-bit on small-page (although it's hard to see
how that could fail); 4-bit on small page (picky layout issues);
the "hwecc_infix" mode (primarily for older boot ROMs; testing
there is blocked on having new bootloader code).


git-svn-id: svn://svn.berlios.de/openocd/trunk@1903 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 01:38:19 +00:00
zwelch
7e11f08a77 Freddie Chopin <freddie_chopin@op.pl>:
- add reset delay settings for LPC2103, LPC2124, and LPC2129.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1899 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 00:16:04 +00:00
mifi
2a6c215c45 Change the setting for the sam7se512 and sam7x256
flash driver because of the new at91sam7 version.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1890 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-23 18:26:06 +00:00
zwelch
3d0b474da9 Submitted by David Brownell <david-b@pacbell.net>:
Improve support for the DM355 EVM board, and eventually other boards based
on DaVinci chips:

 - Provide generic "davinci.cfg" to hold utilities that can be reused by
   different chips in this family.  Start with PINMUX, PSC, and PLL setup.

 - DM355 chip support updates:  provide a dictionary with chip-specific
   symbols, load those utilities.

 - Create a new dm355evm board file, with a reset-init event handler
   which uses those utilities to set up PLLs and clocks, configure the
   pins, and improve the JTAG speed limit.

Also a minor tweak:  provide a virtual address for the work area, matching
what the very latest kernels do.  It's probably unwise to use OpenOCD while
the MMU is active though.

The DRAM isn't yet accessible, but NAND access is mostly ready.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1881 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-22 02:32:31 +00:00
zwelch
ebd3f88798 Submitted by Dean Glazeski <dnglaze@gmail.com>:
Add doxygen comments in arm7_9_common source and header files.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1880 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-22 02:27:30 +00:00
oharboe
e2abb325df Dirk Behme <dirk.behme@googlemail.com> Minor updates for OMAP3 scripts
git-svn-id: svn://svn.berlios.de/openocd/trunk@1875 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 16:15:41 +00:00
zwelch
570631454d David Brownell <david-b@pacbell.net>: This patch adds annotations to
the key command_*() helper functions, fixng the bugs that turned up.

Several of these bugs were from misuse of PRIi64; that's for 64-bit
integers, NOT for "long long" or "u64" (which work best with %lld).


git-svn-id: svn://svn.berlios.de/openocd/trunk@1873 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 09:28:57 +00:00
kc8apf
4b992717b5 Author: Øyvind Harboe <oyvind.harboe@zylin.com>
- Allow target_read/write_buffer of size 0


git-svn-id: svn://svn.berlios.de/openocd/trunk@1870 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 05:12:32 +00:00
kc8apf
30268bc40f Author: Spencer Oliver <spen@spen-soft.co.uk>
- Bring the mips step/resume interrupt handling inline with the
rest of openocd.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1850 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 05:07:34 +00:00
mifi
d78df28121 Added jtag_nsrst_delay 200 and jtag_ntrst_delay 200 to the LPC2294 target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1838 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-19 17:57:44 +00:00
oharboe
b19c48c6c8 Wookey <wookey@wookware.org> update syntax
git-svn-id: svn://svn.berlios.de/openocd/trunk@1836 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-19 11:53:05 +00:00
oharboe
a63361f982 Dean Glazeski <dnglaze@gmail.com> fixed bug in checking of clocked back data in arm7_9_execute_fast_sys_speed. Not reported. There is a chance that this bug hid a deeper problem since it only partially disabled the check(mask & value were equal).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1809 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 07:10:48 +00:00
ntfreak
0958051391 - add missing svn props from svn 1798 commit
git-svn-id: svn://svn.berlios.de/openocd/trunk@1808 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 07:04:58 +00:00
oharboe
350f608256 Michael Bruck <mbruck@digenius.de> ARM11 cleanup stale dependencies with generic arm code; added comments and whitespace fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1807 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 07:02:12 +00:00
kc8apf
da34c09128 Fix logically inverted comment
git-svn-id: svn://svn.berlios.de/openocd/trunk@1805 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 04:45:42 +00:00
kc8apf
c977616cda Consolidate target selection code into single get_target() that handles both names and numbers. Provided by David Brownell <david-b@pacbell.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1804 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 04:44:28 +00:00
oharboe
41826d5bd9 fix array2mem/mem2array when used as a "method" on a target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1801 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-17 13:00:36 +00:00
oharboe
72f5449e4b Freddie Chopin <freddie_chopin@op.pl> move files about to where they belong
git-svn-id: svn://svn.berlios.de/openocd/trunk@1798 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-16 14:57:02 +00:00
zwelch
ca7ec066b2 Paul Thomas <pthomas8589@gmail.com>: new board cfg for Linuxstamp-mx27
git-svn-id: svn://svn.berlios.de/openocd/trunk@1788 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-14 21:55:56 +00:00
oharboe
b3b0ff60c2 take #2: dump_image now works for addresses not divisible by 4
git-svn-id: svn://svn.berlios.de/openocd/trunk@1786 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-14 19:00:35 +00:00
oharboe
a74d911412 dump_image now works for addresses not divisible by 4
git-svn-id: svn://svn.berlios.de/openocd/trunk@1785 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-14 18:56:41 +00:00
oharboe
0bb9c5de63 selftest wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1783 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-14 10:52:41 +00:00
oharboe
c5e51bca0a propagate error in dump_image. If an error occurs during dump_image, a tcl exception is thrown.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1782 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-14 08:44:09 +00:00
oharboe
cbfa0304f9 4-bit ECC support for Marvell Kirkwood SOC
git-svn-id: svn://svn.berlios.de/openocd/trunk@1768 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 17:29:16 +00:00
oharboe
f34386ee32 Nicolas Pitre <nico@cam.org> lower JTAG clock for SheevaPlug
git-svn-id: svn://svn.berlios.de/openocd/trunk@1767 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 17:14:10 +00:00
zwelch
f976af56a4 Audit and remove redundant uses of replacements.h in the tree.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1761 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 08:35:17 +00:00