zwelch [Sat, 30 May 2009 01:43:21 +0000 (01:43 +0000)]
David Brownell <david-b@pacbell.net>:
Provide basic documentation on the ARM ETM and ETB trace commands.
Fix minor goofs in registration of the ETM commands; and whitespace
issues in the proof-of-concept oocd_trace code. (Plus include a
ref to Dominic's email saying that it's just proof-of-concept code.)
Note that I'm still not sure whether the ETM support works. But
documenting how it's expected to work should help sort out which
behaviors are bugs, which will help get bugs patched.
ZW: whitespace changes were split out of this patch but will follow.
zwelch [Sat, 30 May 2009 01:32:19 +0000 (01:32 +0000)]
David Brownell <david-b@pacbell.net>:
Make it so the magic "reset_config" keywords can be provided in any
order. This eliminates needless error paths, and makes it easier
to define things at the right level (adapter, board, target).
It also includes two other behavioral changes:
(1) When "handle_reset_config" sees a parameter error, it
exits without changing anything. This is best viewed
as a bugfix. (Old behavior: restore defaults, even if
they weren't previously active.)
(2) Only the behaviors that were explicitly specified get
changed. (Old behavior: everything else gets reset to
the "default".) So for example you can now specify SRST
drive requirements without saying anything about the
three unrelated topics you previously had to specify.
That second one might cause confusion for any configs that end
up calling "reset_config" twice, so it will deserve to be called
out in the release notes. (There were no such configurations in
the current OpenOCD source tree.)
Update docs accordingly. Note that at least some versions of
the texi-to-html tools can't handle "@xref{with spaces}", but
those work properly in PDF and in the info files.
zwelch [Fri, 29 May 2009 04:00:51 +0000 (04:00 +0000)]
Add documentation to flash.h:
- provides low-level information about each flash API interface,
- gives driver authors some documentation about the driver interface,
- updated extensively from the original patch provided by Duane Ellis.
zwelch [Fri, 29 May 2009 01:33:04 +0000 (01:33 +0000)]
David Brownell <david-b@pacbell.net>:
Provide basic documentation for some of the other flash drivers.
avr ... looks incomplete, may work with one AVR8 microcontroller
ecosflash ... can't find docs
lpc288x ... an NXP part, driver seems lpc2888-specific
ocl ... some arm7/arm9 thing, can't find docs
pic32mx ... looks incomplete, for PIC32MX (MIPS 4K) devices
tms470 ... for TI TMS470 parts
Still seems to be mostly arm7tdmi... several of these have no
users in the current tree.
zwelch [Thu, 28 May 2009 23:13:32 +0000 (23:13 +0000)]
David Brownell <david-b@pacbell.net>:
Start converting the architecture-specific commands to @deffn format,
reviewing against the code.
* armv4_5 disassemble ... now documented; although Jazelle code
is not handled
* It's "armv4_5 core_state" not "core_mode"; although Jazelle state
is not handled
* arm7/9 "debug" commands ... now with other arm7_9 commands, no
longer in a separate section
* arm926ejs cp15 ... previous description was broken, it matched
the code for arm920t instead
* Have separate subsections for ARMv4/ARMv5, ARMv6, and ARMv7; the
latter are new
* Move core-specific descriptions into sub-subsections under those
architectures; XScale and ARM11 descriptions are new
The new XScale and ARM11 command descriptions surely need elaboration
and review. ARM CP15 operation descriptions in general seem to be
confused and incomplete.
zwelch [Thu, 28 May 2009 01:18:47 +0000 (01:18 +0000)]
David Brownell <david-b@pacbell.net>:
Continue updating the NOR flash coverage to use @deffn syntax, so the
commands have more consistent presentation and formatting. This
reorganizes information and updates its presentation, except where
the information didn't really match the code.
This patch updates the main commands, and finishes making the section
structure parallel the NAND presentation. Of note:
- The "flash fill[whb] addr value length" commands are now documented.
- The "flash bank" command is now presented much earlier
- Explicit mention is made that NOR flash should be read using just
standard memory access commands, like "mdw" and "dump_image".
zwelch [Thu, 28 May 2009 01:11:10 +0000 (01:11 +0000)]
David Brownell <david-b@pacbell.net>:
Start updating the NOR flash coverage to use @deffn syntax, so the
commands have more consistent presentation and formatting. This
reorganizes information and updates its presentation, except where
the information didn't really match the code.
This patch updates most of the driver specific support, creating one
new (and alphabetized!) section just for driver-specific data, where
previously that data was split over up to three sections. Of note:
- The at91sam7 docs were a bit out of date with respect to the code.
- The "str9xpec" stuff still deserves some work. For now, it sits
in its own subsection; pretty messy.
- Likewise the "mflash" stuff. That's a parallel infrastructure,
and is now in a section of its own.
- The "mass_erase" commands for the Cortex M3 chips got turned into
footnotes. IMO, they should vanish sometime; they're superfluous.
- There are still a bunch of undocumented NOR drivers. Examples:
avr(8), tms470, pic32mx, more.
Plus there are a handful of minor tweaks to the NAND docs (to help make
the NOR and NAND presentations be parallel); the "Command Index" has
been renamed as the "Command and Driver Index"; reference TI instead
of Luminary Micro in several places.
zwelch [Thu, 28 May 2009 00:47:30 +0000 (00:47 +0000)]
David Brownell <david-b@pacbell.net>:
Fix a bunch of PDF generation bugs in the texi:
* The "overfull" warnings are basically complaints about lines
that are too long, so they ran off the right margin of the
PDF documentation and turn into a "black blot".
* The "underfull" warnings are basically complaints about lines
that look ugly when they get filled, because the tokens are
so long that the line-break algorithm can't do anything good.
In a few cases the simplest fix seemed to be to use more appropriate
texi commands.
In other cases the fix was a content bugfix: "ocd_" not "openocd_";
and many of those "target variants" actually aren't recognized.
kc8apf [Wed, 27 May 2009 20:30:17 +0000 (20:30 +0000)]
Author: Nicolas Pitre <nico@cam.org>
- Silence errors about keep_alive() not being called frequently enough unless
a gdb session is active or debugging is enabled
zwelch [Wed, 27 May 2009 15:15:06 +0000 (15:15 +0000)]
Numerous minor updates and fixes for The Manual:
- Link Scripting Overview into the TCL Primer; both need more work.
- Remove redundant OpenOCD from Scripting Overview subpage title.
- Fix incorrect tag in Doxygen style guide example.
- Fix minor typo in first introductory paragraph of main page.
zwelch [Wed, 27 May 2009 07:49:58 +0000 (07:49 +0000)]
Update build system to find moved scripts -- Step 3 of 2:
- Update references from using PKGLIBDIR to PKGDATADIR.
- Update built-in script search paths to reflect new install location:
- $(pkgdatadir) => $(pktdatadir)/site
- $(pkglibdir) => $(pktdatadir)/scripts
- Update installed location of httpd files:
- $(pkglibdir)/httpd => $(pkgdatadir)/httpd
zwelch [Wed, 27 May 2009 06:44:43 +0000 (06:44 +0000)]
Move TCL script files -- Step 1 of 2:
- Move src/target/{interface,target,board,test}/ into src/tcl/
- Remove existing rules in src/Makefile.am and src/target/Makefile.am.
- Add Makefile.am handling of *.cfg and *.tcl files in top Makefile.am:
- Add dist-hook to include such files under src/tcl in the distribution.
- Add install-data-hook to install contents of '$(top_srcdir)/src/tcl/'.
- Add uninstall-hook to remove the installed script files.
- Change paths to (un)install script files in '$(pkgdatadir)/scripts'.
zwelch [Tue, 26 May 2009 23:58:01 +0000 (23:58 +0000)]
Update Doxygen markup in PATCHES, BUGS, and TODO:
- In the File List, these files are listed and link to empty pages.
- This patch adds @file blocks to reference the pages each file contains.
- Remove redundant "OpenOCD" from PATCHES title; it clutters the tree view.
zwelch [Tue, 26 May 2009 01:27:56 +0000 (01:27 +0000)]
SimonQian <simonqian@SimonQian.com>, reported by R.Doss:
This patch fixes a segfault when TDO was not received in XXR command:
- allocate space for the value and mask anyway
- clear the mask to zero to effectively skip the output comparison step
zwelch [Tue, 26 May 2009 00:23:23 +0000 (00:23 +0000)]
David Brownell <david-b@pacbell.net>:
Update the "Reset Configuration" information in the User's guide:
- Convert to @deffn syntax
- Move tutorial text from command descriptions into new sections
- Describe several different types of JTAG-visible reset
- Expand descriptions of configuration tweaks for SRST and TRST
- Link to the "reset" command, and vice versa
- Bugfix the "reset_config" description (it didn't match the code)
Plus, be more proscriptive: do it in board config files, except for
the oddball cases where that won't work. (Current target.cfg files
seem to have much goofage there; several seem board-specific.)
zwelch [Sun, 24 May 2009 21:13:29 +0000 (21:13 +0000)]
David Brownell <david-b@pacbell.net>:
Doc (mostly) update for jtag_khz:
- switch to @deffn syntax
- add entry for "jtag_rclk"
- move deprecated "jtag_speed" into collection of deprecated calls
And for ft2232, don't be the only adapter to *log* an error if RTCK
is requested; it's already reported properly, like any other nonfatal
command parameter. "jtag_rclk" just works as expected, without any
scarey messages.
zwelch [Sun, 24 May 2009 21:08:42 +0000 (21:08 +0000)]
David Brownell <david-b@pacbell.net>:
Make startup for the various server ports be quiet, unless
debugging is active: don't emit needless scarey messages.
Update the relevant documentation and its references:
- For these port commands ... cover the default values;
convert to @deffn syntax; include their use outside of
the configuration stage; and alphabetize.
Similar updates to the rest of that small chapter:
- Highlight that there even *IS* a configuration stage, after
which some command functionality is no longer available.
- For GDB commands ... convert to @deffn syntax; alphabetize;
include a missing command (!); add missing helptext (!) for
one non-missing command; update relevant cross-references
and index entries.
zwelch [Sun, 24 May 2009 20:57:53 +0000 (20:57 +0000)]
David Brownell <david-b@pacbell.net>:
The "Illegal mode for command" diagnostic is deeply useless.
Say "Command '%s' only runs during configuration stage" instead,
letting users know what the real issue is.
zwelch [Sun, 24 May 2009 02:08:17 +0000 (02:08 +0000)]
Nicolas Pitre <nico@cam.org>: Update sheevaplug interface script:
When the CPU is in the WFI state, the JTAG interface simply doesn't
respond at all and initial tap examination simply fails. Let's simply
do it again when we come around to assert nSRST.
zwelch [Sun, 24 May 2009 01:57:13 +0000 (01:57 +0000)]
David Brownell <david-b@pacbell.net>:
Update two oddball NAND commands to work with {offset, length}
instead of block numbers, matching the other commands as well
as usage in U-Boot and the Linux-MTD utilities.
Document them accordingly. Update the single in-tree use of
those commands (sheevaplug).
ALSO:
(a) Document the current 2 GByte/chip ceiling for NAND chipsize.
(32 bit offset/length values can't represent 4 GBytes.) Maybe
after the upcoming release, the code can switch to 64-bits.
(b) The "nand check_bad_blocks" should report "bad" blocks. They
are not "invalid" blocks; they're "bad" ones.
(c) Tweak the "nand info" command to handle the "no arguments"
case sanely (show everything, instead of showing garbage) and
not listing the blocksize in hex kbytes (duh).
zwelch [Sun, 24 May 2009 01:38:19 +0000 (01:38 +0000)]
David Brownell <david-b@pacbell.net>:
NAND support for DaVinci-family drivers, with HW ECC support.
Declare the NAND chip on the DM355 EVM board.
Currently tested on DM355 for Linux interop using the standard
large page (2KB) chip in the EVM socket; "hwecc1" and "hwecc4"
work fine. (Using hwecc4 relies on patches that haven't quite
made it through the Linux-MTD bottlenecks yet.)
Not yet tested: 1-bit on small-page (although it's hard to see
how that could fail); 4-bit on small page (picky layout issues);
the "hwecc_infix" mode (primarily for older boot ROMs; testing
there is blocked on having new bootloader code).
zwelch [Sun, 24 May 2009 01:33:54 +0000 (01:33 +0000)]
Fix two problems with openocd.texi:
- Fix minor issues with xrefs not liking parentheses around them.
- Change 'Building' section to 'Building OpenOCD'. It reads better.
zwelch [Sun, 24 May 2009 01:08:16 +0000 (01:08 +0000)]
Properly fix doxygen out-of-tree build process:
- move Doxyfile to Doxyfile.in: type 'make Doxyfile' to recreate it
- create Doxyfile from Doxyfile.in with make rule:
- use sed substitution of $(srcdir) to location directories
- delete all doxygen created files with 'make distclean'
- include all required files (including logger.pl) in distribution
zwelch [Sun, 24 May 2009 00:47:49 +0000 (00:47 +0000)]
SimonQian <simonqian@SimonQian.com>:
Changes svf_check_tdo function (checks tdo output matches desired values):
- call buf_cmp_mask function to do comparison instead of using a loop.
- fixes a bug when data length is equal to sizeof(int).
zwelch [Sat, 23 May 2009 22:52:47 +0000 (22:52 +0000)]
Update main page of doxygen developer documentation:
- Rewrite copy to give a better introduction and overview.
- Add subpages: The List, Style Guide, Patch Policies, and Bug Reporting.
zwelch [Sat, 23 May 2009 22:37:19 +0000 (22:37 +0000)]
Update user guide documentation:
- Remove style guide from user guide; moved to doxygen manual.
- Replace with improved introduction for developers and packagers.
- Move introductory paragraph about the project under the About page.
zwelch [Sat, 23 May 2009 20:50:06 +0000 (20:50 +0000)]
Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
- Add jtag_execute_queue in jtag_add_reset after interface_jtag_add_reset.
- Use tap_set_state to demark TAP_RESET, instead of cmd_queue_cur_state
- cmd_queue_cur_state needs to be retired.
zwelch [Sat, 23 May 2009 03:42:13 +0000 (03:42 +0000)]
Submitted by Magnus Lundin <lundin@mlu.mine.nu>:
Updates to the J-Link interface driver to support more device versions:
- Add capability detection:
- if capable, detect protocol version; otherwise, assume v2 protocol.
- if capable, detect buffer size; otherwise, assume minimal.
- Disable command result queries for devices using v2 protocol.
- Defined and use JTAG2 command with v2 protocol; JTAG3 is v3 protocol.
- Add TCL command to allow explicit setting of J-Link protocol version.
With approval, I revised the patch to make the following changes:
- add static keywords to new jlink-specific variables
- factor calculation of major_version to be more readable
- remove braces around simple one-line statements in if/else clauses
- remove (rather than #if 0) duplicate reset code; it is in SVN
- use &function to be clearer when passing function pointers
- add symbols for EMU_CMD_GET_CAPS bits; do not hard-code constants!
- almost renamed jlink_handle_jlink_hw_jtag_command (seriously?!?!)
- rewrote that function using a switch statement.
- made version request processing easier to understand and modify
- improve alternate endpoint detection:
- make code easier to read by using temporary variables
- eliminate extra level of indentation and redundant logging
- use ternary conditional to select JTAG2 or JTAG3 command
- reverse version test in jlink_usb_message to reduce indentation
- this had the biggest effect in cleaning up this patch
- use C99's ability to declare new/changed variables with less scope
- add spaces around binary operators in new/changed code
- revert other superfluous whitespace/comment style changes
kc8apf [Fri, 22 May 2009 17:44:04 +0000 (17:44 +0000)]
Author: David Brownell <david-b@pacbell.net>
Remove un-implemented and dubious "nand copy" command.
Doing this efficiently would mean doing the copying on
the target CPU, instead of back and forth through JTAG.
If anyone ever needs this functionality, that's what
they should implement.
Also, update on-line "help" for "nand dump" to display
its two optional flags; and for "nand write" to display
a recently added flag.
zwelch [Fri, 22 May 2009 02:32:31 +0000 (02:32 +0000)]
Submitted by David Brownell <david-b@pacbell.net>:
Improve support for the DM355 EVM board, and eventually other boards based
on DaVinci chips:
- Provide generic "davinci.cfg" to hold utilities that can be reused by
different chips in this family. Start with PINMUX, PSC, and PLL setup.
- DM355 chip support updates: provide a dictionary with chip-specific
symbols, load those utilities.
- Create a new dm355evm board file, with a reset-init event handler
which uses those utilities to set up PLLs and clocks, configure the
pins, and improve the JTAG speed limit.
Also a minor tweak: provide a virtual address for the work area, matching
what the very latest kernels do. It's probably unwise to use OpenOCD while
the MMU is active though.
The DRAM isn't yet accessible, but NAND access is mostly ready.
zwelch [Fri, 22 May 2009 02:25:18 +0000 (02:25 +0000)]
Submitted by David Brownell <david-b@pacbell.net>:
Add a "NAND Commands" section to to the TEXI docs, covering the basic
commands except for those previously discussed as being due for removal
("nand copy") or switching to use byte offsets not block numbers.
This uses the "@deffn..." syntax for defining commands, as somewhat
suggested by the TEXI documentation, and adds a new "Command Index".
We might prefer to merge those indexes for the near term, but I think
the "@deffn" approch is probably worth switching to.
Updates a few other bits to clarify that "flash" doesn't just mean NOR.
And to fix one niggling falsity: the "reset-init" event *is* used, and
in fact it's quite important.
kc8apf [Thu, 21 May 2009 17:20:05 +0000 (17:20 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_ir_scan() [2/2] (version without goto):
- change 'found' to bool
- add comments on loops
kc8apf [Thu, 21 May 2009 04:53:07 +0000 (04:53 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_dr_out():
- use pointer 'field' instead of scan->fields[field_count]
- restructure the main loop to clearly separate the two cases: TAP is not bypassed / TAP is bypassed
(this is to keep the function similar to interface_jtag_add_dr_scan())
- fix bug where only the first output field has its tap field set
- add asserts to verify that target_tap points to the one not bypassed TAP
kc8apf [Thu, 21 May 2009 04:50:00 +0000 (04:50 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_dr_scan():
- use pointer 'field' instead of scan->fields[field_count]
- restructure the main loop to clearly separate the two cases: TAP is not bypassed / TAP is bypassed
- add an assert that each non-bypassed TAP receives at least one field
- add an assert that checks that no superfluous input fields were passed
kc8apf [Thu, 21 May 2009 04:48:15 +0000 (04:48 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
-jtag.c, interface_jtag_add_ir_scan():
- use pointer 'field' instead of scan->fields[nth_tap]
- add assertion to ensure that input data has correct size for TAP's IR
kc8apf [Thu, 21 May 2009 04:45:57 +0000 (04:45 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
- jtag.c: consolidate output scan field initialization in scan functions
- jtag.c: add cmd_queue_scan_field_clone() to handle 1:1 field copies
- jtag.c: fix bug where only the first output field in a dr scan has its tap field set
kc8apf [Thu, 21 May 2009 04:41:50 +0000 (04:41 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
- jtag.c: consolidate all memory allocations in scan functions in one block, add out_fields pointer to set stage for further changes
kc8apf [Thu, 21 May 2009 04:39:41 +0000 (04:39 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
- add 'const' qualifier to function parameters in jtag.c that are not to be modified or freed by the function
kc8apf [Thu, 21 May 2009 04:37:31 +0000 (04:37 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
- add doxygen comments to scan commands in jtag.c
- move jtag_add_dr_scan next to interface_jtag_add_dr_scan to keep these function pairs together
kc8apf [Wed, 20 May 2009 04:55:01 +0000 (04:55 +0000)]
Author: Michael Bruck <mbruck@digenius.de>
- simplify code in interface_jtag_add_plain_dr_scan() by adding a local variable 'scan' to hold the scan_command_t