summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup jtag_tap_by_abs_position:zwelch2009-06-091-9/+4
| | | | | | | | | - Remove unused orig_n local variable. - Merge variable declaration with first use. - Update code to use current style guidelines. git-svn-id: svn://svn.berlios.de/openocd/trunk@2143 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify jtag_tap_by_jim_object:zwelch2009-06-091-13/+6
| | | | | | | | - Merge declarations of temporary variables with first use. - Restructure logic to simplify conditional logic. git-svn-id: svn://svn.berlios.de/openocd/trunk@2142 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and fix bug in jtag_tap_by_string:zwelch2009-06-091-22/+15
| | | | | | | | | | - Bug fix: Use unsigned type and strtoul when parsing for position number. - Simplify logic by returning directly when a tap is found by name. - Reduce scope: declare temporary variables with first use. - Bring code up to current style guidelines. git-svn-id: svn://svn.berlios.de/openocd/trunk@2141 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Allow jtag_tap_add to be called from other JTAG code modules.zwelch2009-06-091-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2140 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Cleanup jtag_tap_count_enabled.zwelch2009-06-091-8/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2139 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Change jtag_add_pathmove to set jtag_error rather than call exit():zwelch2009-06-092-3/+14
| | | | | | | | - 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
* Reduce scope or eliminate temporary variables in jtag_add_statemove:zwelch2009-06-091-18/+8
| | | | | | | | | | - 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
* Move documentation in jtag_add_statemove body to Doxygen block.zwelch2009-06-091-27/+23
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2136 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* update zy1000 to latest minidriver workoharboe2009-06-083-1/+212
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2132 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factor interface list to its own command:zwelch2009-06-081-3/+21
| | | | | | | | | - 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
* Cleanup and simplify handle_interface_command:zwelch2009-06-081-38/+23
| | | | | | | | | | | - 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
* Simplify jtag_add_sleep:zwelch2009-06-081-5/+3
| | | | | | | | | - 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
* Simplify jtag_add_reset:zwelch2009-06-081-6/+5
| | | | | | | | - 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
* Simplify jtag_add_clocks:zwelch2009-06-081-12/+7
| | | | | | | | - 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
* Simplify jtag_add_runtest:zwelch2009-06-081-7/+1
| | | | | | | | - 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
* Simplify jtag_add_pathmove:zwelch2009-06-081-7/+4
| | | | | | | | | | - 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
* Simplify jtag_add_tlr:zwelch2009-06-081-6/+1
| | | | | | | | - 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
* Simplify jtag_add_plain_dr_scan:zwelch2009-06-081-12/+8
| | | | | | | | | - 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
* Simplify jtag_add_dr_scan:zwelch2009-06-081-13/+9
| | | | | | | | | - 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
* Simplify jtag_add_plain_ir_scan:zwelch2009-06-081-6/+5
| | | | | | | | - 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
* Simplify jtag_add_ir_scan_noverify:zwelch2009-06-081-6/+4
| | | | | | | | | - 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
* Simplify jtag_execute_queue:zwelch2009-06-082-5/+11
| | | | | | | | - 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
* Simplify jtag_execute_queue_noclear:zwelch2009-06-081-10/+1
| | | | | | | | - 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
* Cleanup handle_runtest_command:zwelch2009-06-081-5/+3
| | | | | | | | | - 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
* Clean up handle_jtag_reset_command:zwelch2009-06-081-11/+5
| | | | | | | | | | - 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
* Extend handle_jtag_n{s,t}rst_delay_command routines:zwelch2009-06-081-10/+8
| | | | | | | | - 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
* Add accessors to retrieve values of jtag_n{s,t}rst_delay variables.zwelch2009-06-082-2/+14
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2112 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Update JTAG reset delay command handlers:zwelch2009-06-081-18/+12
| | | | | | | | | | | - 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
* Cleanup the handle_jtag_khz_command routine:zwelch2009-06-081-17/+15
| | | | | | | | - Separate retval assignments from logical tests. - Simplify logical tests. git-svn-id: svn://svn.berlios.de/openocd/trunk@2110 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify logic in handle_jtag_speed_command.zwelch2009-06-081-9/+4
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2109 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move minidummy source file, as was supposed to happen in last commit.zwelch2009-06-082-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2103 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Finish off the dummy minidriver integration:zwelch2009-06-082-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* retire endstate commandoharboe2009-06-071-23/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2095 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Set svn:eol-style properties on new minidummy driver files.zwelch2009-06-072-233/+233
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2094 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix regressions in previous series of cleanp, caused by r2092.zwelch2009-06-071-18/+18
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2093 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* minidriver build test driver "minidriver"oharboe2009-06-074-19/+264
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2092 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-072-4/+4
| | | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-4/+2
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-35/+43
| | | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-11/+15
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-2/+7
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-24/+28
| | | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-25/+20
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-14/+23
| | | | | | | - Factor initial chain examination check into new static helper. git-svn-id: svn://svn.berlios.de/openocd/trunk@2084 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-17/+18
| | | | | | | - Factor JTAG chain examination into static helper function. git-svn-id: svn://svn.berlios.de/openocd/trunk@2083 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-22/+21
| | | | | | | - Reduce indent: invert logical test of expected_id count. git-svn-id: svn://svn.berlios.de/openocd/trunk@2082 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-31/+35
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-36/+36
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-4/+3
| | | | | | | - 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
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-3/+4
| | | | | | | - 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