]> git.sur5r.net Git - openocd/log
openocd
15 years agoImprove JTAG reset, speed, and khz handlers to use parse_uint helper.
zwelch [Fri, 12 Jun 2009 01:40:35 +0000 (01:40 +0000)]
Improve JTAG reset, speed, and khz handlers to use parse_uint helper.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2213 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoUse parse_uint helper to replace strtoul call in jtag_tap_by_string.
zwelch [Fri, 12 Jun 2009 01:40:29 +0000 (01:40 +0000)]
Use parse_uint helper to replace strtoul call in jtag_tap_by_string.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2212 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify and improve gw16012_handle_parport_command:
zwelch [Fri, 12 Jun 2009 01:40:23 +0000 (01:40 +0000)]
Simplify and improve gw16012_handle_parport_command:
- 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

15 years agoSimplify and improve amt_jtagaccel_handle_parport_port_command:
zwelch [Fri, 12 Jun 2009 01:40:17 +0000 (01:40 +0000)]
Simplify and improve amt_jtagaccel_handle_parport_port_command:
- 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

15 years agoSimplify and improve parport_handle_parport_port_command:
zwelch [Fri, 12 Jun 2009 01:40:03 +0000 (01:40 +0000)]
Simplify and improve parport_handle_parport_port_command:
- 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

15 years agoSimplify and improve handle_debug_level_comamnd:
zwelch [Fri, 12 Jun 2009 01:39:57 +0000 (01:39 +0000)]
Simplify and improve handle_debug_level_comamnd:
- Bug fix: Return a syntax error if more than one argument is given.
- Bug fix: Use new parse_uint helper ensure debug_level parses correctly.
- Change: Display the debug_level after it has been set.
- Simplify bounds checking of debug_level.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2208 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify handle_sleep_command:
zwelch [Fri, 12 Jun 2009 01:39:51 +0000 (01:39 +0000)]
Simplify handle_sleep_command:
- Use new parse_ulong to ensure duration parses as a valid number.
- Rework logic to improve readability and seliminate uperfluous braces.
- Change whitespace to improve style.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2207 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoAdd new parse_uinttype wrappers for strtoul in src/helper/command.[ch].
zwelch [Fri, 12 Jun 2009 01:39:44 +0000 (01:39 +0000)]
Add new parse_uinttype wrappers for strtoul in src/helper/command.[ch].
- Used to improve command argument parsing of unsigned integers values.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2206 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Thu, 11 Jun 2009 21:55:43 +0000 (21:55 +0000)]
David Brownell <david-b@pacbell.net>:

Minor bugfix:  command_print_sameline() is what the
headers declare; make the code match.

Minor improvement:  make the printf format params always be const.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2205 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Thu, 11 Jun 2009 21:48:36 +0000 (21:48 +0000)]
David Brownell <david-b@pacbell.net>:

Rework the "Simple Configuration Files" chapter so it's more
of a quick-start "how to set up your project" tutorial:

 - Say how to hook up the JTAG adapter.  This will help new
   users, and in any case is worth spelling out somewhere.

 - Streamline the previous rather haphazard presentation,
   filling in some missing holes along the way:

     * Suggest "project directory" structure
     * Introduce new term, "user config" file (openocd.cfg)
     * Talk about more options for openocd.cfg contents
     * ... and about creating new config files
     * Add new topic, project-specific utilities (+examples)

 - Remove too-short, yet duplicative, chapter 19

Nudge packagers a bit more strongly to send patches (including
config files) upstream.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2204 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Thu, 11 Jun 2009 21:23:24 +0000 (21:23 +0000)]
David Brownell <david-b@pacbell.net>:

Update "arm9tdmi vector_catch" command description to highlight both
use cases (display configuration, or first change that config) and
to explain a bit more about what this is:  an alternative to using
hardware breakpoint resources.

Note that I tried this on an arm920t, but it didn't work.  Set bits,
then examined them and they weren't set.  And it didn't seem to act
as if vector triggering was noticed, either.

Also some minor unrelated tweaks:  @ignore some unused or don't-use
event names; fix a few typos; tweak chip-specific reset descriptions.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2203 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years ago- fix bug introduced during r1962
ntfreak [Thu, 11 Jun 2009 19:32:10 +0000 (19:32 +0000)]
- fix bug introduced during r1962
- Original patch submitted by David Claffey [dnclaffey@gmail.com].

git-svn-id: svn://svn.berlios.de/openocd/trunk@2202 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoembedded host: launch telnet server even if configuration fails
oharboe [Thu, 11 Jun 2009 13:03:32 +0000 (13:03 +0000)]
embedded host: launch telnet server even if configuration fails

git-svn-id: svn://svn.berlios.de/openocd/trunk@2198 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agofix ordering of arguments to fwrite()
oharboe [Thu, 11 Jun 2009 13:00:08 +0000 (13:00 +0000)]
fix ordering of arguments to fwrite()

git-svn-id: svn://svn.berlios.de/openocd/trunk@2197 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoFactor handle_bp_command into pieces:
zwelch [Thu, 11 Jun 2009 11:43:07 +0000 (11:43 +0000)]
Factor handle_bp_command into pieces:
- Bug fix: return a syntax error if the wrong number of arguments are given.
- Add handle_bp_command_list() and handle_bp_command_set().
- Use temporary addr variable to eliminate redundant strtoul() calls.
- Place variable declarations at their point of first use.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2196 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoFactor target_timer_callbacks_check_time into pieces:
zwelch [Thu, 11 Jun 2009 11:43:00 +0000 (11:43 +0000)]
Factor target_timer_callbacks_check_time into pieces:
- Add target_timer_callback_periodic_restart and target_call_timer_callback.
- Clean up and simplify logic that determines whether to call each callback.
- Move variable declarations to location of first use.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2195 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify and clean handle_virt2phys_command:
zwelch [Thu, 11 Jun 2009 11:42:54 +0000 (11:42 +0000)]
Simplify and clean handle_virt2phys_command:
- Add a doxygen block to simplify logic.
- Move declarations to point of first use.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2194 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify and fix target handle_rwp_command routine:
zwelch [Thu, 11 Jun 2009 11:42:47 +0000 (11:42 +0000)]
Simplify and fix target handle_rwp_command routine:
- Return syntax error unless exactly one argument is passed.
- Move variable declaration to point of first use.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2193 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify and fix handle_reset_command:
zwelch [Thu, 11 Jun 2009 11:42:40 +0000 (11:42 +0000)]
Simplify and fix handle_reset_command:
- Return syntax error if more than one argument is given.
- Move variables to location of first use.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2192 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify handle_resume_command:
zwelch [Thu, 11 Jun 2009 11:42:33 +0000 (11:42 +0000)]
Simplify handle_resume_command:
- Eliminate redundant calls to target_resume with addr temp variable.
- Place variables at location of first use.
- Fix minor whitespace issues.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2191 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSimplify and fix handle_step_command:
zwelch [Thu, 11 Jun 2009 11:42:26 +0000 (11:42 +0000)]
Simplify and fix handle_step_command:
- Bug fix: return syntax error when more than one argument is given.
- Eliminate redundant calls to step callback with addr temp variable.
- Place variables at location of first use.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2190 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoMove jtag_get_flush_queue_count near jtag_execute_queue (fix its docs).
zwelch [Thu, 11 Jun 2009 07:08:45 +0000 (07:08 +0000)]
Move jtag_get_flush_queue_count near jtag_execute_queue (fix its docs).

git-svn-id: svn://svn.berlios.de/openocd/trunk@2189 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoImprove grouping of JTAG KHz and verification accessors in header file.
zwelch [Thu, 11 Jun 2009 07:08:34 +0000 (07:08 +0000)]
Improve grouping of JTAG KHz and verification accessors in header file.
Add some quick Doxygen comments for these routines.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2188 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoGroup JTAG reset configuration and accessor APIs together in header file.
zwelch [Thu, 11 Jun 2009 07:08:28 +0000 (07:08 +0000)]
Group JTAG reset configuration and accessor APIs together in header file.
Remove unused reset_line_mode enumerated type.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2187 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoMove jtag_error helper declarations to the end of the header.
zwelch [Thu, 11 Jun 2009 07:08:21 +0000 (07:08 +0000)]
Move jtag_error helper declarations to the end of the header.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2186 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoOut-of-line jtag_tap_next_enabled and simplify its logic.
zwelch [Thu, 11 Jun 2009 07:08:14 +0000 (07:08 +0000)]
Out-of-line jtag_tap_next_enabled and simplify its logic.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2185 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoMove jtag_add_statemove decl/body nearer jtag_add_pathmove.
zwelch [Thu, 11 Jun 2009 07:08:03 +0000 (07:08 +0000)]
Move jtag_add_statemove decl/body nearer jtag_add_pathmove.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2184 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agodisable polling continuous polling during reset
oharboe [Thu, 11 Jun 2009 06:19:37 +0000 (06:19 +0000)]
disable polling continuous polling during reset

git-svn-id: svn://svn.berlios.de/openocd/trunk@2183 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years ago- update openocd online doc url's
ntfreak [Wed, 10 Jun 2009 22:22:49 +0000 (22:22 +0000)]
- update openocd online doc url's

git-svn-id: svn://svn.berlios.de/openocd/trunk@2182 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years ago- fix texi/pdf issue created in svn r2039
ntfreak [Wed, 10 Jun 2009 21:30:48 +0000 (21:30 +0000)]
- fix texi/pdf issue created in svn r2039

git-svn-id: svn://svn.berlios.de/openocd/trunk@2181 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoadded pathmove command
oharboe [Wed, 10 Jun 2009 07:19:14 +0000 (07:19 +0000)]
added pathmove command

git-svn-id: svn://svn.berlios.de/openocd/trunk@2180 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Wed, 10 Jun 2009 04:08:32 +0000 (04:08 +0000)]
David Brownell <david-b@pacbell.net>:

Tweak the csb337 code so that it doesn't enable alignment traps when
it completes the "reset init" sequence.  It turns out that the current
CFI code reliably triggers such traps.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2179 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoMove the documentation for the "poll" command up with
zwelch [Wed, 10 Jun 2009 04:06:25 +0000 (04:06 +0000)]
Move the documentation for the "poll" command up with
other server configuration.  Explain what it's about;
reference the related "$target_name curstate" method.

Update "poll" output to report whether background polling
is enabled or not.

Also fix a small typo; PC's have "complementary" tools.
Some have also "complimentary" ones; but not all.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2178 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoImprove use of automake conditionals for FTDI-based JTAG drivers:
zwelch [Tue, 9 Jun 2009 14:18:28 +0000 (14:18 +0000)]
Improve use of automake conditionals for FTDI-based JTAG drivers:
- 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

15 years agoSimplify JTAG automake input file:
zwelch [Tue, 9 Jun 2009 14:18:23 +0000 (14:18 +0000)]
Simplify JTAG automake input file:
- 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

15 years agoRename jtag_driver.c as driver.c to remove duplicate name component.
zwelch [Tue, 9 Jun 2009 12:47:49 +0000 (12:47 +0000)]
Rename jtag_driver.c as driver.c to remove duplicate name component.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2175 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoAdd a rule to rebuild libtool if ltmain.sh changes (from libtool docs).
zwelch [Tue, 9 Jun 2009 12:01:56 +0000 (12:01 +0000)]
Add a rule to rebuild libtool if ltmain.sh changes (from libtool docs).

git-svn-id: svn://svn.berlios.de/openocd/trunk@2174 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoreset to eol native for now. guess-rev.sh was broken by eol native, but it was a...
oharboe [Tue, 9 Jun 2009 11:05:45 +0000 (11:05 +0000)]
reset to eol native for now. guess-rev.sh was broken by eol native, but it was a red herring that these two files were affected.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2173 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoFix make maintainer-clean for out-of-tree builds.
zwelch [Tue, 9 Jun 2009 10:28:16 +0000 (10:28 +0000)]
Fix make maintainer-clean for out-of-tree builds.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2172 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoEncapsulate the core jtag interface pointer:
zwelch [Tue, 9 Jun 2009 10:07:07 +0000 (10:07 +0000)]
Encapsulate the core jtag interface pointer:
- 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

15 years agodos2unix
oharboe [Tue, 9 Jun 2009 08:59:54 +0000 (08:59 +0000)]
dos2unix

git-svn-id: svn://svn.berlios.de/openocd/trunk@2170 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoContinue encapsulation of JTAG event callback sub-API:
zwelch [Tue, 9 Jun 2009 08:41:36 +0000 (08:41 +0000)]
Continue encapsulation of JTAG event callback sub-API:
- 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

15 years agoAdd jtag_event_handler_t:
zwelch [Tue, 9 Jun 2009 08:41:29 +0000 (08:41 +0000)]
Add jtag_event_handler_t:
- 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

15 years agoExpose jtag_unregister_event_callback with related API declarations.
zwelch [Tue, 9 Jun 2009 08:41:23 +0000 (08:41 +0000)]
Expose jtag_unregister_event_callback with related API declarations.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2167 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoImprove encapsulation of JTAG event handling:
zwelch [Tue, 9 Jun 2009 08:41:14 +0000 (08:41 +0000)]
Improve encapsulation of JTAG event handling:
- 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

15 years agoProperly encapsulate core hasKHZ variable.
zwelch [Tue, 9 Jun 2009 08:41:08 +0000 (08:41 +0000)]
Properly encapsulate core hasKHZ variable.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2165 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoCleanup and encapsulate IR Capture verification:
zwelch [Tue, 9 Jun 2009 08:41:00 +0000 (08:41 +0000)]
Cleanup and encapsulate IR Capture verification:
- 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

15 years agoAdd missing static keywords to a few variables in JTAG core module.
zwelch [Tue, 9 Jun 2009 08:40:54 +0000 (08:40 +0000)]
Add missing static keywords to a few variables in JTAG core module.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2163 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoMove the jtag_error helper routines out of header file:
zwelch [Tue, 9 Jun 2009 08:40:46 +0000 (08:40 +0000)]
Move the jtag_error helper routines out of header file:
- 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

15 years agoEncapsulate jtag_reset_config using accessors:
zwelch [Tue, 9 Jun 2009 08:40:31 +0000 (08:40 +0000)]
Encapsulate jtag_reset_config using accessors:
- 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

15 years agoRemove superfluous extern for non-existant global variable.
zwelch [Tue, 9 Jun 2009 08:40:23 +0000 (08:40 +0000)]
Remove superfluous extern for non-existant global variable.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2160 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoAdd get and set accessors for jtag_speed:
zwelch [Tue, 9 Jun 2009 08:40:10 +0000 (08:40 +0000)]
Add get and set accessors for jtag_speed:
- 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

15 years agoEncapsulate the jtag_event_callback list; add helper functions if needed.
zwelch [Tue, 9 Jun 2009 08:40:02 +0000 (08:40 +0000)]
Encapsulate the jtag_event_callback list; add helper functions if needed.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2158 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoEncapsulate the jtag_trst and jtag_srst variables:
zwelch [Tue, 9 Jun 2009 08:39:50 +0000 (08:39 +0000)]
Encapsulate the jtag_trst and jtag_srst variables:
- 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

15 years agoMove extern of nvp_jtag_tap_event from jtag.h to tcl.c.
zwelch [Tue, 9 Jun 2009 08:39:44 +0000 (08:39 +0000)]
Move extern of nvp_jtag_tap_event from jtag.h to tcl.c.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2156 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoRemove superfluous extern of jtag_event_strings from jtag.h.
zwelch [Tue, 9 Jun 2009 08:39:37 +0000 (08:39 +0000)]
Remove superfluous extern of jtag_event_strings from jtag.h.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2155 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoremove native line style
oharboe [Tue, 9 Jun 2009 07:51:47 +0000 (07:51 +0000)]
remove native line style

git-svn-id: svn://svn.berlios.de/openocd/trunk@2154 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoremoved native line end style - breaks cygwin
oharboe [Tue, 9 Jun 2009 06:53:26 +0000 (06:53 +0000)]
removed native line end style - breaks cygwin

git-svn-id: svn://svn.berlios.de/openocd/trunk@2153 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoReplace 'jtag.c' with 'core.c' in code comments.
zwelch [Tue, 9 Jun 2009 04:54:09 +0000 (04:54 +0000)]
Replace 'jtag.c' with 'core.c' in code comments.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2152 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoRemove accidental duplicate of hasKHz; fixes pre-init speed setup.
zwelch [Tue, 9 Jun 2009 04:39:54 +0000 (04:39 +0000)]
Remove accidental duplicate of hasKHz; fixes pre-init speed setup.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2151 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoProvide brief description of newly factored TCL layer in The Manual.
zwelch [Tue, 9 Jun 2009 04:35:16 +0000 (04:35 +0000)]
Provide brief description of newly factored TCL layer in The Manual.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2150 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoSplit main jtag.c file into two layers:
zwelch [Tue, 9 Jun 2009 04:15:13 +0000 (04:15 +0000)]
Split main jtag.c file into two layers:
- 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

15 years agoMerge documentation for jtag_add_statemove from source into header block.
zwelch [Tue, 9 Jun 2009 02:48:28 +0000 (02:48 +0000)]
Merge documentation for jtag_add_statemove from source into header block.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2148 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoMove Doxygen documentation for IR/DR scan routines to header file.
zwelch [Tue, 9 Jun 2009 02:48:18 +0000 (02:48 +0000)]
Move Doxygen documentation for IR/DR scan routines to header file.
- 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

15 years ago- Replace 'jtag_tap_by_abs_position' with 'jtag_tap_by_position'.
zwelch [Tue, 9 Jun 2009 02:24:05 +0000 (02:24 +0000)]
- Replace 'jtag_tap_by_abs_position' with 'jtag_tap_by_position'.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2146 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoRemove non-existant jtag_tap_by_position API declaration.
zwelch [Tue, 9 Jun 2009 02:24:00 +0000 (02:24 +0000)]
Remove non-existant jtag_tap_by_position API declaration.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2145 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoUse unsigned type for jtag_tap_count and jtag_tap_by_abs_position.
zwelch [Tue, 9 Jun 2009 02:23:53 +0000 (02:23 +0000)]
Use unsigned type for jtag_tap_count and jtag_tap_by_abs_position.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2144 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoCleanup jtag_tap_by_abs_position:
zwelch [Tue, 9 Jun 2009 02:23:44 +0000 (02:23 +0000)]
Cleanup jtag_tap_by_abs_position:
- 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

15 years agoSimplify jtag_tap_by_jim_object:
zwelch [Tue, 9 Jun 2009 02:23:35 +0000 (02:23 +0000)]
Simplify jtag_tap_by_jim_object:
- 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

15 years agoSimplify and fix bug in jtag_tap_by_string:
zwelch [Tue, 9 Jun 2009 02:23:27 +0000 (02:23 +0000)]
Simplify and fix bug in jtag_tap_by_string:
- 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

15 years agoAllow jtag_tap_add to be called from other JTAG code modules.
zwelch [Tue, 9 Jun 2009 02:23:16 +0000 (02:23 +0000)]
Allow jtag_tap_add to be called from other JTAG code modules.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2140 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoCleanup jtag_tap_count_enabled.
zwelch [Tue, 9 Jun 2009 02:23:03 +0000 (02:23 +0000)]
Cleanup jtag_tap_count_enabled.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2139 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoChange jtag_add_pathmove to set jtag_error rather than call exit():
zwelch [Tue, 9 Jun 2009 01:16:35 +0000 (01:16 +0000)]
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

15 years agoReduce scope or eliminate temporary variables in jtag_add_statemove:
zwelch [Tue, 9 Jun 2009 01:16:19 +0000 (01:16 +0000)]
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

15 years agoMove documentation in jtag_add_statemove body to Doxygen block.
zwelch [Tue, 9 Jun 2009 01:16:13 +0000 (01:16 +0000)]
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

15 years agoRevert changes from r2134 that snuck into the commit. Mea culpa.
zwelch [Tue, 9 Jun 2009 01:01:13 +0000 (01:01 +0000)]
Revert changes from r2134 that snuck into the commit.  Mea culpa.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2135 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Tue, 9 Jun 2009 00:58:23 +0000 (00:58 +0000)]
David Brownell <david-b@pacbell.net>:

Add configuration for an old AT91rm9200 board, the Cogent CSB 337.
Worth noting from the OpenOCD perspective:

 - It got a real hardware trace port connector; wired up here as
   much as we can, lacking inexpensive trace-aware dongles.

 - This is the first in-tree use of the "arm920t cp15" command.
   It adjusts the CPU clocking and enables i-cache, which gives
   more than 4x speedup after booting Linux; it's visible even
   just running U-Boot.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2134 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoFix eol-style on guess-rev.sh
kc8apf [Mon, 8 Jun 2009 22:18:16 +0000 (22:18 +0000)]
Fix eol-style on guess-rev.sh

git-svn-id: svn://svn.berlios.de/openocd/trunk@2133 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoupdate zy1000 to latest minidriver work
oharboe [Mon, 8 Jun 2009 14:13:32 +0000 (14:13 +0000)]
update zy1000 to latest minidriver work

git-svn-id: svn://svn.berlios.de/openocd/trunk@2132 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoZach Welch wrote a fix for configure problems under Cygwin.
oharboe [Mon, 8 Jun 2009 13:57:13 +0000 (13:57 +0000)]
Zach Welch wrote a fix for configure problems under Cygwin.
ltmain.sh is added to svn ignore

git-svn-id: svn://svn.berlios.de/openocd/trunk@2131 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoAdd documentation for new interface_list command to user guide.
zwelch [Mon, 8 Jun 2009 13:16:57 +0000 (13:16 +0000)]
Add documentation for new interface_list command to user guide.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2130 b42882b7-edfa-0310-969c-e2dbd0fdcd60

15 years agoFactor interface list to its own command:
zwelch [Mon, 8 Jun 2009 13:12:17 +0000 (13:12 +0000)]
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

15 years agoCleanup and simplify handle_interface_command:
zwelch [Mon, 8 Jun 2009 13:12:12 +0000 (13:12 +0000)]
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

15 years agoSimplify jtag_add_sleep:
zwelch [Mon, 8 Jun 2009 10:58:28 +0000 (10:58 +0000)]
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

15 years agoSimplify jtag_add_reset:
zwelch [Mon, 8 Jun 2009 10:58:13 +0000 (10:58 +0000)]
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

15 years agoSimplify jtag_add_clocks:
zwelch [Mon, 8 Jun 2009 10:57:51 +0000 (10:57 +0000)]
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

15 years agoSimplify jtag_add_runtest:
zwelch [Mon, 8 Jun 2009 10:57:39 +0000 (10:57 +0000)]
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

15 years agoSimplify jtag_add_pathmove:
zwelch [Mon, 8 Jun 2009 10:57:18 +0000 (10:57 +0000)]
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

15 years agoSimplify jtag_add_tlr:
zwelch [Mon, 8 Jun 2009 10:57:10 +0000 (10:57 +0000)]
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

15 years agoSimplify jtag_add_plain_dr_scan:
zwelch [Mon, 8 Jun 2009 10:56:49 +0000 (10:56 +0000)]
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

15 years agoSimplify jtag_add_dr_scan:
zwelch [Mon, 8 Jun 2009 10:56:36 +0000 (10:56 +0000)]
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

15 years agoSimplify jtag_add_plain_ir_scan:
zwelch [Mon, 8 Jun 2009 10:56:25 +0000 (10:56 +0000)]
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

15 years agoSimplify jtag_add_ir_scan_noverify:
zwelch [Mon, 8 Jun 2009 10:56:18 +0000 (10:56 +0000)]
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

15 years agoSimplify jtag_execute_queue:
zwelch [Mon, 8 Jun 2009 10:56:07 +0000 (10:56 +0000)]
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

15 years agoSimplify jtag_execute_queue_noclear:
zwelch [Mon, 8 Jun 2009 10:55:54 +0000 (10:55 +0000)]
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

15 years agoCleanup handle_runtest_command:
zwelch [Mon, 8 Jun 2009 10:55:44 +0000 (10:55 +0000)]
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

15 years agoClean up handle_jtag_reset_command:
zwelch [Mon, 8 Jun 2009 10:55:36 +0000 (10:55 +0000)]
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

15 years agoExtend handle_jtag_n{s,t}rst_delay_command routines:
zwelch [Mon, 8 Jun 2009 10:55:24 +0000 (10:55 +0000)]
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

15 years agoAdd accessors to retrieve values of jtag_n{s,t}rst_delay variables.
zwelch [Mon, 8 Jun 2009 10:55:13 +0000 (10:55 +0000)]
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

15 years agoUpdate JTAG reset delay command handlers:
zwelch [Mon, 8 Jun 2009 10:54:52 +0000 (10:54 +0000)]
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