Commit Graph

858 Commits

Author SHA1 Message Date
duane
b9feaddd75 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2306 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:36 +00:00
duane
b54f4c5cb6 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2305 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:32 +00:00
duane
be1ab108f3 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2304 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:28 +00:00
duane
7b97e5b1cc C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2303 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:24 +00:00
duane
fde4f37f6a C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2302 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:16 +00:00
duane
f2f612aa69 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2301 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:10 +00:00
duane
b521037509 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2300 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:15:03 +00:00
duane
d84bba66ae C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2299 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:14:58 +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
oharboe
333642fcff fix jtag_add_callback() args. The first argument is nothing special, it's just another generic argument.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-19 08:18:36 +00:00
zwelch
592e080690 Cast 64-bit trace hit_counter to long long; fixes format warning.
What is the correct way to handle this?


git-svn-id: svn://svn.berlios.de/openocd/trunk@2285 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 10:40:33 +00:00
zwelch
0ca97d82d8 Transform 'u64' to 'uint64_t'
- Replace '\([^_]\)u64' with '\1uint64_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2282 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:11:40 +00:00
zwelch
3c2eabd20f Transform 'u32' to 'uint32_t' in src/target
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2279 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:09:35 +00:00
zwelch
db7e77237c Transform 'u32' to 'uint32_t' in src/target/arm*
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2278 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:08:52 +00:00
zwelch
f876d5e9c7 Transform 'u16' to 'uint16_t'
- Replace '\([^_]\)u16' with '\1uint16_t'.
- Replace '^u16' with 'uint16_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:07:59 +00:00
zwelch
86173cdbdd Transform 'u8' to 'uint8_t' in src/target
- Replace '\([^_]\)u8' with '\1uint8_t'.
- Replace '^u8' with 'uint8_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2274 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:04:08 +00:00
zwelch
6ba0b46cec David Brownell <david-b@pacbell.net>:
Fix parsing bugs for "$target_name mww addr data [count]" ... it was
always requiring the count, instead of just defaulting it to one.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2263 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-17 06:40:39 +00:00
zwelch
a0c10dd29b David Brownell <david-b@pacbell.net>:
Extend the internal JTAG event handlers to cover enable/disable,
and use those events to make sure that targets get "examined" if
they were disabled when the scan chain was first set up:

 - Remove "enum jtag_tap_event", merge with "enum jtag_event",
   so C code can now listen for TAP enable/disable events.

 - Report those events so they can trigger callbacks.

 - During startup, make target_examine() register a handler to
   catch ENABLE events for any then-disabled targets.

This fixes bugs like "can't halt target after enabling its TAP".

One class of unresolved bugs:  if the target has an ETM hooked
up to an ETB, nothing activates the ETB.  But starting up the
ETM without access to the ETB registers fails...


git-svn-id: svn://svn.berlios.de/openocd/trunk@2251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-16 12:17:18 +00:00
zwelch
14f88acaf6 David Brownell <david-b@pacbell.net>:
Fix some polling issues:

 - Don't background-poll disabled TAPs ... this was just a bug
   waiting to happen.  (And then it happened!)

 - Don't fail command line polls of disabled taps; that's not any
   kind of error, it's just that you can't do much.  But do show
   that tap-disabled status.

 - Spell "continuous" correctly in the variable name.  ;)

Not resolved by this patch:  the need for an interlock whereby
other code (like the JTAG layer) can block all other access to
the JTAG layer, e.g. while enabling or disabling TAPs.  And
that interlock needs to be timer-safe...


git-svn-id: svn://svn.berlios.de/openocd/trunk@2247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-16 00:23:13 +00:00
zwelch
0ffbc60333 Factor load_image argument parsing to parse_load_image_command_args:
- Make fast_load_image use the helper coverage the standard load_image.
- Improve whitespace in the moved lines.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2239 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:34:31 +00:00
zwelch
af52480a45 Improve handle_profile_command argument parsing:
- Use parse_uint to ensure timeout value parses properly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:34:24 +00:00
zwelch
b7c5e630ea Improve handle_virt2phys_command argument parsing:
- Use parse_u32 to ensure virtual address parses properly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2237 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:34:17 +00:00
zwelch
f7afcfe23f Cleanup and improve handle_wp_command and handle_rwp_command:
- Simplify argument parsing logic using switch statement.
- Use parse_u32 to ensure all values parse properly.
- Return syntax error when mode argument fails to parse.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2236 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:34:10 +00:00
zwelch
d0a300e0a0 Improve and simplify handle_bp_command and handle_rbp_command:
- Bug fix: return syntax error if remove called without one argument.
- Use parse_u32 to ensure address and length arguments parse properly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2235 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:34:03 +00:00
zwelch
16c77cf3ca Improve handle_verify_image_command_internal command argument handling:
- Use parse_u32 to ensure address parses properly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2234 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:55 +00:00
zwelch
890973acc4 Improve handle_dump_image_command argument parsing:
- Use parse_u32 to ensure address and size parse properly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2233 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:48 +00:00
zwelch
bb37adadab Improve handle_load_image_command argument parsing:
- Use parse_u32 to ensure base/min/max addresses parse properly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2232 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:42 +00:00
zwelch
6f9aac1892 Improve handle_mw_command argument handling:
- Change: All local variable types are now unsigned.
- Use parse_u32 to ensure address and value parse properly.
- Use parse_uint to ensure count parses properly.
- Move variables to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2231 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:34 +00:00
zwelch
08128b572a Improve handle_md_command argument handling:
- Use parse_u32 and parse_uint for address and count, respectively.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2230 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:25 +00:00
zwelch
71f95de8a6 Use parse_u32 in handle_resume_command and handle_step_command.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2229 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:18 +00:00
zwelch
5d0cdf4d94 Cleanup and improve handle_halt_command:
- Make argument check use parse_uint to ensure value parses properly.
- Move variable declarations to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2228 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:11 +00:00
zwelch
fad8521a87 Cleanup and fi handle_wait_halt_command:
- Use unsigned type for delay variable.
- Use parse_uint to ensure delay argument parses properly.
- Bug fix: Return syntax error if more than one argument is given.
- Bug fix: Return syntax error when argument fails to parse.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2227 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:33:01 +00:00
zwelch
45ec363c4a Use parse_uint in handle_reg_command to ensure reg number parses properly.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2226 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:32:54 +00:00
zwelch
2343245090 Use parse_uint in get_target to ensure target id is parsed properly.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2225 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-13 00:32:40 +00:00
zwelch
7fdce0e8bc Further cleanup to MIPS target read/write memory function:
- Move the mips32_..._read_mem calls to top-level of read_mem function.
- Change: Only perform mips_m4k_read_mem conversion when retval == ERROR_OK.  
   - Prevents pointless conversions of bogus read values after failures.
- Eliminate retval variable from mips_m4k_write_mem; return directly.
- Move declaration of retval variable to point of first use.
- Remove the now redundant switch statements testing size:
  - argument sanitizing already covers these cases.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2220 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-12 04:14:28 +00:00
zwelch
c6e80f63a3 David Claffey <dnclaffey@gmail.com>:
This patch helps fix MIPS big endian (elf32-tradbigmips) targets.
If "-endian big" is not set in target create, the endianess defaults to
little.  mw and md commands will still work, but binary file loads will
have the incorrect word order loaded into memory.

The EJTAG processor access data register (PrAcc) is little endian
regardless of the CPU endianness; it is always loaded LSB first. This
is confirmed by the fact that mips_ejtag_drscan_32() uses buf_set_u32()
to load the scan field; buf_set_u32() is a little-endian formatter. For
big endian targets, data buffers have to be modified so the LSB of each
u32 or u16 is at the lower (first) memory location.  If the drscan
out_value word order is set using buf_set_u32() then it makes sense to
also fixup the in_value with buf_get_u32(); a symmetry argument. This
has no affect on little endian hosts.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2219 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-12 04:14:18 +00:00
ntfreak
2e0be4e18b - fix bug introduced during r1962
- Original patch submitted by David Claffey [dnclaffey@gmail.com].



git-svn-id: svn://svn.berlios.de/openocd/trunk@2202 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 19:32:10 +00:00
oharboe
1b2c1c6ff0 fix ordering of arguments to fwrite()
git-svn-id: svn://svn.berlios.de/openocd/trunk@2197 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 13:00:08 +00:00
zwelch
538050c146 Factor handle_bp_command into pieces:
- Bug fix: return a syntax error if the wrong number of arguments are given.
- Add handle_bp_command_list() and handle_bp_command_set().
- Use temporary addr variable to eliminate redundant strtoul() calls.
- Place variable declarations at their point of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2196 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:43:07 +00:00
zwelch
8e899d43ef Factor target_timer_callbacks_check_time into pieces:
- Add target_timer_callback_periodic_restart and target_call_timer_callback.
- Clean up and simplify logic that determines whether to call each callback. 
- Move variable declarations to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2195 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:43:00 +00:00
zwelch
7c892082c9 Simplify and clean handle_virt2phys_command:
- Add a doxygen block to simplify logic.
- Move declarations to point of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2194 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:42:54 +00:00
zwelch
57612ecf1d Simplify and fix target handle_rwp_command routine:
- Return syntax error unless exactly one argument is passed.
- Move variable declaration to point of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2193 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:42:47 +00:00
zwelch
d7ada2457e Simplify and fix handle_reset_command:
- Return syntax error if more than one argument is given.
- Move variables to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2192 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:42:40 +00:00
zwelch
e4850d7159 Simplify handle_resume_command:
- Eliminate redundant calls to target_resume with addr temp variable.
- Place variables at location of first use.
- Fix minor whitespace issues.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2191 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:42:33 +00:00
zwelch
78cf92166a Simplify and fix handle_step_command:
- Bug fix: return syntax error when more than one argument is given.
- Eliminate redundant calls to step callback with addr temp variable.
- Place variables at location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 11:42:26 +00:00
oharboe
c1995bb08f disable polling continuous polling during reset
git-svn-id: svn://svn.berlios.de/openocd/trunk@2183 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-11 06:19:37 +00:00
zwelch
bdb7dd5e0f Move the documentation for the "poll" command up with
other server configuration.  Explain what it's about;
reference the related "$target_name curstate" method.

Update "poll" output to report whether background polling
is enabled or not.

Also fix a small typo; PC's have "complementary" tools.
Some have also "complimentary" ones; but not all.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2178 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-10 04:06:25 +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
6dc2c2ce97 Encapsulate jtag_reset_config using accessors:
- Update handle_reset_config_command in tcl.c to use new helpers.
- Replace direct accesses in JTAG interface and target drivers.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2161 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 08:40:31 +00:00
zwelch
175867ea32 Encapsulate the jtag_trst and jtag_srst variables:
- Add accessor functions to return their value.
- Use new SRST accessor in cortex_m3.c and mips_m4k.c


git-svn-id: svn://svn.berlios.de/openocd/trunk@2157 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 08:39:50 +00:00
zwelch
133a616572 Replace 'jtag.c' with 'core.c' in code comments.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2152 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 04:54:09 +00:00
oharboe
e468797e41 David Brownell <david-b@pacbell.net> Bugfix: $target_name cget/configure -work-area-backup commands
should return the "is it backed up?" flag, not the work area size.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2108 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 06:18:13 +00:00
oharboe
a405fd1581 David Brownell <david-b@pacbell.net>
- Don't let disabled TAPs be set as the current target

 - Improve "targets" output:
    * Remove undesirable "chain position" number; we discourage using them
    * TAP and Target column updates:
       + make them long enough for current usage
       + improve labels, removing guesswork
       + "TapName" label patches scan_chain output
    * Highlight the "current" target
    * Display "tap disabled" as a new pseudo-state
    * Update docs accordingly

git-svn-id: svn://svn.berlios.de/openocd/trunk@2107 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 06:16:43 +00:00
zwelch
695c6c0960 David Brownell <david-b@pacbell.net>:
Let disabled targets be ignored during normal operation:

 - In target_examine(), ignore disabled TAPs

 - Reset handling must not poke at them either:
     * fail $target_name arp_* operations on disabled TAPs
     * in startup.tcl, don't even issue the arp_* wait ops 

ZW: removed superfluous braces from the patch to target.c.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2100 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 23:35:29 +00:00
zwelch
733dfb288f Fix regression in mdw output; identified by Magnus Lundin.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2098 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 23:20:30 +00:00
oharboe
3b3a5b642c remove unused include file: inttypes.h
git-svn-id: svn://svn.berlios.de/openocd/trunk@2072 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 06:41:54 +00:00
oharboe
a49faa206d remove unused include file: inttypes.h
git-svn-id: svn://svn.berlios.de/openocd/trunk@2071 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 06:37:21 +00:00
zwelch
7db5839608 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByJimObj' as 'jtag_tap_by_jim_obj.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2066 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:43:12 +00:00
zwelch
689e9664b0 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByString' as 'jtag_tap_by_string.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2065 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:42:52 +00:00
oharboe
01801e3f45 unbreak arm11. TAP_INVALID is used to communicate inband that a special state should be used to lower level fn's in ARM11 code.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2052 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 20:05:32 +00:00
ntfreak
f7d3fdb195 - add support for different TAR autotincrement sizes as per ARM ADI spec.
- set TAR size to 12 bits for Cortex-M3.
- Original patch submitted by Magnus Lundin [lundin@mlu.mine.nu].


git-svn-id: svn://svn.berlios.de/openocd/trunk@2051 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 13:45:50 +00:00
oharboe
d861002612 Rename jtag_add_end_state to jtag_set_end_state since "add" implies that
this fn has something to do with the queue, which it does not as such.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2050 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 13:18:07 +00:00
oharboe
f133158175 Introduce jtag_get_end_state() fn to clarify code a bit.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2049 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 13:14:07 +00:00
oharboe
040e6cef41 no longer use jtag_add_xxx() to set end state to TAP_DRPAUSE
git-svn-id: svn://svn.berlios.de/openocd/trunk@2045 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 12:12:38 +00:00
oharboe
f499341558 no longer use jtag_add_xxx() to set end state to TAP_IDLE. Same must be done for TAP_DRPAUSE
git-svn-id: svn://svn.berlios.de/openocd/trunk@2044 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 12:06:31 +00:00
oharboe
6468859389 remove TAP_INVALID as argument to jtag_add_xxx() fn's
git-svn-id: svn://svn.berlios.de/openocd/trunk@2042 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 11:33:36 +00:00
zwelch
9a5acdc161 Improve in-source documentation that was causing Doxygen warnings.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2025 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 04:37:51 +00:00
ntfreak
7dc29156fe - change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_t *swjdp instead of arm_jtag_t *jtag_info
- change SWJDP_IR/DR_APACC to DAP_IR/DR_APACC to conform with ARM_ADI docs.
- add swjdp->memaccess_tck field and code for extra tck clocks before accessing memory bus
- Set default memaccess value to 8 for Cortex-M3.
- Add dap memaccess command.
- document all armv7 dap cmds.
- Original patch submitted by Magnus Lundin [lundin@mlu.mine.nu].

git-svn-id: svn://svn.berlios.de/openocd/trunk@2005 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 21:06:12 +00:00
oharboe
b7a133bd48 some trivial minidriver fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2002 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 10:09:53 +00:00
zwelch
337017d626 Scrub final vestiges of in_handler from mips target APIs.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1981 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 21:53:19 +00:00
oharboe
414245c9ce fix warning for a variable that GCC thought might be uninitialized(which it can't be).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1979 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 19:06:11 +00:00
zwelch
b3d797699c David Brownell <david-b@pacbell.net>:
Whitespace fixes.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1973 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 03:05:42 +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
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