summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.h
Commit message (Collapse)AuthorAgeFilesLines
* Jonas Horberg [jhorberg@sauer-danfoss.com]ntfreak2009-08-181-3/+6
| | | | | | Change jtag_rclk behaviour so it can be called before the interface init function git-svn-id: svn://svn.berlios.de/openocd/trunk@2590 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixesoharboe2009-07-171-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix doxygen warning in jtag.h caused by a changed parameter name.zwelch2009-06-301-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2424 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-291-1/+0
| | | | | | | | | | | | | | | | | | | Warn when people (or scripts) use numeric identifiers for TAPs, instead of dotted.name values. We want this usage to go away, so that for example adding more TAPs doesn't cause config scripts to break because some sequence number changed. It's been deprecated since late 2008, but putting a warning on this should help us remove it (say, in June 2010) by helping to phase out old (ab)usage in config scripts. Other than in various config files, the only code expecting such a number was the almost unused str9xpec driver. This code was changed to use the TAP it was passed, instead of making its own dubious lookup and ignoring that TAP. git-svn-id: svn://svn.berlios.de/openocd/trunk@2415 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '+' whitespacezwelch2009-06-231-1/+1
| | | | | | | | | | - Replace ')\(+\)(' with ') \1 ('. - Replace ')\(+\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(+\)(' with '\1 \2 ('. - Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '!=' whitespacezwelch2009-06-231-1/+1
| | | | | | | | | - Replace ')\(!=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(!=\)(' with '\1 \2 ('. - Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix jtag_add_callback() args. The first argument is nothing special, it's ↵oharboe2009-06-191-9/+9
| | | | | | just another generic argument. git-svn-id: svn://svn.berlios.de/openocd/trunk@2290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Finish transforming 'u32' to 'uint32_t'.zwelch2009-06-181-7/+7
| | | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. - Replace '^u32' with 'uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t'zwelch2009-06-181-14/+14
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* dummy driver now works under eCosoharboe2009-06-171-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2268 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-161-7/+6
| | | | | | | | | | | | | | | | | | | | | | | Extend the internal JTAG event handlers to cover enable/disable, and use those events to make sure that targets get "examined" if they were disabled when the scan chain was first set up: - Remove "enum jtag_tap_event", merge with "enum jtag_event", so C code can now listen for TAP enable/disable events. - Report those events so they can trigger callbacks. - During startup, make target_examine() register a handler to catch ENABLE events for any then-disabled targets. This fixes bugs like "can't halt target after enabling its TAP". One class of unresolved bugs: if the target has an ETM hooked up to an ETB, nothing activates the ETB. But starting up the ETM without access to the ETB registers fails... git-svn-id: svn://svn.berlios.de/openocd/trunk@2251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-161-2/+4
| | | | | | | | | | | | 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-161-1/+1
| | | | | | | | | | | | | | | | | 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-161-7/+11
| | | | | | | | | | | | 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
* 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-111-27/+1
| | | | 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-111-33/+33
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2184 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate the core jtag interface pointer:zwelch2009-06-091-0/+9
| | | | | | | | | - 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-091-9/+5
| | | | | | | | - 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-091-3/+16
| | | | | | | | - 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-091-2/+0
| | | | | | | | - 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
* Cleanup and encapsulate IR Capture verification:zwelch2009-06-091-2/+3
| | | | | | | | | - 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
* Move the jtag_error helper routines out of header file:zwelch2009-06-091-25/+8
| | | | | | | | - 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-091-1/+2
| | | | | | | | - 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-091-1/+11
| | | | | | | | - 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-091-2/+0
| | | | 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-091-2/+4
| | | | | | | | - 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-091-2/+0
| | | | 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
* Merge documentation for jtag_add_statemove from source into header block.zwelch2009-06-091-5/+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-091-1/+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-091-1/+1
| | | | 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-091-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2144 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Change jtag_add_pathmove to set jtag_error rather than call exit():zwelch2009-06-091-0/+8
| | | | | | | | - 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
* Simplify jtag_execute_queue:zwelch2009-06-081-1/+10
| | | | | | | | - 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
* Add accessors to retrieve values of jtag_n{s,t}rst_delay variables.zwelch2009-06-081-0/+6
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2112 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factoring of jtag_examine_chain for maintainability:zwelch2009-06-071-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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