zwelch [Fri, 5 Jun 2009 00:43:43 +0000 (00:43 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NextEnabledTap' as 'jtag_tap_next_enabled.'
zwelch [Fri, 5 Jun 2009 00:43:32 +0000 (00:43 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NumEnabledTaps' as 'jtag_tap_count_enabled.'
zwelch [Fri, 5 Jun 2009 00:43:23 +0000 (00:43 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NumTotalTaps' as 'jtag_tap_count.'
zwelch [Fri, 5 Jun 2009 00:43:12 +0000 (00:43 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByJimObj' as 'jtag_tap_by_jim_obj.'
zwelch [Fri, 5 Jun 2009 00:42:52 +0000 (00:42 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByString' as 'jtag_tap_by_string.'
zwelch [Fri, 5 Jun 2009 00:42:39 +0000 (00:42 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByAbsPosition' as 'jtag_tap_by_abs_position.'
zwelch [Fri, 5 Jun 2009 00:42:32 +0000 (00:42 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_TapByPosition' as 'jtag_tap_by_position.'
zwelch [Fri, 5 Jun 2009 00:42:25 +0000 (00:42 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_AllTaps' as 'jtag_all_taps.'
zwelch [Fri, 5 Jun 2009 00:42:17 +0000 (00:42 +0000)]
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_all_taps' as '__jtag_all_taps.'
- Frees original symbol name to rename the accessor function.
zwelch [Thu, 4 Jun 2009 23:49:52 +0000 (23:49 +0000)]
Clean up the JTAG TAP creation handler:
- Factor jtag_tap_init() helper out of the end of jim_newtap_cmd.
- Factor jtag_tap_free() helper out of the error case in jim_newtap_cmd.
- Invert test to improve indentation at the end of jim_newtap_cmd.
- Improve whitespace in the newly factored functions.
zwelch [Thu, 4 Jun 2009 23:26:58 +0000 (23:26 +0000)]
Clean up the core JTAG TAP APIs:
- Move jtag_tap_name to same location as other TAP functions; export it.
- Factor new jtag_tap_add() from jim_newtap_cmd(); appends TAP to global list.
- Move static chain position counter to global; use in jtag_NumTotalTaps().
- Use jtag_AllTaps for reading tap list, instead of accessing global directly.
ntfreak [Thu, 4 Jun 2009 13:45:50 +0000 (13:45 +0000)]
- add support for different TAR autotincrement sizes as per ARM ADI spec.
- set TAR size to 12 bits for Cortex-M3.
- Original patch submitted by Magnus Lundin [lundin@mlu.mine.nu].
oharboe [Thu, 4 Jun 2009 07:05:22 +0000 (07:05 +0000)]
jtag_add_end_state() now returns the value of the global variable and does not modify the global variable if passed TAP_INVALID. This patch has no effect on the current code and is just to prepare upcoming patches.
zwelch [Thu, 4 Jun 2009 01:22:23 +0000 (01:22 +0000)]
David Brownell <david-b@pacbell.net>:
Update the "General Commands" (a.k.a. "random stuff") chapter,
and associated chunks of other text:
- Switch to @deffn and review everything that's documented
- Improve descriptions of reset events, with reference to
the setup.tcl code which issues them.
- Move one zy1000-specific command to that driver's doc.
- There is no "script" command; remove its doc.
NOTE: Some things missing from this bit of work are:
1- Reviewing the code to catch various *missing* functions,
mostly from "target.c"
2- Alphabetizing and organizing. This chapter is a real
grab-bag with no evident focus or structural principle.
3- Hole-filling and bugfixing with respect to messaging/logging.
Example, what principle could possibly justify the tcl command
output going into the server output/log instead of just the
telnet session?
4- Not just for this chapter ... but there should be a section
with descriptions of all the supported image file formats,
so every image command can just reference that section.
zwelch [Thu, 4 Jun 2009 01:16:43 +0000 (01:16 +0000)]
David Brownell <david-b@pacbell.net>:
Minor cleanup of FT2232:
- make Olimex glue warn about Olimex issues instead of JTAGkey issues;
- make some data static+const;
- don't export some internal symbols.
zwelch [Thu, 4 Jun 2009 00:54:25 +0000 (00:54 +0000)]
David Brownell <david-b@pacbell.net>:
Convert the Interface/Dongle Config chapter's section
on drivers to use the @deffn syntax, and integrate the
presentation of the driver-specific commands with the
relevant driver. Alphabetize.
Cross-checked against the code ... several adapters were
not listed, and a few commands weren't.
(Maintainers for the versaloon and zy1000 drivers would be
good candidates to add the commands missing from those
sections...)
zwelch [Wed, 3 Jun 2009 00:59:13 +0000 (00:59 +0000)]
David Brownell <david-b@pacbell.net>:
Update docs for most of the remaining commands in jtag.c:
- switch to @deffn
- these are just the "low level" JTAG commands
- resolve much goofage!
* remove docs for non-existent commands
* add missing docs for some existing commands
* fix incorrect docs for some commands
- just index TAP states overall, not individually
- current name is "RUN/IDLE" not "IDLE"
Cross checked against the source.
This also creates an "Interface Drivers" section, analagous to how
(NOR) Flash and NAND drivers are presented; that's not yet sorted.
zwelch [Wed, 3 Jun 2009 00:56:50 +0000 (00:56 +0000)]
David Brownell <david-b@pacbell.net>:
Rework the TAP creation documentation.
- Try to use "TAP" not "tap" everywhere; it's an acronym.
- Update the associated "target config files" section:
* reference the "TAP Creation" chapter for details
* simplify: reference interesting multi-tap config files
* let's not forget CPU configuration (*before* workspace setup)
* streamline it a bit
* move that workspace-vs-mmu issue to a better location
- Clean up TAP creation doc mess
* switch to @deffn
* (re)organize the remaining stuff
* reference the "Config File Guidelines" chapter
- Tweak the "Target Configuration" chapter
* rename as "CPU configuration"; unconfuse vs. target/*.cfg
* bring out that it's not just there for GDB
* move TAP events to the TAP chapter, where they belong (bugfix)
zwelch [Wed, 3 Jun 2009 00:45:21 +0000 (00:45 +0000)]
Move the JTAG cable interface API implementation
- Cloned the src/jtag/jtag.c file to src/jtag/interface.c.
- For each for of those files, deleted the contents of the other.
- Add new source file to automake input.
zwelch [Tue, 2 Jun 2009 23:59:13 +0000 (23:59 +0000)]
Add private src/jtag/interface.h for use by JTAG interface drivers:
- Move the jtag_interface structure definition.
- Move the Cable API declarations.
- Add new header file to automake input.
The next patch will move the implementation to interface.c.
zwelch [Tue, 2 Jun 2009 23:15:12 +0000 (23:15 +0000)]
Add header file for JTAG minidriver:
- Wraps all minidriver API functions using API front-ends:
- Outlines jtag_add_dr_out() and jtag_alloc_in_value32().
- Adds interface_ prefix to existing jtag_alloc_invalue_32 routines.
- Re-inline these interface definitions in new header file.
- Re-inline parts of the (mini)driver implementations in minidriver.h.
- Replace INCLUDE_JTAG_MINIDRIVER_H with #include directives.
The next patch will finish removing '#ifdef HAVE_JTAG_MINIDRIVER_H'
from jtag.h.
ntfreak [Tue, 2 Jun 2009 21:06:12 +0000 (21:06 +0000)]
- change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_t *swjdp instead of arm_jtag_t *jtag_info
- change SWJDP_IR/DR_APACC to DAP_IR/DR_APACC to conform with ARM_ADI docs.
- add swjdp->memaccess_tck field and code for extra tck clocks before accessing memory bus
- Set default memaccess value to 8 for Cortex-M3.
- Add dap memaccess command.
- document all armv7 dap cmds.
- Original patch submitted by Magnus Lundin [lundin@mlu.mine.nu].
ntfreak [Tue, 2 Jun 2009 16:07:31 +0000 (16:07 +0000)]
- hack added to fix a issue with v5/6 jlink
v5/6 jlink seems to have an issue if the first tap move is not divisible by 8, so we send a TLR on first power up
zwelch [Tue, 2 Jun 2009 07:51:16 +0000 (07:51 +0000)]
Add high-speed device support in FT2232 driver:
- Initial support for FT2232H/FT4232H devices from FTDI.
- Add --enable-ftd2xx-highspeed option to configure script.
- Original patch submitted by Joern Kaipf <lists@joernline.de>.
zwelch [Tue, 2 Jun 2009 07:05:54 +0000 (07:05 +0000)]
Continue clean-up of JTAG driver interface:
- Move all interface_jtag_* functions to jtag_driver.c.
- Extern command queue routines in jtag.h (with INCLUDE_JTAG_INTERFACE_H).
- Add new source file to automake inputs.
zwelch [Tue, 2 Jun 2009 06:49:53 +0000 (06:49 +0000)]
More JTAG interface driver cleanup:
- Moves references to global jtag interface to default core implementation.
- Missed this reference in the earlier "pointless" patch. Mea culpa.
Important: this has a side-effect. Previously, the error return inside
the interface routine short-circuited the remainder of that function
when 'init' has not been called. With this patch, the command queue
will be cleared in the case that 'init' has been called. Since that
case indicates a buggy script, this does not seem to be a problem.
zwelch [Tue, 2 Jun 2009 06:33:19 +0000 (06:33 +0000)]
More JTAG interface driver cleanup:
- Add jtag_callback_queue_reset() to reset the callback queue.
- Make interface_jtag_execute_queue() use new helper function.
zwelch [Tue, 2 Jun 2009 06:21:49 +0000 (06:21 +0000)]
More JTAG interface driver cleanup:
- Make interface_jtag_execute_queue call new helper function.
- Add default_interface_jtag_execute_queue to wrap jtag interface access.
This patch may look useless on its own, but it helps to isolate the core
JTAG variables from the interface_jtag_* routines, so the later can be
moved into jtag_driver.c in a pending patch.
zwelch [Tue, 2 Jun 2009 05:47:00 +0000 (05:47 +0000)]
Clean up jtag command queue handling:
- Rename last_command_pointer as next_command_pointer, because this variable
stores the address where jtag_queue_command() will store a command pointer.
- Make that variable static, since it is only used internally in jtag.c.
- Remove superfluous accessor for that now-static variable.
- Deobfuscate use of variables in jtag_command_queue.
- Add jtag_command_queue_reset helper function.
- Use it in interface_jtag_execute_queue.
zwelch [Tue, 2 Jun 2009 03:38:50 +0000 (03:38 +0000)]
Start clean-up of JTAG driver interface:
- Factor jtag_add_scan_check to call new jtag_add_scan_check_alloc helper.
- Use conditional logic to define two versions of the helper.
- These helpers will be moved to other files in future patches.
zwelch [Mon, 1 Jun 2009 23:30:58 +0000 (23:30 +0000)]
David Brownell <david-b@pacbell.net>:
Make the TCL "drscan" and "irscan" commands finish in RUN/IDLE
unless the user specifies otherwise ... usually they'd choose
something like DRPAUSE or IRPAUSE, avoiding RUN/IDLE.
The current "end" state is whatever the preceding commands left
in "cmd_queue_end_state", which to TCL scripts isn't knowable.
This change should forestall various surprises/bugs.
Also check that any "end" state specified is safe in case this
adapter's JTAG clock is free-running. For now, just issue a
warning; eventually a hard failure is probably correct.
zwelch [Mon, 1 Jun 2009 23:09:19 +0000 (23:09 +0000)]
David Brownell <david-b@pacbell.net>:
Remove two sections about deprecated/removed commands, documenting
them briefly in the chapter on deprecated/removed commands. The
"working_area" command just duplicated text; "jtag_device" wasn't
listed in that chapter before.
Also start de-emphasizing those commands. Don't index them, and
include a disclaimer that their documentation may start to vanish
about a year after the code does (e.g. in January 2010).