summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve VID/PID command argument handling in FTDI driver:zwelch2009-06-121-7/+13
| | | | | | | | | | - Bug fix: Return a syntax error when less than two arguments are given. - Bug fix: Use parse_u16 helper to ensure vales are parsed properly. - Simplify loop termination logic by ensuring argc is always even. - Move loop induction variable declaration to where it is used. git-svn-id: svn://svn.berlios.de/openocd/trunk@2215 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_irscan_command:zwelch2009-06-121-5/+16
| | | | | | | | - Use parse_u32 helper to ensure scan values are parsed properly. - Clear the fields buffer to ensure partial cleanup occur correctly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2214 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve JTAG reset, speed, and khz handlers to use parse_uint helper.zwelch2009-06-121-5/+23
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2213 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Use parse_uint helper to replace strtoul call in jtag_tap_by_string.zwelch2009-06-121-3/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2212 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and improve gw16012_handle_parport_command:zwelch2009-06-121-5/+16
| | | | | | | | | - Show the port number to the user when asking for it or setting it. - Print an error if the parport_port has already been set. - Use parse_u16 helper to ensure the parport_port string parses correctly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2211 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and improve amt_jtagaccel_handle_parport_port_command:zwelch2009-06-121-6/+18
| | | | | | | | | - Show the port number to the user when asking for it or setting it. - Print an error if the amt_jtagaccel_port has already been set. - Use parse_u16 helper to ensure amt_jtagaccel_port string parses correctly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2210 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and improve parport_handle_parport_port_command:zwelch2009-06-121-5/+16
| | | | | | | | | - Show the port number to the user when asking for it or setting it. - Print an error if the parport_port has already been set. - Use parse_u16 helper to ensure the parport_port string parses correctly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2209 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move jtag_get_flush_queue_count near jtag_execute_queue (fix its docs).zwelch2009-06-111-4/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2189 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve grouping of JTAG KHz and verification accessors in header file.zwelch2009-06-111-10/+17
| | | | | | | Add some quick Doxygen comments for these routines. git-svn-id: svn://svn.berlios.de/openocd/trunk@2188 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Group JTAG reset configuration and accessor APIs together in header file.zwelch2009-06-111-16/+13
| | | | | | | Remove unused reset_line_mode enumerated type. git-svn-id: svn://svn.berlios.de/openocd/trunk@2187 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move jtag_error helper declarations to the end of the header.zwelch2009-06-111-15/+15
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2186 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Out-of-line jtag_tap_next_enabled and simplify its logic.zwelch2009-06-112-27/+13
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2185 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move jtag_add_statemove decl/body nearer jtag_add_pathmove.zwelch2009-06-112-77/+77
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2184 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* added pathmove commandoharboe2009-06-101-0/+44
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve use of automake conditionals for FTDI-based JTAG drivers:zwelch2009-06-091-10/+2
| | | | | | | | | - Remove once-used XXX_FTD2XX symbols; replace with XXX_DRIVER symbols. - Enabled when either libftdi or FTD2xx driver should be built. - Eliminates redundant DRIVERSFILE assignment in JTAG automake input. git-svn-id: svn://svn.berlios.de/openocd/trunk@2177 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify JTAG automake input file:zwelch2009-06-091-98/+40
| | | | | | | | | | | - Consolidate all individual driver variables into DRIVERFILES. - Eliminates all empty 'else' conditional clauses. - Move minidriver files to top of file. - Use MINIDRIVER conditional to build only driver(s) that will be linked. - Eliminate superfluous whitespace. git-svn-id: svn://svn.berlios.de/openocd/trunk@2176 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Rename jtag_driver.c as driver.c to remove duplicate name component.zwelch2009-06-092-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2175 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix make maintainer-clean for out-of-tree builds.zwelch2009-06-091-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2172 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate the core jtag interface pointer:zwelch2009-06-093-26/+44
| | | | | | | | | - Add new jtag_config_khz to increase encapsulation of jtag->khz call. - Add new jtag_get_speed_readable to encapsulate of jtag->speed_div call. - Make definition of jtag static in core.c, remove extern from tcl.c. git-svn-id: svn://svn.berlios.de/openocd/trunk@2171 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Continue encapsulation of JTAG event callback sub-API:zwelch2009-06-092-9/+12
| | | | | | | | - Move jtag_event_callbacks struct to core.c; it's an implementation detail. - Move jtag_*_event_callbacks next to the definition of the new function type. git-svn-id: svn://svn.berlios.de/openocd/trunk@2169 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add jtag_event_handler_t:zwelch2009-06-092-5/+18
| | | | | | | | - Define the function signature used by the JTAG event callback mechanism. - Provide Doxygen block for new type, including TODO for its return value. git-svn-id: svn://svn.berlios.de/openocd/trunk@2168 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Expose jtag_unregister_event_callback with related API declarations.zwelch2009-06-091-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2167 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve encapsulation of JTAG event handling:zwelch2009-06-093-41/+38
| | | | | | | | - Move nvp_jtag_tap_event and jtag_tap_handle_event to tcl.c. - Change both to be static; remove declaration of function from jtag.h. git-svn-id: svn://svn.berlios.de/openocd/trunk@2166 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Properly encapsulate core hasKHZ variable.zwelch2009-06-092-8/+4
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2165 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Cleanup and encapsulate IR Capture verification:zwelch2009-06-093-15/+21
| | | | | | | | | - Add accessors for setting the jtag_verify_capture_ir flag. - Use them in handle_verify_ircapture_cpmmand - Change variable type to bool; make it static. git-svn-id: svn://svn.berlios.de/openocd/trunk@2164 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add missing static keywords to a few variables in JTAG core module.zwelch2009-06-091-5/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2163 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move the jtag_error helper routines out of header file:zwelch2009-06-092-29/+37
| | | | | | | | - Makes jtag_error static, add new get helper function for completeness. - Improve and add documentation and style for these helpers. git-svn-id: svn://svn.berlios.de/openocd/trunk@2162 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate jtag_reset_config using accessors:zwelch2009-06-0910-8/+30
| | | | | | | | - 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
* Remove superfluous extern for non-existant global variable.zwelch2009-06-091-2/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2160 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add get and set accessors for jtag_speed:zwelch2009-06-0911-18/+39
| | | | | | | | - Setter calls the interface driver callback to improve core encapsulation. - Use getter in standard JTAG interface drivers and ZY1000 minidriver. git-svn-id: svn://svn.berlios.de/openocd/trunk@2159 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate the jtag_event_callback list; add helper functions if needed.zwelch2009-06-092-3/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2158 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate the jtag_trst and jtag_srst variables:zwelch2009-06-092-4/+15
| | | | | | | | - 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
* Move extern of nvp_jtag_tap_event from jtag.h to tcl.c.zwelch2009-06-092-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2156 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove superfluous extern of jtag_event_strings from jtag.h.zwelch2009-06-091-2/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2155 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Replace 'jtag.c' with 'core.c' in code comments.zwelch2009-06-091-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2152 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove accidental duplicate of hasKHz; fixes pre-init speed setup.zwelch2009-06-092-3/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2151 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Split main jtag.c file into two layers:zwelch2009-06-093-1221/+1279
| | | | | | | | | | | | | - src/jtag/core.c: contains the low-level JTAG TAP and scanning routines. - src/jtag/tcl.c: contains high-level JTAG TCL commands that use the core. - Remove static keywords from routines in core.c, extern from tcl.c: - jtag, jtag_interface global variables - jtag_{examine,validate}_chain and jtag_tap_{init,free} functions - Added myself to the copyright header in both of these files. - Used 'svn cp' to add files, so versioning was preserved for both. git-svn-id: svn://svn.berlios.de/openocd/trunk@2149 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Merge documentation for jtag_add_statemove from source into header block.zwelch2009-06-092-32/+25
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2148 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move Doxygen documentation for IR/DR scan routines to header file.zwelch2009-06-092-27/+28
| | | | | | | - Move plain IR scan declaration closer to the other IR scan declarations. git-svn-id: svn://svn.berlios.de/openocd/trunk@2147 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Replace 'jtag_tap_by_abs_position' with 'jtag_tap_by_position'.zwelch2009-06-092-3/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2146 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove non-existant jtag_tap_by_position API declaration.zwelch2009-06-091-1/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2145 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Use unsigned type for jtag_tap_count and jtag_tap_by_abs_position.zwelch2009-06-092-5/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2144 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* 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