Commit Graph

676 Commits

Author SHA1 Message Date
zwelch
d706eb206e Cleanup jtag_tap_count_enabled.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2139 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 02:23:03 +00:00
zwelch
ff85ad7c12 Change jtag_add_pathmove to set jtag_error rather than call exit():
- Add new error codes to encode the possible failure conditions.
- Add documentation to describe the routine's possible error codes.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2138 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 01:16:35 +00:00
zwelch
731d2d0cb6 Reduce scope or eliminate temporary variables in jtag_add_statemove:
- Change types of tms_bits and tms_count to unsigned, eliminates a cast.
- Use moves[] only if needed; a single move can use goal_state directly.
- Declare loop induction variable inside its control statement.
- Remove retval in favor of direct returns.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2137 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 01:16:19 +00:00
zwelch
b3121aac76 Move documentation in jtag_add_statemove body to Doxygen block.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2136 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 01:16:13 +00:00
oharboe
3245a0cd5f update zy1000 to latest minidriver work
git-svn-id: svn://svn.berlios.de/openocd/trunk@2132 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 14:13:32 +00:00
zwelch
51d158c410 Factor interface list to its own command:
- Add handle_interface_list_command, used by handle_interface_command.
- Display output of new list to command console.
- Change first index of displayed drivers to 1; it's only cosmetic.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2129 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 13:12:17 +00:00
zwelch
7bcd2e6854 Cleanup and simplify handle_interface_command:
- Reduce indent: invert logic of strcmp test.
- Reduce scope: declare variables upon first use in loops.
- Reduce unsaid: compare end of table with NULL.
- Remove superfluous braces around blocks with one statment.
- Improve language that introduces the list of built-in drivers.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2128 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 13:12:12 +00:00
zwelch
8290a05c2b Simplify jtag_add_sleep:
- Add todo for removing keep_alive: is this a layering violation?
- Use jtag_set_error instead of accessing jtag_error directly.
- Remove superfluous retval temporary variable and empty return.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2127 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:58:28 +00:00
zwelch
8c21ca7e81 Simplify jtag_add_reset:
- Use jtag_set_error instead of accessing jtag_error directly.
- Remove superfluous retval temporary variable.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2126 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:58:13 +00:00
zwelch
6f4de887f7 Simplify jtag_add_clocks:
- Use jtag_set_error instead of accessing jtag_error directly.
- Improve error language and whitespace.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2125 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:57:51 +00:00
zwelch
d76c63431f Simplify jtag_add_runtest:
- Use jtag_set_error instead of accessing jtag_error directly.
- Eliminate superfluous comment and temporary variable.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2124 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:57:39 +00:00
zwelch
521d8d5bfa Simplify jtag_add_pathmove:
- Use jtag_set_error instead of accessing jtag_error directly.
- Eliminate superfluous retval temporary variable.
- Reduce scope of loop induction variable.
- Wrap to fit within 80 columns.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2123 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:57:18 +00:00
zwelch
8a89899860 Simplify jtag_add_tlr:
- Use jtag_set_error instead of accessing jtag_error directly.
- Eliminate superfluous temporary variable.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2122 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:57:10 +00:00
zwelch
d3d0f662ef Simplify jtag_add_plain_dr_scan:
- Use jtag_set_error instead of accessing jtag_error directly.
- Wrap function arguments to fit everything in 80 columns.
- Move retval variable to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2121 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:56:49 +00:00
zwelch
1497e6699a Simplify jtag_add_dr_scan:
- Use jtag_set_error instead of accessing jtag_error directly.
- Wrap function arguments to fit everything in 80 columns.
- Move retval variable to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2120 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:56:36 +00:00
zwelch
e3b1937aaf Simplify jtag_add_plain_ir_scan:
- Use jtag_set_error instead of accessing jtag_error directly.
- Wrap function arguments to fit everything in 80 columns.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2119 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:56:25 +00:00
zwelch
9bdbe70ceb Simplify jtag_add_ir_scan_noverify:
- Use jtag_set_error instead of accessing jtag_error directly.
- Wrap and rename function arguments to fit everything in 80 columns.
- Move retval variable to location of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2118 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:56:18 +00:00
zwelch
4cff9dc0c1 Simplify jtag_execute_queue:
- Add static inline jtag_error_clear helper to return and clear jtag_error.
- Use new helper to shrink body of function to two lines.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2117 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:56:07 +00:00
zwelch
f418fcbff0 Simplify jtag_execute_queue_noclear:
- Replace jtag_error logic with equivalent call to jtag_set_error.
- Remove superfluous comment and temporary return variable.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2116 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:55:54 +00:00
zwelch
791701165c Cleanup handle_runtest_command:
- Make command argument require exactly one argument; do not allow extras.
- Remove superfluous whitespace at end of function.
- Wrap function arguments to fit in 80 columns.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2115 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:55:44 +00:00
zwelch
5c9221ce61 Clean up handle_jtag_reset_command:
- Make command require exactly two arguments; do not allow more than two.
- Move temporary variable declarations closer to point of first use.
- Remove superfluous braces around single statments.
- Wrap to 80 column width.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2114 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:55:36 +00:00
zwelch
c75ef1cd37 Extend handle_jtag_n{s,t}rst_delay_command routines:
- Add support to display the reset delays too, like the other commands.
- Always show the values, so users can see if they are being redundant.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2113 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:55:24 +00:00
zwelch
ae0ba6f355 Add accessors to retrieve values of jtag_n{s,t}rst_delay variables.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2112 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:55:13 +00:00
zwelch
d7c4e1ec93 Update JTAG reset delay command handlers:
- Fixes for error handling:
  - Return a syntax error instead of calling exit(-1).
  - Return error when more than one argument is provided too.
- Remove useless braces and indent after the if/return statements.
- Wrap function arguments to fit in 80 columns.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2111 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:54:52 +00:00
zwelch
47a1185d5d Cleanup the handle_jtag_khz_command routine:
- Separate retval assignments from logical tests.
- Simplify logical tests.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2110 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:54:41 +00:00
zwelch
620ecedf42 Simplify logic in handle_jtag_speed_command.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2109 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 10:54:06 +00:00
zwelch
1419a72892 Move minidummy source file, as was supposed to happen in last commit.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2103 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 01:14:04 +00:00
zwelch
f84c78a2e1 Finish off the dummy minidriver integration:
- Try to disambiguates minidriver options from "standard" driver options.
  - Make minidummy symbols more explict about being a minidriver.
  - Move minidummy.c into minidummy directory to put it with its header.

In configure.in:
- Improve configuration option to allow new minidriver implementations:
  - Change option from --enable-minidummy to --enable-minidriver-dummy.
  - Move it to the end of the list of options.
  - Provides a clear pattern for future minidrivers.
- Update handling of HAVE_JTAG_MINIDRIVER_H:
  - Check for external jtag_minidriver.h only with --enable-ecosboard.
  - Otherwise, define it when --enable-minidriver-dummy is provided.
- Add check to ensure only one minidriver is enabled.
- When a minidriver is enabled, warn user that standard drivers are not built.
- Use proper AC_DEFINE semantics with MINIDRIVER_DUMMY.

In src/jtag/Makefile.am:
- Restructure handling of minidummy source files.
- Include minidummy driver header in the distribution.

In src/jtag/jtag.c:
- Restructure preprocessor logic to include:
  - only one minidriver, or
  - all configured standard drivers.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2102 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-08 00:42:15 +00:00
oharboe
c28efd0a0e retire endstate command
git-svn-id: svn://svn.berlios.de/openocd/trunk@2095 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 19:10:51 +00:00
zwelch
b90d7d12f1 Set svn:eol-style properties on new minidummy driver files.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2094 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 18:39:11 +00:00
zwelch
3363851781 Fix regressions in previous series of cleanp, caused by r2092.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2093 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 18:38:13 +00:00
oharboe
14d6605cc9 minidriver build test driver "minidriver"
git-svn-id: svn://svn.berlios.de/openocd/trunk@2092 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 13:55:29 +00:00
zwelch
7dd8754575 Factoring of jtag_examine_chain for maintainability:
- Improve variable type: change device_count to unsigned.
- Improves jtag_tap_count_enabled() API too (now returns unsigned).


git-svn-id: svn://svn.berlios.de/openocd/trunk@2091 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:24:27 +00:00
zwelch
b550f70100 Factoring of jtag_examine_chain for maintainability:
- Limit scope: move tap and bit_count variables to point of first use.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2090 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:24:20 +00:00
zwelch
63c4848d11 Factoring of jtag_examine_chain for maintainability:
- Factor TAP ID matching into new helper function.
- Simplifies the main jtag_examine_chain loop logic considerably.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2089 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:24:12 +00:00
zwelch
f106382055 Factoring of jtag_examine_chain for maintainability:
- Minor whitespace and style cleanups in body of jtag_examine_chain.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2088 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:24:03 +00:00
zwelch
9eefd4d7e5 Factoring of jtag_examine_chain for maintainability:
- Add helper to check for the terminating ID during jtag_examine_chain.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2087 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:23:50 +00:00
zwelch
d8421f2766 Factoring of jtag_examine_chain for maintainability:
- Factor end-of-chain verfication into new helper routine.
- Change 'unexpected' local variable name to 'triggered' and type to bool.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2086 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:23:40 +00:00
zwelch
feb865f9ee Factoring of jtag_examine_chain for maintainability:
- Factor output of accepted/incorrect/expected TAP IDs into static helper.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2085 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:23:30 +00:00
zwelch
c318068839 Factoring of jtag_examine_chain for maintainability:
- Factor initial chain examination check into new static helper.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2084 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:23:13 +00:00
zwelch
90dbfcea7d Factoring of jtag_examine_chain for maintainability:
- Factor JTAG chain examination into static helper function.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2083 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:23:03 +00:00
zwelch
861f52ff16 Factoring of jtag_examine_chain for maintainability:
- Reduce indent: invert logical test of expected_id count.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2082 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:22:53 +00:00
zwelch
15ae1ac678 Factoring of jtag_examine_chain for maintainability:
- Reduce indent: invert logic test for unexpected TAP (no IDs).


git-svn-id: svn://svn.berlios.de/openocd/trunk@2081 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:22:42 +00:00
zwelch
32350a5006 Factoring of jtag_examine_chain for maintainability:
- Reduce indent: invert logic test for tap in jtag_examine_chain.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2080 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:22:34 +00:00
zwelch
401d6472cc Factoring of jtag_examine_chain for maintainability:
- Move definition of maximum JTAG chain size closer to its only uses.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2079 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:22:25 +00:00
zwelch
0b08845e3f Factoring of jtag_examine_chain for maintainability:
- Move JTAG EXTRACT macros out from the middle of jtag_examine_chain.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2078 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 05:22:09 +00:00
zwelch
43e1ed244f Clean up handle_endstate_command():
- Merge declaration of state with first use.
- Unindent and remove unnecessary 'else' block.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2077 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-07 03:48:21 +00:00
zwelch
0eb5c7509d Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NextEnabledTap' as 'jtag_tap_next_enabled.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2069 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:43:43 +00:00
zwelch
0d39db1109 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NumEnabledTaps' as 'jtag_tap_count_enabled.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2068 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:43:32 +00:00
zwelch
92cf94295e Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NumTotalTaps' as 'jtag_tap_count.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2067 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:43:23 +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
zwelch
473dc89c24 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByAbsPosition' as 'jtag_tap_by_abs_position.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2064 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:42:39 +00:00
zwelch
05eb8d8c13 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByPosition' as 'jtag_tap_by_position.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2063 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:42:32 +00:00
zwelch
dd89964ae0 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_AllTaps' as 'jtag_all_taps.'


git-svn-id: svn://svn.berlios.de/openocd/trunk@2062 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:42:25 +00:00
zwelch
eaf37cf9e8 Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_all_taps' as '__jtag_all_taps.'
- Frees original symbol name to rename the accessor function.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2061 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:42:17 +00:00
zwelch
499f30f693 Add accessors for jtag_verify; use them in jim command handler.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2060 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:06:34 +00:00
zwelch
99fd479503 Add accessors for reset delays; use them in jim command handlers.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2059 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:04:12 +00:00
zwelch
d530313866 Add accessors for speed_khz; use them in jim command handler.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2058 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-05 00:02:00 +00:00
zwelch
8580c70172 Add jtag_get_flush_queue_count accessor to help future factoring.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2057 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 23:52:58 +00:00
zwelch
a847326216 Clean up the JTAG TAP creation handler:
- Factor jtag_tap_init() helper out of the end of jim_newtap_cmd.
- Factor jtag_tap_free() helper out of the error case in jim_newtap_cmd.
- Invert test to improve indentation at the end of jim_newtap_cmd.
- Improve whitespace in the newly factored functions.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2056 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 23:49:52 +00:00
zwelch
d3d02f4789 Clean up the core JTAG TAP APIs:
- Move jtag_tap_name to same location as other TAP functions; export it.
- Factor new jtag_tap_add() from jim_newtap_cmd(); appends TAP to global list.
- Move static chain position counter to global; use in jtag_NumTotalTaps().
- Use jtag_AllTaps for reading tap list, instead of accessing global directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2055 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 23:26:58 +00:00
zwelch
82a5f6ff3e Change hasKHz to use bool type.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2054 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 22:43:34 +00:00
zwelch
c0f9fbcca5 Add missing static keywords in JTAG source file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2053 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 22:41:21 +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
310a9eabff tiny bit of encapsulation of global end state. No longer expose it as a global variable.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2048 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 13:05:57 +00:00
oharboe
9e8dce64fc do not modify global end state from jtag_add_xxx()
git-svn-id: svn://svn.berlios.de/openocd/trunk@2047 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 12:52:54 +00:00
oharboe
89e9d86a56 remove unused code.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2046 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 12:42:21 +00:00
oharboe
f86f2ab3f8 use assert() to catch TAP_INVALID passed to jtag_add_xxx() fn's.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2043 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 11:42:34 +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
oharboe
bb1a1ddb54 jtag_add_end_state() now returns the value of the global variable and does not modify the global variable if passed TAP_INVALID. This patch has no effect on the current code and is just to prepare upcoming patches.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2041 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 07:05:22 +00:00
oharboe
9ab49135c6 JTAG_TRST_ASSERTED event cleanup. More clear where and when it is invoked and some duplicate(harmless) invocations avoided.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2040 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 06:56:22 +00:00
zwelch
e7d6306b23 David Brownell <david-b@pacbell.net>:
Remove pernicious whitespace from ft2232 driver; as usual,
end-of-line noise, but here also much line-internal stuff.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2038 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 01:17:27 +00:00
zwelch
ec2bc2259c David Brownell <david-b@pacbell.net>:
Minor cleanup of FT2232:
  - make Olimex glue warn about Olimex issues instead of JTAGkey issues;
  - make some data static+const;
  - don't export some internal symbols.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2037 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 01:16:43 +00:00
zwelch
4123f08263 David Brownell <david-b@pacbell.net>:
Remove pernicious whitespace from src/jtag/*c files; mostly
the end-of-line flavor for now, although there's more.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2036 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04 00:56:41 +00:00
oharboe
976f13d27b use assert() for obscure check on illegal arguments upon trst being asserted while commands are queued
git-svn-id: svn://svn.berlios.de/openocd/trunk@2033 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 16:36:01 +00:00
oharboe
0c57bc8be2 remove unused code path.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2032 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 12:12:21 +00:00
oharboe
c68684c2e6 catchup with jtag refactoring.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2031 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 07:55:56 +00:00
zwelch
80d66c9fcb Move JTAG command handling implementation into its own source file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2030 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 07:06:37 +00:00
zwelch
a3e84343e2 Finish JTAG header file modularization; command factoring follows.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2029 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 06:29:09 +00:00
oharboe
4a6adee17e added missing extern to jtag_command_queue definition.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2028 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 06:27:57 +00:00
zwelch
4bc3af0374 Move JTAG command APIs into new jtag/commands.h header file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2027 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 06:08:07 +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
zwelch
36432c9ba6 Enable or add doxygen comments to the public JTAG API.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2019 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 01:51:04 +00:00
zwelch
41018ff44b Update documentationf or jtag_interface structure members.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2018 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 01:39:04 +00:00
zwelch
0d5da4bccb Remove vestigal tap_transition type from public jtag API.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2017 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 01:29:01 +00:00
zwelch
67caf323f7 Remove interface.h from public JTAG header, include it where required.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2016 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 01:26:01 +00:00
zwelch
c275cfd3da Expose tap_state_by_name TAP helper available in public API.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2015 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 01:23:48 +00:00
zwelch
4ecf2c7dd8 Move the JTAG cable interface API implementation
- Cloned the src/jtag/jtag.c file to src/jtag/interface.c.
- For each for of those files, deleted the contents of the other.
- Add new source file to automake input.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2012 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 00:45:21 +00:00
zwelch
f7d011a955 Add missed accessor for checking the current TMS table.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2011 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 00:33:22 +00:00
zwelch
f0b1b206cd Split and simplify handle_tms_sequence_command for further factoring.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2010 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 00:24:21 +00:00
zwelch
2c69be13ea Make tap_state_by_name available in new JTAG interface API header.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2009 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-03 00:17:42 +00:00
zwelch
def4ed3b2a Add private src/jtag/interface.h for use by JTAG interface drivers:
- Move the jtag_interface structure definition.
- Move the Cable API declarations.
- Add new header file to automake input.

The next patch will move the implementation to interface.c.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2008 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 23:59:13 +00:00
zwelch
84d88ef9d7 Finish removing '#ifdef HAVE_JTAG_MINIDRIVER_H' from jtag.h:
- Wraps JTAG callback API functions:
  - Outlines jtag_add_callback() and jtag_add_callback4().
  - Adds interface_ prefix to existing in-tree driver implementation.
  - Declare the driver interfaces routines in miniheader.h file.

This patch requires renaming the equivalent macros in out-of-tree
jtag_minidriver.h implementations.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2007 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 23:21:18 +00:00
zwelch
a546729609 Add header file for JTAG minidriver:
- Wraps all minidriver API functions using API front-ends:
  - Outlines jtag_add_dr_out() and jtag_alloc_in_value32().
  - Adds interface_ prefix to existing jtag_alloc_invalue_32 routines.
  - Re-inline these interface definitions in new header file.
- Re-inline parts of the (mini)driver implementations in minidriver.h.
- Replace INCLUDE_JTAG_MINIDRIVER_H with #include directives.

The next patch will finish removing '#ifdef HAVE_JTAG_MINIDRIVER_H'
from jtag.h.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2006 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 23:15:12 +00:00
ntfreak
88b5c6da2a - hack added to fix a issue with v5/6 jlink
v5/6 jlink seems to have an issue if the first tap move is not divisible by 8, so we send a TLR on first power up

git-svn-id: svn://svn.berlios.de/openocd/trunk@2004 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 16:07:31 +00:00
oharboe
339dc0bcd0 remove unecessary #ifdef as file is only built when minidriver is enabled.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2003 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 13:37:06 +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
34b6fc3ce4 Only include jtag_driver.c in the build when minidriver is not in use.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2000 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 08:29:03 +00:00
zwelch
1d230b88d2 Move interface_jtag_add_scan_check_alloc implementations to their
respective implementation files.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1999 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 08:04:21 +00:00
zwelch
6625e926fd Add high-speed device support in FT2232 driver:
- Initial support for FT2232H/FT4232H devices from FTDI.
- Add --enable-ftd2xx-highspeed option to configure script.
- Original patch submitted by Joern Kaipf <lists@joernline.de>.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1998 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 07:51:16 +00:00
oharboe
8dab0ecf23 Remove unused code, TAP_INVALID is never passed to drivers.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1997 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 07:21:44 +00:00
zwelch
a372074d21 Continue clean-up of JTAG driver interface:
- Move all interface_jtag_* functions to jtag_driver.c.
- Extern command queue routines in jtag.h (with INCLUDE_JTAG_INTERFACE_H).
- Add new source file to automake inputs.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1996 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 07:05:54 +00:00
zwelch
4a70eeffb0 More JTAG interface driver cleanup:
- Moves references to global jtag interface to default core implementation.
- Missed this reference in the earlier "pointless" patch.  Mea culpa.

Important: this has a side-effect.  Previously, the error return inside
the interface routine short-circuited the remainder of that function
when 'init' has not been called.  With this patch, the command queue
will be cleared in the case that 'init' has been called.  Since that
case indicates a buggy script, this does not seem to be a problem.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1995 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 06:49:53 +00:00
zwelch
c10d4d9a00 More JTAG interface driver cleanup:
- Add jtag_callback_queue_reset() to reset the callback queue.
- Make interface_jtag_execute_queue() use new helper function.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1994 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 06:33:19 +00:00
zwelch
e733ac36bf More JTAG interface driver cleanup:
- Make interface_jtag_execute_queue call new helper function.
- Add default_interface_jtag_execute_queue to wrap jtag interface access.

This patch may look useless on its own, but it helps to isolate the core
JTAG variables from the interface_jtag_* routines, so the later can be
moved into jtag_driver.c in a pending patch.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1993 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 06:21:49 +00:00
zwelch
6ef5a622af Clean up jtag command queue handling:
- Rename last_command_pointer as next_command_pointer, because this variable
  stores the address where jtag_queue_command() will store a command pointer.
- Make that variable static, since it is only used internally in jtag.c.
- Remove superfluous accessor for that now-static variable.
- Deobfuscate use of variables in jtag_command_queue.
- Add jtag_command_queue_reset helper function.
- Use it in interface_jtag_execute_queue.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1992 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 05:47:00 +00:00
zwelch
76bd16e9e3 Encapsulate JTAG command interfaces for moving to jtag_interface.h.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1991 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 04:55:05 +00:00
zwelch
d0a6db31a3 Remove the useless invalidstruct from jtag.h.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1990 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 04:31:49 +00:00
zwelch
deed7fb56c Start clean-up of JTAG driver interface:
- Factor jtag_add_scan_check to call new jtag_add_scan_check_alloc helper.
- Use conditional logic to define two versions of the helper.
- These helpers will be moved to other files in future patches.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1989 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-02 03:38:50 +00:00
zwelch
a8f3ba8f5f David Brownell <david-b@pacbell.net>:
Make the TCL "drscan" and "irscan" commands finish in RUN/IDLE
unless the user specifies otherwise ... usually they'd choose
something like DRPAUSE or IRPAUSE, avoiding RUN/IDLE.

The current "end" state is whatever the preceding commands left
in "cmd_queue_end_state", which to TCL scripts isn't knowable.
This change should forestall various surprises/bugs.

Also check that any "end" state specified is safe in case this
adapter's JTAG clock is free-running.  For now, just issue a
warning; eventually a hard failure is probably correct.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1988 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 23:30:58 +00:00
zwelch
5120d1263b David Brownell <david-b@pacbell.net>:
Whitespace fixes in jtag.c ... mostly end-of-line crap.
Flag "jtag_device" command as obsolete in its helptext.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 23:13:24 +00:00
zwelch
a88871bc6a Encapsulate JTAG Cable API and interface structure, plan for new header file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1984 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 23:01:24 +00:00
zwelch
35082f788b Encapsulate JTAG minidriver functions, plan for new header file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1983 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 22:54:42 +00:00
zwelch
41565073c5 Remove unused in_handler_t type definition from jtag.h
git-svn-id: svn://svn.berlios.de/openocd/trunk@1982 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 21:54:35 +00:00
oharboe
7662bbeaa5 added jtag_add_statemove() helper fn(actual fn written by Dick Hollonbeck, I just moved it).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1980 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-01 19:58:20 +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
79cec48ba2 Peter Denison <openwrt@marshadder.org>:
The debugging code in jlink_tap_execute() called when _DEBUG_USB_COMMS_ is 
defined was using the entire cached scan length to print the results 
buffers, and not the correct length of each individual buffer.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1955 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 01:07:43 +00:00
zwelch
335fee3f36 Encapsulate the global "jtag" jtag_interface pointer:
- Add jtag_interface_quit, factored from exit_handler() in openocd.c.
- Remove its extern declaration.
- Add static keyword to its definition.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1952 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 22:23:12 +00:00
zwelch
77015d5ae3 Remove unused jlink_execute_end_state (unreferenced after r1949).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1951 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 21:53:10 +00:00
oharboe
9557d8a9b1 remove unused JTAG_END_STATE part 2
git-svn-id: svn://svn.berlios.de/openocd/trunk@1950 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 11:55:14 +00:00
oharboe
7992eaf0fc remove unused JTAG_END_STATE
git-svn-id: svn://svn.berlios.de/openocd/trunk@1949 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 11:37:21 +00:00
zwelch
d00a5cfe97 David Brownell <david-b@pacbell.net>:
Make it so the magic "reset_config" keywords can be provided in any
order.  This eliminates needless error paths, and makes it easier
to define things at the right level (adapter, board, target).
It also includes two other behavioral changes:

  (1)	When "handle_reset_config" sees a parameter error, it
  	exits without changing anything.   This is best viewed
	as a bugfix.  (Old behavior:  restore defaults, even if
	they weren't previously active.)

  (2)	Only the behaviors that were explicitly specified get
  	changed.  (Old behavior:  everything else gets reset to
	the "default".)  So for example you can now specify SRST
	drive requirements without saying anything about the
	three unrelated topics you previously had to specify.

That second one might cause confusion for any configs that end
up calling "reset_config" twice, so it will deserve to be called
out in the release notes.  (There were no such configurations in
the current OpenOCD source tree.)

Update docs accordingly.  Note that at least some versions of
the texi-to-html tools can't handle "@xref{with spaces}", but
those work properly in PDF and in the info files.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1944 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-30 01:32:19 +00:00
zwelch
ebcde562d9 Remove error_handler_t type definition; it was unused in the tree.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1943 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-29 05:50:01 +00:00
zwelch
df60933321 SimonQian <simonqian@SimonQian.com>:
This patch allows the vsllink to support very large scan sizes in DMA mode.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1926 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 12:06:51 +00:00
ntfreak
ff2737b429 - add support for cortino jtag interface
git-svn-id: svn://svn.berlios.de/openocd/trunk@1925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 11:58:19 +00:00
zwelch
ad8f1b4295 David Brownell <david-b@pacbell.net>:
Doc (mostly) update for jtag_khz:
 - switch to @deffn syntax
 - add entry for "jtag_rclk"
 - move deprecated "jtag_speed" into collection of deprecated calls

And for ft2232, don't be the only adapter to *log* an error if RTCK
is requested; it's already reported properly, like any other nonfatal
command parameter.  "jtag_rclk" just works as expected, without any
scarey messages.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1910 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-24 21:13:29 +00:00
zwelch
ce55905fb7 Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
- Remove FTDI driver tap_set_state call; performed by jtag_add_reset.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1893 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-23 20:52:18 +00:00
zwelch
b6d87ad03d Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
- Add jtag_execute_queue in jtag_add_reset after interface_jtag_add_reset.
- Use tap_set_state to demark TAP_RESET, instead of cmd_queue_cur_state
  - cmd_queue_cur_state needs to be retired.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1892 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-23 20:50:06 +00:00
zwelch
b11a5b07c6 Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
Updates to the J-Link interface driver to support more device versions:
- Add capability detection:
  - if capable, detect protocol version; otherwise, assume v2 protocol.
  - if capable, detect buffer size; otherwise, assume minimal.
- Disable command result queries for devices using v2 protocol.
- Defined and use JTAG2 command with v2 protocol; JTAG3 is v3 protocol.
- Add TCL command to allow explicit setting of J-Link protocol version.

With approval, I revised the patch to make the following changes:
- add static keywords to new jlink-specific variables
- factor calculation of major_version to be more readable
- remove braces around simple one-line statements in if/else clauses
- remove (rather than #if 0) duplicate reset code; it is in SVN
- use &function to be clearer when passing function pointers
- add symbols for EMU_CMD_GET_CAPS bits; do not hard-code constants!
- almost renamed jlink_handle_jlink_hw_jtag_command  (seriously?!?!)
  - rewrote that function using a switch statement.
  - made version request processing easier to understand and modify
- improve alternate endpoint detection:
  - make code easier to read by using temporary variables
  - eliminate extra level of indentation and redundant logging
- use ternary conditional to select JTAG2 or JTAG3 command
- reverse version test in jlink_usb_message to reduce indentation
  - this had the biggest effect in cleaning up this patch
- use C99's ability to declare new/changed variables with less scope
- add spaces around binary operators in new/changed code
- revert other superfluous whitespace/comment style changes


git-svn-id: svn://svn.berlios.de/openocd/trunk@1889 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-23 03:42:13 +00:00
kc8apf
0ce234491a Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_ir_scan() [2/2] (version without goto):
    	- change 'found' to bool
    	- add comments on loops



git-svn-id: svn://svn.berlios.de/openocd/trunk@1876 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 17:20:05 +00:00
kc8apf
988d6a49a9 Author: Thomas Kindler <mail@t-kindler.de>
- Increase DTC status retry count to avoid problems with STM Primer


git-svn-id: svn://svn.berlios.de/openocd/trunk@1871 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 05:33:36 +00:00
kc8apf
869ef01f3c Author: Holger Schurig <hs4233@mail.mn-solutions.de>
-Prevent freezing of target when doing a 'shutdown'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1869 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 05:07:06 +00:00
kc8apf
788cad7244 Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_ir_scan() [1/2]:
    	- remove temporary scan_size and use tap->ir_length instead
    	- slight loop restructuring to reduce indentation level




git-svn-id: svn://svn.berlios.de/openocd/trunk@1868 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:54:38 +00:00
kc8apf
73e31653fc Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_dr_out():
        - use pointer 'field' instead of scan->fields[field_count]
        - restructure the main loop to clearly separate the two cases: TAP is not bypassed / TAP is bypassed
          (this is to keep the function similar to interface_jtag_add_dr_scan())
        - fix bug where only the first output field has its tap field set
        - add asserts to verify that target_tap points to the one not bypassed TAP



git-svn-id: svn://svn.berlios.de/openocd/trunk@1867 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:53:07 +00:00
kc8apf
e007342669 Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_dr_scan():
            - use pointer 'field' instead of scan->fields[field_count]
            - restructure the main loop to clearly separate the two cases: TAP is not bypassed / TAP is bypassed
            - add an assert that each non-bypassed TAP receives at least one field
            - add an assert that checks that no superfluous input fields were passed



git-svn-id: svn://svn.berlios.de/openocd/trunk@1866 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:50:00 +00:00
kc8apf
7e3fd48b6a Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_ir_scan():
        - use pointer 'field' instead of scan->fields[nth_tap]
        - add assertion to ensure that input data has correct size for TAP's IR



git-svn-id: svn://svn.berlios.de/openocd/trunk@1865 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:48:15 +00:00
kc8apf
d7dccfbf82 Author: Michael Bruck <mbruck@digenius.de>
- jtag.c: consolidate output scan field initialization in scan functions
    - jtag.c: add cmd_queue_scan_field_clone() to handle 1:1 field copies
    - jtag.c: fix bug where only the first output field in a dr scan has its tap field set



git-svn-id: svn://svn.berlios.de/openocd/trunk@1864 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:45:57 +00:00
kc8apf
2783a940e2 Author: Michael Bruck <mbruck@digenius.de>
- jtag.c: remove unused variable 'nth_tap' from DR scan functions



git-svn-id: svn://svn.berlios.de/openocd/trunk@1863 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:43:48 +00:00
kc8apf
8cb3e95b39 Author: Michael Bruck <mbruck@digenius.de>
- jtag.c: Use single 'for' statement to iterate over list of TAPs in scan functions



git-svn-id: svn://svn.berlios.de/openocd/trunk@1862 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:43:01 +00:00
kc8apf
3bc0997e28 Author: Michael Bruck <mbruck@digenius.de>
- jtag.c: consolidate all memory allocations in scan functions in one block, add out_fields pointer to set stage for further changes



git-svn-id: svn://svn.berlios.de/openocd/trunk@1861 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:41:50 +00:00
kc8apf
f96077ec8d Author: Michael Bruck <mbruck@digenius.de>
- add 'const' qualifier to function parameters in jtag.c that are not to be modified or freed by the function



git-svn-id: svn://svn.berlios.de/openocd/trunk@1860 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:39:41 +00:00
kc8apf
d14b6ca015 Author: Michael Bruck <mbruck@digenius.de>
- add doxygen comments to scan commands in jtag.c
    - move jtag_add_dr_scan next to interface_jtag_add_dr_scan to keep these function pairs together




git-svn-id: svn://svn.berlios.de/openocd/trunk@1859 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-21 04:37:31 +00:00
oharboe
64faff8f9c Spencer Oliver <spen@spen-soft.co.uk> use 7 tms out of reset
git-svn-id: svn://svn.berlios.de/openocd/trunk@1851 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 06:18:40 +00:00
kc8apf
b7b0452517 Author: Michael Bruck <mbruck@digenius.de>
- simplify code in interface_jtag_add_plain_dr_scan() by adding a local variable 'scan' to hold the scan_command_t



git-svn-id: svn://svn.berlios.de/openocd/trunk@1849 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:55:01 +00:00
kc8apf
1ed16c57bc Author: Michael Bruck <mbruck@digenius.de>
- move scan_size in interface_jtag_add_dr_out() into the scope of the inner loop and change it to unsigned
    - move loop variable j into for scope



git-svn-id: svn://svn.berlios.de/openocd/trunk@1848 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:54:15 +00:00
kc8apf
955d6af47a Author: Michael Bruck <mbruck@digenius.de>
- simplify code in interface_jtag_add_dr_out() by adding a local variable 'scan' to hold the scan_command_t



git-svn-id: svn://svn.berlios.de/openocd/trunk@1847 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:53:34 +00:00
kc8apf
645bde6e57 Author: Michael Bruck <mbruck@digenius.de>
- move scan_size in interface_jtag_add_dr_scan() into the scope of the inner loop and change it to unsigned



git-svn-id: svn://svn.berlios.de/openocd/trunk@1846 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:53:00 +00:00
kc8apf
fe54d5f5e6 Author: Michael Bruck <mbruck@digenius.de>
- simplify code in interface_jtag_add_dr_scan() by adding a local variable 'scan' to hold the scan_command_t



git-svn-id: svn://svn.berlios.de/openocd/trunk@1845 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:52:26 +00:00
kc8apf
044e3a4904 Author: Michael Bruck <mbruck@digenius.de>
- simplify code in interface_jtag_add_plain_ir_scan() by adding a local variable 'scan' to hold the scan_command_t



git-svn-id: svn://svn.berlios.de/openocd/trunk@1844 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:51:46 +00:00
kc8apf
c1b397e48c Author: Michael Bruck <mbruck@digenius.de>
- move scan_size in interface_jtag_add_ir_scan() into the scope of the inner loop and change it to unsigned



git-svn-id: svn://svn.berlios.de/openocd/trunk@1843 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:51:08 +00:00
kc8apf
8632901e7d Author: Michael Bruck <mbruck@digenius.de>
- simplify code in interface_jtag_add_ir_scan() by adding a local variable 'scan' to hold the scan_command_t




git-svn-id: svn://svn.berlios.de/openocd/trunk@1842 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:49:53 +00:00
kc8apf
98e3541333 Author: Michael Bruck <mbruck@digenius.de>
- rename local variable x to num_taps in interface_jtag_add_ir_scan



git-svn-id: svn://svn.berlios.de/openocd/trunk@1841 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:48:11 +00:00
kc8apf
5c9c7af198 Author: Michael Bruck <mbruck@digenius.de>
- rename input parameters 'num_fields' and 'fields' to 'in_num_fields' and 'in_fields' in all jtag.c interface functions



git-svn-id: svn://svn.berlios.de/openocd/trunk@1840 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-20 04:47:20 +00:00
oharboe
4147156707 added tms_sequence command to allow switching between old/new tms sequence
git-svn-id: svn://svn.berlios.de/openocd/trunk@1834 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-19 06:59:20 +00:00
oharboe
7ad67c8b34 use tap_get_tms_path_len() instead of fix # of 7. Not tested if this builds, but at least we're looking at a build error instead of a runtime error.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1833 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 20:25:19 +00:00
oharboe
5b9c07e918 use tap_get_tms_path_len() instead of fix # of 7.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1831 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 20:21:53 +00:00
kc8apf
378c29bfe5 Enable non-7-cycle state table for FT2232 and JLink
git-svn-id: svn://svn.berlios.de/openocd/trunk@1827 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:43:26 +00:00
kc8apf
10923655d6 JLink support for non-7-cycle state moves by Dick Hollenbeck <dick@softplc.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1826 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:42:36 +00:00
kc8apf
9a990a3591 FT2232 support for non-7-cycle state moves by Dick Hollenbeck <dick@softplc.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1825 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:41:27 +00:00
kc8apf
a8b104aa74 Fix fallout from r1818
git-svn-id: svn://svn.berlios.de/openocd/trunk@1824 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:40:42 +00:00
kc8apf
15f2c37207 Change last_comand_pointer to last_command_pointer by Michael Bruck <mbruck@digenius.de>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1823 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:29:59 +00:00
kc8apf
f9d861d357 Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de> [7/8]
git-svn-id: svn://svn.berlios.de/openocd/trunk@1821 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:29:01 +00:00
kc8apf
48838d5193 Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de> [6/8]
git-svn-id: svn://svn.berlios.de/openocd/trunk@1820 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:28:42 +00:00
kc8apf
89fd953cc8 Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de> [5/8]
git-svn-id: svn://svn.berlios.de/openocd/trunk@1819 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:28:21 +00:00
kc8apf
7ea76ffdbc Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de> [4/8]
git-svn-id: svn://svn.berlios.de/openocd/trunk@1818 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:28:00 +00:00
kc8apf
0e98ab34b3 Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de> [3/8]
git-svn-id: svn://svn.berlios.de/openocd/trunk@1817 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:27:46 +00:00
kc8apf
373cbc01d0 Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de> [2/8]
git-svn-id: svn://svn.berlios.de/openocd/trunk@1816 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:27:30 +00:00
kc8apf
39e9278ffc Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1815 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:27:00 +00:00
kc8apf
9b4295b059 ftdi_set_interface correctness by Strontium <strntydog@gmail.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1814 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:23:52 +00:00
kc8apf
4925bdd4d9 JTAG state table updates (short table still disabled). Provided by Dick Hollenbeck <dick@softplc.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1812 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-18 17:06:36 +00:00
oharboe
231a71b7fb Michael Bruck <mbruck@digenius.de> change 'ir_scan' from 'int' to 'bool' to document its semantics
git-svn-id: svn://svn.berlios.de/openocd/trunk@1800 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-16 20:09:07 +00:00
oharboe
651cb917e7 fix broken ir/drscan -endstate option. The statemachine now actually ends up in said state.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1784 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-14 18:45:19 +00:00
oharboe
ba66ccea35 zy1000 1.52 snapshot
git-svn-id: svn://svn.berlios.de/openocd/trunk@1777 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 18:58:55 +00:00
oharboe
709fd9d6b4 added verify_jtag command
git-svn-id: svn://svn.berlios.de/openocd/trunk@1774 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 10:21:50 +00:00
oharboe
c860600c6a shuffled comments about for jtag_add_dr_out() fn.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1772 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 09:53:23 +00:00
oharboe
23a0704451 irscan now also works correctly in addition to not crashing :-)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1770 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 19:31:50 +00:00
oharboe
0ecb96cc1b move eCos type definition to types.h where it belongs.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1766 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 12:16:31 +00:00
zwelch
46d13ccc3b Add stdint.h to types.h to provide intptr_t.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1765 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 10:52:01 +00:00
oharboe
75f89c5cb6 eCos fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1763 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 10:02:47 +00:00
zwelch
591a23ec8d Include config.h in pregenerated rlink_speed_table.c source.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1755 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 07:13:12 +00:00
oharboe
71d76b0a74 added jtag_alloc_in_value32 - not used in this commit.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1752 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 06:59:21 +00:00
oharboe
9bbd933eae fix ancient bug & SEGFAULT in irscan
git-svn-id: svn://svn.berlios.de/openocd/trunk@1751 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 06:17:22 +00:00
zwelch
30a17f0bb4 Include assert.h in system.h to promote tree-wide use of assertions.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1750 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-12 04:52:15 +00:00
oharboe
3e58929e62 now builds on 64 and 32 bit systems
git-svn-id: svn://svn.berlios.de/openocd/trunk@1748 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 21:05:51 +00:00
oharboe
e170938ae8 fix USB performance regression for verify_ircapture
git-svn-id: svn://svn.berlios.de/openocd/trunk@1743 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 10:10:11 +00:00
oharboe
fac70d7292 retire jtag_add_dr_scan_now
git-svn-id: svn://svn.berlios.de/openocd/trunk@1741 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 09:36:55 +00:00
oharboe
8c77f7c69c change jtag_add_callback API to be able to support check_value/mask
git-svn-id: svn://svn.berlios.de/openocd/trunk@1735 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 08:39:49 +00:00
zwelch
265b0a9fca Fix ft2232 for CygWin, provided by Michael Bruck <mbruck@digenius.de>.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1734 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 08:26:42 +00:00
zwelch
004c7124c4 Audit and eliminate redundant #include directives from src/jtag.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1707 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 04:04:58 +00:00
zwelch
490e271290 Remove redundant sys/types.h #include directives (now in types.h).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1700 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 02:27:16 +00:00
zwelch
647e61cc6d Extend autotools build to create shared library libopenocd with libtool:
- Add libtoolize step too bootstrap script; creates ltmain.sh script.
- Add AC_PROG_LIBTOOL to configure.in to add libtool support to build.
- Change Makefile.am library rules from static (_a) to libtool (_la).
- Install libopenocd.{la,so,a} in $(libdir); update openocd link rules.
- Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1695 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 22:03:57 +00:00
oharboe
26526a80ea Wrote up post processing JTAG API. Not used yet, but reference implementation will be used in subsequent explanations of new scheme + patches to use it.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1692 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 19:48:09 +00:00
oharboe
96509c764a plugged bug w/irlen > 32 introduce in 1672
git-svn-id: svn://svn.berlios.de/openocd/trunk@1683 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 20:48:28 +00:00
oharboe
060f61ef24 sync up zy1000 interface to bitbang driver's handling of exiting the shift state
git-svn-id: svn://svn.berlios.de/openocd/trunk@1679 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 19:24:40 +00:00
oharboe
5ff0317aa3 fix gaffe in 1672
git-svn-id: svn://svn.berlios.de/openocd/trunk@1677 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 18:12:43 +00:00
oharboe
49e286509b add flush_count jtag queue profiling feature
git-svn-id: svn://svn.berlios.de/openocd/trunk@1674 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 11:46:01 +00:00
oharboe
8a58fb9402 fix (old?) bug in jtag_add_ir_scan()
git-svn-id: svn://svn.berlios.de/openocd/trunk@1673 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 11:18:41 +00:00
oharboe
57bc9f37c9 in_handler in_check_mask and in_check_value now removed from field. Last big patch in the series of JTAG API cleanup.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1672 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 09:48:00 +00:00