]> git.sur5r.net Git - openocd/log
openocd
15 years agoClean up the core JTAG TAP APIs:
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.

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

15 years agoChange hasKHz to use bool type.
zwelch [Thu, 4 Jun 2009 22:43:34 +0000 (22:43 +0000)]
Change hasKHz to use bool type.

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

15 years agoAdd missing static keywords in JTAG source file.
zwelch [Thu, 4 Jun 2009 22:41:21 +0000 (22:41 +0000)]
Add missing static keywords in JTAG source file.

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

15 years agounbreak arm11. TAP_INVALID is used to communicate inband that a special state should...
oharboe [Thu, 4 Jun 2009 20:05:32 +0000 (20:05 +0000)]
unbreak arm11. TAP_INVALID is used to communicate inband that a special state should be used to lower level fn's in ARM11 code.

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

15 years ago- add support for different TAR autotincrement sizes as per ARM ADI spec.
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].

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

15 years agoRename jtag_add_end_state to jtag_set_end_state since "add" implies that
oharboe [Thu, 4 Jun 2009 13:18:07 +0000 (13:18 +0000)]
Rename jtag_add_end_state to jtag_set_end_state since "add" implies that
this fn has something to do with the queue, which it does not as such.

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

15 years agoIntroduce jtag_get_end_state() fn to clarify code a bit.
oharboe [Thu, 4 Jun 2009 13:14:07 +0000 (13:14 +0000)]
Introduce jtag_get_end_state() fn to clarify code a bit.

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

15 years agotiny bit of encapsulation of global end state. No longer expose it as a global variable.
oharboe [Thu, 4 Jun 2009 13:05:57 +0000 (13:05 +0000)]
tiny bit of encapsulation of global end state. No longer expose it as a global variable.

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

15 years agodo not modify global end state from jtag_add_xxx()
oharboe [Thu, 4 Jun 2009 12:52:54 +0000 (12:52 +0000)]
do not modify global end state from jtag_add_xxx()

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

15 years agoremove unused code.
oharboe [Thu, 4 Jun 2009 12:42:21 +0000 (12:42 +0000)]
remove unused code.

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

15 years agono longer use jtag_add_xxx() to set end state to TAP_DRPAUSE
oharboe [Thu, 4 Jun 2009 12:12:38 +0000 (12:12 +0000)]
no longer use jtag_add_xxx() to set end state to TAP_DRPAUSE

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

15 years agono longer use jtag_add_xxx() to set end state to TAP_IDLE. Same must be done for...
oharboe [Thu, 4 Jun 2009 12:06:31 +0000 (12:06 +0000)]
no longer use jtag_add_xxx() to set end state to TAP_IDLE. Same must be done for TAP_DRPAUSE

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

15 years agouse assert() to catch TAP_INVALID passed to jtag_add_xxx() fn's.
oharboe [Thu, 4 Jun 2009 11:42:34 +0000 (11:42 +0000)]
use assert() to catch TAP_INVALID passed to jtag_add_xxx() fn's.

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

15 years agoremove TAP_INVALID as argument to jtag_add_xxx() fn's
oharboe [Thu, 4 Jun 2009 11:33:36 +0000 (11:33 +0000)]
remove TAP_INVALID as argument to jtag_add_xxx() fn's

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

15 years agojtag_add_end_state() now returns the value of the global variable and does not modify...
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.

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

15 years agoJTAG_TRST_ASSERTED event cleanup. More clear where and when it is invoked and some...
oharboe [Thu, 4 Jun 2009 06:56:22 +0000 (06:56 +0000)]
JTAG_TRST_ASSERTED event cleanup. More clear where and when it is invoked and some duplicate(harmless) invocations avoided.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Thu, 4 Jun 2009 01:17:27 +0000 (01:17 +0000)]
David Brownell <david-b@pacbell.net>:

Remove pernicious whitespace from ft2232 driver; as usual,
end-of-line noise, but here also much line-internal stuff.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Thu, 4 Jun 2009 00:56:41 +0000 (00:56 +0000)]
David Brownell <david-b@pacbell.net>:

Remove pernicious whitespace from src/jtag/*c files; mostly
the end-of-line flavor for now, although there's more.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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...)

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Thu, 4 Jun 2009 00:51:02 +0000 (00:51 +0000)]
David Brownell <david-b@pacbell.net>:

Convert the str9xpec driver info to use @deffn; alphabetize;
add the missing part_id command.

Convert the mflash support to use @deffn; alphabetize.

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

15 years agouse assert() for obscure check on illegal arguments upon trst being asserted while...
oharboe [Wed, 3 Jun 2009 16:36:01 +0000 (16:36 +0000)]
use assert() for obscure check on illegal arguments upon trst being asserted while commands are queued

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

15 years agoremove unused code path.
oharboe [Wed, 3 Jun 2009 12:12:21 +0000 (12:12 +0000)]
remove unused code path.

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

15 years agocatchup with jtag refactoring.
oharboe [Wed, 3 Jun 2009 07:55:56 +0000 (07:55 +0000)]
catchup with jtag refactoring.

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

15 years agoMove JTAG command handling implementation into its own source file.
zwelch [Wed, 3 Jun 2009 07:06:37 +0000 (07:06 +0000)]
Move JTAG command handling implementation into its own source file.

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

15 years agoFinish JTAG header file modularization; command factoring follows.
zwelch [Wed, 3 Jun 2009 06:29:09 +0000 (06:29 +0000)]
Finish JTAG header file modularization; command factoring follows.

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

15 years agoadded missing extern to jtag_command_queue definition.
oharboe [Wed, 3 Jun 2009 06:27:57 +0000 (06:27 +0000)]
added missing extern to jtag_command_queue definition.

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

15 years agoMove JTAG command APIs into new jtag/commands.h header file.
zwelch [Wed, 3 Jun 2009 06:08:07 +0000 (06:08 +0000)]
Move JTAG command APIs into new jtag/commands.h header file.

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

15 years agoImprove remaining documentation that was causing Doxygen warnings.
zwelch [Wed, 3 Jun 2009 04:44:38 +0000 (04:44 +0000)]
Improve remaining documentation that was causing Doxygen warnings.

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

15 years agoImprove in-source documentation that was causing Doxygen warnings.
zwelch [Wed, 3 Jun 2009 04:37:51 +0000 (04:37 +0000)]
Improve in-source documentation that was causing Doxygen warnings.

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

15 years agoAdd architectural introduction to the JTAG module in The Manual.
zwelch [Wed, 3 Jun 2009 02:57:55 +0000 (02:57 +0000)]
Add architectural introduction to the JTAG module in The Manual.

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

15 years agoImprove logger script to expose warnings and errors in the output.
zwelch [Wed, 3 Jun 2009 02:56:20 +0000 (02:56 +0000)]
Improve logger script to expose warnings and errors in the output.

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

15 years agoImprove doxygen markup of PATCHES file, link to new primer.
zwelch [Wed, 3 Jun 2009 02:17:26 +0000 (02:17 +0000)]
Improve doxygen markup of PATCHES file, link to new primer.

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

15 years agoAdd draft of Patching Primer in The Manual; update primer page.
zwelch [Wed, 3 Jun 2009 02:12:44 +0000 (02:12 +0000)]
Add draft of Patching Primer in The Manual; update primer page.

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

15 years agoUpdate TODO file with more content and better style.
zwelch [Wed, 3 Jun 2009 02:11:09 +0000 (02:11 +0000)]
Update TODO file with more content and better style.

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

15 years agoEnable or add doxygen comments to the public JTAG API.
zwelch [Wed, 3 Jun 2009 01:51:04 +0000 (01:51 +0000)]
Enable or add doxygen comments to the public JTAG API.

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

15 years agoUpdate documentationf or jtag_interface structure members.
zwelch [Wed, 3 Jun 2009 01:39:04 +0000 (01:39 +0000)]
Update documentationf or jtag_interface structure members.

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

15 years agoRemove vestigal tap_transition type from public jtag API.
zwelch [Wed, 3 Jun 2009 01:29:01 +0000 (01:29 +0000)]
Remove vestigal tap_transition type from public jtag API.

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

15 years agoRemove interface.h from public JTAG header, include it where required.
zwelch [Wed, 3 Jun 2009 01:26:01 +0000 (01:26 +0000)]
Remove interface.h from public JTAG header, include it where required.

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

15 years agoExpose tap_state_by_name TAP helper available in public API.
zwelch [Wed, 3 Jun 2009 01:23:48 +0000 (01:23 +0000)]
Expose tap_state_by_name TAP helper available in public API.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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)

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

15 years agoMove the JTAG cable interface API implementation
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.

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

15 years agoAdd missed accessor for checking the current TMS table.
zwelch [Wed, 3 Jun 2009 00:33:22 +0000 (00:33 +0000)]
Add missed accessor for checking the current TMS table.

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

15 years agoSplit and simplify handle_tms_sequence_command for further factoring.
zwelch [Wed, 3 Jun 2009 00:24:21 +0000 (00:24 +0000)]
Split and simplify handle_tms_sequence_command for further factoring.

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

15 years agoMake tap_state_by_name available in new JTAG interface API header.
zwelch [Wed, 3 Jun 2009 00:17:42 +0000 (00:17 +0000)]
Make tap_state_by_name available in new JTAG interface API header.

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

15 years agoAdd private src/jtag/interface.h for use by JTAG interface drivers:
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.

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

15 years agoFinish removing '#ifdef HAVE_JTAG_MINIDRIVER_H' from jtag.h:
zwelch [Tue, 2 Jun 2009 23:21:18 +0000 (23:21 +0000)]
Finish removing '#ifdef HAVE_JTAG_MINIDRIVER_H' from jtag.h:
- Wraps JTAG callback API functions:
  - Outlines jtag_add_callback() and jtag_add_callback4().
  - Adds interface_ prefix to existing in-tree driver implementation.
  - Declare the driver interfaces routines in miniheader.h file.

This patch requires renaming the equivalent macros in out-of-tree
jtag_minidriver.h implementations.

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

15 years agoAdd header file for JTAG minidriver:
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.

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

15 years ago- change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_...
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].

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

15 years ago- hack added to fix a issue with v5/6 jlink
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

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

15 years agoremove unecessary #ifdef as file is only built when minidriver is enabled.
oharboe [Tue, 2 Jun 2009 13:37:06 +0000 (13:37 +0000)]
remove unecessary #ifdef as file is only built when minidriver is enabled.

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

15 years agosome trivial minidriver fixes
oharboe [Tue, 2 Jun 2009 10:09:53 +0000 (10:09 +0000)]
some trivial minidriver fixes

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

15 years agomore missing eCos types
oharboe [Tue, 2 Jun 2009 10:07:47 +0000 (10:07 +0000)]
more missing eCos types

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

15 years agoOnly include jtag_driver.c in the build when minidriver is not in use.
zwelch [Tue, 2 Jun 2009 08:29:03 +0000 (08:29 +0000)]
Only include jtag_driver.c in the build when minidriver is not in use.

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

15 years agoMove interface_jtag_add_scan_check_alloc implementations to their
zwelch [Tue, 2 Jun 2009 08:04:21 +0000 (08:04 +0000)]
Move interface_jtag_add_scan_check_alloc implementations to their
respective implementation files.

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

15 years agoAdd high-speed device support in FT2232 driver:
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>.

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

15 years agoRemove unused code, TAP_INVALID is never passed to drivers.
oharboe [Tue, 2 Jun 2009 07:21:44 +0000 (07:21 +0000)]
Remove unused code, TAP_INVALID is never passed to drivers.

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

15 years agoContinue clean-up of JTAG driver interface:
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.

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

15 years agoMore JTAG interface driver cleanup:
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.

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

15 years agoMore JTAG interface driver cleanup:
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.

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

15 years agoMore JTAG interface driver cleanup:
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.

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

15 years agoClean up jtag command queue handling:
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.

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

15 years agoEncapsulate JTAG command interfaces for moving to jtag_interface.h.
zwelch [Tue, 2 Jun 2009 04:55:05 +0000 (04:55 +0000)]
Encapsulate JTAG command interfaces for moving to jtag_interface.h.

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

15 years agoRemove the useless invalidstruct from jtag.h.
zwelch [Tue, 2 Jun 2009 04:31:49 +0000 (04:31 +0000)]
Remove the useless invalidstruct from jtag.h.

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

15 years agoStart clean-up of JTAG driver interface:
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.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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.

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

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

Whitespace fixes in jtag.c ... mostly end-of-line crap.
Flag "jtag_device" command as obsolete in its helptext.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
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).

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 23:06:17 +0000 (23:06 +0000)]
David Brownell <david-b@pacbell.net>:

This is the missing half of the r1974 patch:
OSK5912 board support, which was split out from
the omap5912 target config.

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

15 years agoEncapsulate JTAG Cable API and interface structure, plan for new header file.
zwelch [Mon, 1 Jun 2009 23:01:24 +0000 (23:01 +0000)]
Encapsulate JTAG Cable API and interface structure, plan for new header file.

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

15 years agoEncapsulate JTAG minidriver functions, plan for new header file.
zwelch [Mon, 1 Jun 2009 22:54:42 +0000 (22:54 +0000)]
Encapsulate JTAG minidriver functions, plan for new header file.

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

15 years agoRemove unused in_handler_t type definition from jtag.h
zwelch [Mon, 1 Jun 2009 21:54:35 +0000 (21:54 +0000)]
Remove unused in_handler_t type definition from jtag.h

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

15 years agoScrub final vestiges of in_handler from mips target APIs.
zwelch [Mon, 1 Jun 2009 21:53:19 +0000 (21:53 +0000)]
Scrub final vestiges of in_handler from mips target APIs.

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

15 years agoadded jtag_add_statemove() helper fn(actual fn written by Dick Hollonbeck, I just...
oharboe [Mon, 1 Jun 2009 19:58:20 +0000 (19:58 +0000)]
added jtag_add_statemove() helper fn(actual fn written by Dick Hollonbeck, I just moved it).

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

15 years agofix warning for a variable that GCC thought might be uninitialized(which it can't...
oharboe [Mon, 1 Jun 2009 19:06:11 +0000 (19:06 +0000)]
fix warning for a variable that GCC thought might be uninitialized(which it can't be).

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

15 years agosimon qian <simonqian.openocd@gmail.com> stop incestious communication with lower...
oharboe [Mon, 1 Jun 2009 19:00:54 +0000 (19:00 +0000)]
simon qian <simonqian.openocd@gmail.com> stop incestious communication with lower jtag.c layers

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 03:06:46 +0000 (03:06 +0000)]
David Brownell <david-b@pacbell.net>:

Uplevel the arch commands to be a chapter; they really
don't fit in the "general commands" category.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 03:06:25 +0000 (03:06 +0000)]
David Brownell <david-b@pacbell.net>:

Fix minor goofage in previous doc updates:

 * The ETM dummy driver name is "dummy" not "etm_dummy";
   re-alphabetize.

 * DCC trace message mode "charmsg" is a format type
   (and what Linux needs)

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 03:06:11 +0000 (03:06 +0000)]
David Brownell <david-b@pacbell.net>:

Various updates, mostly small/formatting changes:

 * Small content tweaks:
    - Re-title:  "OpenOCD User's Guide".
    - For users, URLS for latest doc and SparkFun forum
    - Mention GIT-SVN
 * Fix some front-matter goofage, matching texinfo docs:
    - "paragraphintent" location matters
    - put release version/date description with the copyright
 * Fix some other stuff matching texinfo docs:
    - no tabs
    - tweak some refs and anchors
 * whitespace-at-end-o-line fixes

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 03:05:59 +0000 (03:05 +0000)]
David Brownell <david-b@pacbell.net>:

Split out OSK5912 board support from the omap5912 target config, and make
it pass sanity checks on my (Rev C/original) hardware:

 - Fix syntax error ("-irlen" not "irlen")
 - Provide real TAP ids for the ARM926ejs and the C55x dsp
 - Label both CPUs appropriately (DSP, ARM)
 - List both flash chips

The scan chain looks like this (note truncated DSP instruction code):

      TapName            | Enabled |   IdCode      Expected    IrLen IrCap  IrMask Instr
 ---|--------------------|---------|------------|------------|------|------|------|---------
  0 | omap5912.dsp       |    Y    | 0x03df1d81 | 0x03df1d81 | 0x26 | 0x00 | 0x00 | 0xffffffff
  1 | omap5912.arm       |    Y    | 0x0692602f | 0x0692602f | 0x04 | 0x01 | 0x00 | 0x0c
  2 | omap5912.unknown   |    Y    | 0x00000000 | 0x00000000 | 0x08 | 0x00 | 0x00 | 0xff

I still don't know what that third TAP is; maybe an early version of
an ICEpick JTAG router.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 03:05:42 +0000 (03:05 +0000)]
David Brownell <david-b@pacbell.net>:

Whitespace fixes.

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

15 years agoDavid Brownell <david-b@pacbell.net>:
zwelch [Mon, 1 Jun 2009 03:05:26 +0000 (03:05 +0000)]
David Brownell <david-b@pacbell.net>:

Remove broken whitespace ... mostly at end of line, but
also in some cases blocks of inappropriate empty lines.

And spell "comamnd" right. :)

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

15 years agoFinal step in isolating target_type_s structure:
zwelch [Sun, 31 May 2009 12:38:28 +0000 (12:38 +0000)]
Final step in isolating target_type_s structure:
- Move definition of 'struct target_type_s' into new 'target_type.h' file.
- Forward delclaration remains in target.h, with comment pointing to new file.
- Replaces #define with #include in source files.

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

15 years agoWhitespace-only updates to automake input files:
zwelch [Sun, 31 May 2009 12:10:57 +0000 (12:10 +0000)]
Whitespace-only updates to automake input files:
- use continuations to break long lines of variable assignments
- makes these variables more patch-friendly and conform to style guide

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

15 years agoFirst step in hiding target_type_s from public interface:
zwelch [Sun, 31 May 2009 11:32:28 +0000 (11:32 +0000)]
First step in hiding target_type_s from public interface:
- Add DEFINE_TARGET_TYPE_S symbol in files that need it defined.
- Forward declare 'struct target_type_s' only, unless that symbol is defined.

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

15 years agoAdd target_examine_one wrapper:
zwelch [Sun, 31 May 2009 11:32:10 +0000 (11:32 +0000)]
Add target_examine_one wrapper:
- replaces all calls to target->type->examine.

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

15 years agoAdd target breakpoint and watchpoint wrapper:
zwelch [Sun, 31 May 2009 11:31:52 +0000 (11:31 +0000)]
Add target breakpoint and watchpoint wrapper:
- replaces all calls to target->type->{add,remove}_{break,watch}point.

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

15 years agoAdd target_get_name wrapper:
zwelch [Sun, 31 May 2009 11:31:27 +0000 (11:31 +0000)]
Add target_get_name wrapper:
- replaces all accesses to target->type->name.
- add documentation in target_s to warn not to access field directly.

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

15 years agoAdd target_step wrapper:
zwelch [Sun, 31 May 2009 11:31:11 +0000 (11:31 +0000)]
Add target_step wrapper:
- replaces all calls to target->type->step.

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

15 years agoAdd target_get_gdb_reg_list wrapper:
zwelch [Sun, 31 May 2009 11:30:59 +0000 (11:30 +0000)]
Add target_get_gdb_reg_list wrapper:
- replaces all calls to target->type->get_gdb_reg_list.
- add documentation in target_s to warn not to invoke callback directly.

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

15 years agoAdd target_bulk_write_memory wrapper:
zwelch [Sun, 31 May 2009 09:39:04 +0000 (09:39 +0000)]
Add target_bulk_write_memory wrapper:
- replaces all calls to target->type->bulk_write_memory.
- add documentation in target_s to warn not to invoke callback directly.

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

15 years agoAdd wrappers for target->type->examined:
zwelch [Sun, 31 May 2009 09:38:43 +0000 (09:38 +0000)]
Add wrappers for target->type->examined:
- replace all checks of target->type->examined with target_was_examined().
- replace all setting of target->type->examined with target_set_examined().
- replace clearing of target->type->examined with target_reset_examined().
- add documentation in target_s to warn not to access field directly.

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

15 years agoAdd target_run_algorithm wrapper:
zwelch [Sun, 31 May 2009 09:38:20 +0000 (09:38 +0000)]
Add target_run_algorithm wrapper:
- replaces all calls to target->type->run_algorithm.
- add documentation in target_s to warn not to invoke callback directly.

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

15 years agoAdd target_write_memory wrapper:
zwelch [Sun, 31 May 2009 09:37:57 +0000 (09:37 +0000)]
Add target_write_memory wrapper:
- replaces all calls to target->type->write_memory.
- add documentation in target_s to warn not to invoke callback directly.

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

15 years agoAdd target_read_memory wrapper:
zwelch [Sun, 31 May 2009 09:37:35 +0000 (09:37 +0000)]
Add target_read_memory wrapper:
- replaces all calls to target->type->read_memory.
- add documentation in target_s to warn not to invoke callback directly.

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

15 years agoSimplify the handle_md_command routine in target.c:
zwelch [Sun, 31 May 2009 06:00:28 +0000 (06:00 +0000)]
Simplify the handle_md_command routine in target.c:
 - fix buffer overrun in mdw; final '\0' would overflow the output buffer.
 - return ERROR_COMMAND_SYNTAX_ERROR instead of ERROR_OK if:
   - less than one argument is provided
   - the command is called with a name other than mdb, mdh, or mdw.
 - factor all command output into new handle_md_output function

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

15 years agoMake nvp_target_event static; remove its external declaration.
zwelch [Sun, 31 May 2009 04:58:51 +0000 (04:58 +0000)]
Make nvp_target_event static; remove its external declaration.

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

15 years agoMake target_buffer_get_uXX interfaces work with constant buffers.
zwelch [Sun, 31 May 2009 02:18:26 +0000 (02:18 +0000)]
Make target_buffer_get_uXX interfaces work with constant buffers.

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