summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
...
* David Brownell <david-b@pacbell.net>:zwelch2009-06-163-7/+11
| | | | | | | | | | | | Doc update: say "jtag newtap ... -disable" records the state after exiting the RESET state, matching the only implementation we're working with so far (TI ICEpick-C). Matching code updates. Now we can be sure that the "enabled" flag value is correct after JTAG resets. git-svn-id: svn://svn.berlios.de/openocd/trunk@2246 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-162-6/+14
| | | | | | | | | | | | | | | | | Fix a memory leak in jtag_tap_free(): unregister the event callback too. Also fix the associated conceptual bug in unregistering JTAG event callbacks: since the same callback procedure is used many times with different callback data (a TAP handle), that data must be considered when unregistering any callback. This could fix some crashes after TAP registration errors, by making sure the reset event handler doesn't scribble over memory that's now used by something else. git-svn-id: svn://svn.berlios.de/openocd/trunk@2245 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-163-16/+17
| | | | | | | | | | | | Minor jtag cleanup: - remove hidden assumption about JTAG event numbering - move function declarations to a header - some end'o'line whitespace - use "calloc" not "malloc + memset" git-svn-id: svn://svn.berlios.de/openocd/trunk@2244 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-121-0/+6
| | | | | | | | | | | | | Currently the "debug_level 3" command tracing ignores commands that could return values to TCL scripts (by plugging in to a slightly lower level of the interpreter stack). Fix that by abstracting the tracing command and starting to make some of those previously-untraced commands use this new mechanism. git-svn-id: svn://svn.berlios.de/openocd/trunk@2224 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-122-6/+22
| | | | | | | | | | | | | | | | | | | | | | | Partial fix to the "long IR length" problems. - Current code could handle up to 32 bit IR lengths with full functionality, if it didn't just reject may of them out of hand. So only reject clear errors, where the IR mask (or capture instruction) needs more than IrLen bits. - Longer IR lengths can only be handled in BYPASS mode for now. Example: TI's DSPs use 38-bit IR lengths. So we can't issue their IDCODE instructions... A more complete fix would be able to issue longer instructions; or minimally, would fail cleanly for the non-BYPASS case. Note that this *could* make some currently broken scripts fail, since the previous code accepted garbage values so long as they didn't use more than 16 bits. git-svn-id: svn://svn.berlios.de/openocd/trunk@2222 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix unitialized use of cur_speed in handle_jtag_khz_command:zwelch2009-06-121-1/+1
| | | | | | | - Use the default KHz speed setting, in case interface is not initialized. git-svn-id: svn://svn.berlios.de/openocd/trunk@2218 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve vsllink command argument handling:zwelch2009-06-121-14/+11
| | | | | | | | - Bug fix: Always clear high bit of USB bulk out endpoint. - Use parse_ulong helpers to ensure numeric strings are parsed properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2217 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_runtest_command:zwelch2009-06-121-1/+6
| | | | | | | - Use parse_uint helper to ensure argument is parsed properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2216 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* 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