Commit Graph

669 Commits

Author SHA1 Message Date
Paul Fertser 571db89aa1 flash/nor/stellaris: allow to recover a locked device that can't be examined
Change-Id: I28536184053e2d1ba906620e728f7fad6ba39f0a
Reported-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2552
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Ed Beroset <beroset@ieee.org>
2015-03-09 08:58:16 +00:00
Austin Morton 1d0cf0df37 server: tcl_notifications command
Implements async target notifications to the tcl server

Change-Id: I4d83e9fa209e95426c440030597f99e9f0c3b260
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Reviewed-on: http://openocd.zylin.com/2336
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09 06:30:30 +00:00
Nemui Trinomius 199acf668e lpc2000: Add LPC407x/8x flash size auto detection
This patch adds auto flash size detection for LPC407x/8x series.

Tested on below listed chips.
LPC4088
LPC1788(regression test)

Change-Id: I82f62678a04eac9b84658bd6d1cfdf45be64c931
Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp>
Reviewed-on: http://openocd.zylin.com/2555
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Jens Bauer <jens@gpio.dk>
2015-03-09 06:26:06 +00:00
Robert P. J. Day 41124ea992 Remove long-deprecated "target count" and "target number" commands.
Given that the manual states that these two subcommands are
deprecated and were scheduled to be removed back in 2010,
remove them and the corresponding documentation from the
manual.

Change-Id: Iaac633349d7fcb8b7f964109c7d26dd0cc5fc233
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1860
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-22 17:56:16 +00:00
Paul Fertser 986102f3f1 doc: stellaris driver supports Tiva C too
Change-Id: I3b77bf0617c0bbba85cfd678adece57aa7d03e32
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2509
Tested-by: jenkins
2015-02-12 12:57:13 +00:00
Paul Fertser c4113b5f3d README, doc: add mrvlqspi flash driver information
Change-Id: I7a270cdaf3d9119aa75285a8d1e063c2fe2a31b7
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2510
Tested-by: jenkins
2015-02-12 12:52:19 +00:00
Paul Fertser 70c8328750 doc, README: mention all the variants supported by lpc2000 driver
Change-Id: I66f9a201426a68fc1314ab7f02b27e36dcab33ba
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2508
Tested-by: jenkins
2015-02-12 12:51:46 +00:00
Paul Fertser 30f802493d flash/startup: extend "program" command to accept "exit"
This optional argument tells OpenOCD to exit after finishing (either
succesfully, or with an error) the programming sequence. Without it
OpenOCD stays running.

Change-Id: I6ecaf33ff985eea9a9cd02ff644a74403ae3e1e5
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2492
Tested-by: jenkins
Reviewed-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-11 22:19:37 +00:00
Andreas Bomholtz bdbe78f131 sim3x: new flash driver for Silabs SiM3 microcontroller family
This is a new driver for Silicon Laboratories SiM3 microcontroller
family, based on the work of Ladislav Bábel. The driver will try to
detect the type of MCU from the device id register, and if this
fails it will use the flash size from the flash bank command.
Driver added to the documentation and to the README.
TCL script added.

Tests:
* Hardware: SiM3C166 (pre-production) and SiM3U167
* Binary: 4kb, 197kb, 256kb
* Flash protect not tested

Change-Id: I701e0cf505ca8ad99be7f83543fe5055b2f65dcc
Signed-off-by: Andreas Bomholtz <andreas@seluxit.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2078
Tested-by: jenkins
2015-02-11 22:05:22 +00:00
Joerg Fischer fb9277191b J-Link serial number config option
Add serial option to jlink config commands, handy when there is more than one
adapter connected.

To select adapter 0123456 for OpenOCD, use

jlink serial 0123456

Change-Id: Ib29ce3f0c4975e1169211721a4531bf4db61f1ee
Signed-off-by: Joerg Fischer <turboj@gmx.de>
Reviewed-on: http://openocd.zylin.com/2521
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-11 16:18:25 +00:00
Paul Fertser 7f000f824b doc: document the OCL (on chip flash loader) driver
Change-Id: I8afe870c7a16b04473f4822c2df9a7607f0480e7
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2529
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-11 15:33:50 +00:00
Tomas Vanek 1d7176f50b psoc4: support for Cypress PSoC 41xx/42xx family
New NOR flash driver was derived from stm32lx.
Procedure ocd_process_reset_inner is overriden in psoc4.cfg
to handle reset halt and system ROM peculiarities.

Change-Id: Ib835324412d106ad749e1351a8e18e6be34ca500
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/2282
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-11 14:59:55 +00:00
Paul Fertser 873774992d flash/nor/stm32lx: use 0 base to autodetect second bank location
Change-Id: I3c296b3e276fcd4d92e4180fc0d2133eebfcc240
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2503
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-04 22:02:45 +00:00
Paul Fertser 97c96ac13f doc: add stm32lx mass_erase description
Change-Id: Ibe26f40a105dfabcf336ae12fcdc72f4e87513b6
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2502
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-02-04 22:02:36 +00:00
Spencer Oliver d12fa18bd9 docs: update bug tracker URL
Change-Id: I6a362020a29ccb9222f7909b5b34e5c35a02ed4b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2454
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-01-15 23:14:14 +00:00
Alexei Colin fd25b3bcd1 doc: flash: write_image writes only loadable sections
The code that takes only sections marked PT_LOAD is in
image_elf_read_headers in src/target/image.c

(Just trying to save some time for the next person with same question.)

Change-Id: I493c102c908fca2b7238276ddbbecbe8c7cd9a0a
Signed-off-by: Alexei Colin <ac@alexeicolin.com>
Reviewed-on: http://openocd.zylin.com/2348
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-11-24 22:22:25 +00:00
Spencer Oliver 885f438814 cmsis-dap: add serial number support
Change-Id: I66926d1013e2b3a43ce0d18d3599771428706b6a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2329
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-16 12:30:50 +00:00
Paul Fertser 1f6a66ab7f hla: add a way to pass arbitrary commands from user to layout and use for ICDI
TI's ICDI adapter supports some additional commands which a user might
want to run for debugging or other purposes, the most useful of them
being "debug unlock" that fully mass-erases the device and unprotects
the flash.

Change-Id: I26990e736094367f92106fa891e9bb8fb0382efb
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2263
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06 12:03:30 +00:00
Andrey Yurovsky db4b2c2536 at91samd: fix protect, add EEPROM and boot commands
There were two problems with the _protect() feature:
1. The address written was off by a factor of two because the address
register takes 16-bit rather than 8-bit addresses.  As a result the
wrong sectors were (un)protected with the protect command.  This has
been fixed.
2. The protection settings issued via the lock or unlock region commands
don't persist after reset.  Making them persist requires modifying the
LOCK bits in the User Row using the infrastructure described below.

The Atmel SAMD2x MCUs provide a User Row (the size of which is one
page).  This contains a few settings that users may wish to modify from
the debugger, especially during production.  This change adds commands
to inspect and set:
- EEPROM size, the size in bytes of the emulated EEPROM region of the
  Flash.
- Bootloader size, the size in bytes of the protected "boot" section of
  the Flash.

This is done by a careful read-modify-write of the special User Row
page, avoiding erasing when possible and disallowing the changing of
documented reserved bits.  The Atmel SAMD20 datasheet was used for bit
positions and descriptions, size tables, etc. and testing was done on a
SAMD20 Xplained Pro board.

It's technically possible to store arbitrary user data (ex: serial
numbers, MAC addresses, etc) in the remaining portion of the User Row
page (that is, beyond the first 64 bits of it).  The infrastructure used
by the eeprom and bootloader commands can be used to access this as
well, and this seems safer than exposing the User Row as a normal Flash
sector that openocd understands due to the delicate nature of some of
the data stored there.

Change-Id: I29ca1bdbdc7884bc0ba0ad18af1b6bab78c7ad38
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/2326
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06 11:56:40 +00:00
Andrey Yurovsky 592d0d514d at91samd: add erase/secure commands, minor fix
Reference code for the SAMD2x disables caching in the NVM controller when
issuing NVM commands.  Let's do this as well to be consistent and safer.

Add a "chip-erase" for the Atmel SAMD targets that issues a complete Chip Erase
via the Device Service Unit (DSU).  This can be used to "unlock" or otherwise
unbrick a chip that can't be halted or inspected, allowing the user to reflash
with new firmware.

Add a "set-security" command which issues an SSB.  Once that's done and the
device is power-cycled, the flash cannot be written to until a "chip-erase" is
issued.  The chip-erase cannot be issued by openocd at this time because
the device will not respond to a request for the DAP IDCODE.

Change-Id: I80122f0bbf7e3aedffe052c1e77d69dc2dba25ed
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/2239
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-10-06 11:56:27 +00:00
Paul Fertser 9c47dc9e8e doc/openocd.texi: add SWD to the transports supported by jlink
Since 6733253219 jlink adapter driver
supports SWD in addition to JTAG.

Change-Id: I9376aa02d9281f3e2734d8f127cd42162633d95b
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2324
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-29 20:12:30 +00:00
Andreas Fritiofson 1c021ed0af target: Remove "-variant" argument
Remove this underutilized feature. Despite the fact that a lot of configs
specifies a arbitrary "variant", only the xscale target actually defines
any.

In the case of xscale, the use of -variant is dubious since

1) it's used as a redundant irlen specifier,
2) it carries a comment that it doesn't really need it and
3) only two xscale configs even specify it.

If there's a future target that needs a variant set, a target specific
option could be added when needed.

Change-Id: I1ba25a946f0d80872cbd96ddcc48f92695c4ae20
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2283
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22 19:39:24 +00:00
Austin Phillips 7568a91c8e Support hla_serial command for ST-LINK adapters.
The hla_serial command allows for a programming device serial number to be
specified in addition to USB VID/PID.  This allows for multiple ST-LINK/V2
programmers to be attached to a single machine and operated using openocd.

Change-Id: I350654bf676eb26ba3a90450acfa55d2a5d2d791
Signed-off-by: Austin Phillips <austin_phillips@hotmail.com>
Reviewed-on: http://openocd.zylin.com/2198
Tested-by: jenkins
Reviewed-by: Martin Glunz <mg@wunderkis.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-09-22 19:36:05 +00:00
Paul Fertser a87e699edf jtag/drivers/ftdi: add option to declare signal aliases
This adds -alias|-nalias options to ftdi_layout_signal command that
allow to declare a new signal based on an already defined one.

Change-Id: I552578ebcd12ae21957a1c0d3b7e878adeff6df0
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2181
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28 09:36:02 +00:00
Cosmin Gorgovan 5fccaa2c8b Flash/LPC2000: Add support for auto-probing flash size
Adds support for auto-probing on devices which support the IAP
Read Part ID command. Includes IDs for all LPC17XX, LPC13XX,
LPC11XX and LPC11XXX devices with publicly available user
manuals.

To use auto-probing, select the 'auto' lpc2000 variant.

Change-Id: Ic617c32925c9ebe0e9d9192ed8ddbfa08e9f0aaa
Signed-off-by: Cosmin Gorgovan <cosmin@linux-geek.org>
Reviewed-on: http://openocd.zylin.com/2075
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-01 18:10:01 +00:00
Cosmin Gorgovan 99d440cbba Flash/LPC2000: Add support for LPC11(x)xx, LPC13xx
LPC11(x)xx and LPC13xx devices are mostly compatible with the lpc1700
variant of the LPC2000 driver, but use a fixed flash sector size of 4KB.

Change-Id: I033515f4ff6bc61d3b9babd27096f78c99cea927
Signed-off-by: Cosmin Gorgovan <cosmin@linux-geek.org>
Reviewed-on: http://openocd.zylin.com/2071
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-06-01 18:07:23 +00:00
Paul Fertser b1beaa36e2 doc: document [start end] parameters of "profile" command
Change-Id: I56561b08304e5b854a67b06ab6b9cee7a24919b2
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2115
Tested-by: jenkins
2014-05-05 20:24:46 +00:00
Paul Fertser 207237b920 tcl: introduce init_target_events and use it for gdb flashing events
This introduces a new global Tcl procedure that is run just after
init_targets and before init_boards.

Its default behaviour is to assign gdb-flash-erase-start and
gdb-flash-write-end to reasonable defaults.

The rationale for doing "reset init" before gdb erases and flashes
memory is that all flash drivers are written in assumption that they
can safely be used only after chip reset (plus chip-specific
configuration in the init handler if any). The need to use "reset
halt" after flashing is because a user expects running firmware after
loading to be the same as running it from power-on-reset.

Change-Id: I9ddc4047611904ca4ca779b73376d2739611948a
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2062
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-29 08:40:03 +00:00
Paul Fertser 7462179c38 openocd.texi: document Tcl RPC and add an example client
This should provide enough information to start using OpenOCD RPC.

I've seen some other example clients in different languages but I
can't find them anymore, and their legal status was unclear.

Change-Id: I3a95fe361d773040d1e52a62f9cc0cc655019a9f
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1915
Tested-by: jenkins
Reviewed-by: Andreas Ortmann <ortmann@finf.uni-hannover.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-03-17 12:45:18 +00:00
Andreas Fritiofson e3bb6d390c Rename and sort udev rules file
Also add missing entries for JTAG-lock-pick Tiny 2, Xverve Signalyzer
LITE and default FTDI VID:PIDs.

Change-Id: I41b4f15409642298d1cf134d1f8014dc8f003005
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1969
Tested-by: jenkins
2014-03-07 18:41:59 +00:00
Andrey Smirnov 7e4fb97559 nrf51: Implement the support for Nordic's nRF51 devices
Add support for Nordic's nRF51 chip series. Tested with nRF51822.

Change-Id: Id70f6fd76888cc595a353aefb84d25c4cd325d7d
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-on: http://openocd.zylin.com/1945
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-02-24 12:09:04 +00:00
Adrian Burns 1338cf60b9 quark_x10xx: add new target quark_x10xx
Intel Quark X10xx SoC debug support added
Lakemont version 1 (LMT1) is the x86 core in Quark X10xx SoC
Generic x86 32-bit code is in x86_32_common.c/h

Change-Id: If2bf77275cd0277a82558cd9895b4c66155cf368
Signed-off-by: adrian.burns@intel.com
Reviewed-on: http://openocd.zylin.com/1829
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-02-11 13:07:29 +00:00
Spencer Oliver 47d4224d48 doc: add missing reg command argument 'force'
The argument 'force' enables a user to bypass the internal cache and read
a target register directly. However it is missing from the user guide.

Change-Id: I26f689eec20b38a0dc5294626b25df566b554446
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1897
Tested-by: jenkins
2014-02-04 20:53:49 +00:00
Spencer Oliver 37d167a804 doc: update CMSIS-DAP info to match default driver behaviour
By default the driver will now auto detect attached adapters, it does not
use an internal list any more. Update docs to match this.

Change-Id: I62a9d243cd236a8cf54cbd9d088c4837a8df31bf
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1902
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-02-04 13:17:04 +00:00
Andreas Fritiofson 957c324204 doc: Add Gerrit to the Developer resources section
Change-Id: Icbf2050967cea06b05a09574a6a91ce1407a489f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1885
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-20 13:30:32 +00:00
Robert P. J. Day ee019bf5f8 Grammatical cleanup to Tcl Scripting chapter of User's Guide
Changes solely to the Tcl Scripting API chapter of the UG:

* Some grammatical cleanup
* Fix formatting issues (@example and @verbatim formatting)
* Add references to missing OSes OpenBSD, NetBSD and eCos.

Change-Id: I3ec1a192a0b1e0a207dceb76fd39008d01e287a5
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1872
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-15 12:40:00 +00:00
Robert P. J. Day 5baed52390 A few more grammar and typo fixes from the User's Guide.
More cleanup from some of the later chapters from the User's Guide,
no functional changes.

Change-Id: Ib2860fc2574503e8107935d79db45fa96014fe3a
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1863
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11 22:19:27 +00:00
Robert P. J. Day acc67744c0 Remove obsolete tip referring to 2010 removal of TAP numbers.
Remove a tip describing the discouraged use of TAP numbers, and how
these numbers would be removed by mid-2010.

Change-Id: Iebe7e2e4a0f8e1f18a91d7935588dd9ced2b398d
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1862
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11 22:19:22 +00:00
Robert P. J. Day 1520e37719 Proofreading, typo and grammar fixes to Ch 10 User's Guide.
Various cleanups to Chapter 10 of the User's Guide, no functional
changes.

Change-Id: I055d032eacc8e85b1d8edbd4bcc505f6f0feaa49
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1861
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11 08:20:44 +00:00
Spencer Oliver 4dc8cd201c cmsis-dap: add initial cmsis-dap support
This is based on work from:
https://github.com/TheShed/OpenOCD-CMSIS-DAP/tree/cmsis-dap

Main changes include moving over to using HIDAPI rather than libusb-1.0
and cleaning up to merge into master. Support for reset using srst has
also been added.

It has been tested on all the mbed boards as well as the Freedom board
from Freescale. These boards only implement SWD mode, however JTAG mode
has been tested with a Keil ULINK2 and a stm32 target - but requires a lot
more work.

Change-Id: I96d5ee1993bc9c0526219ab754c5aad3b55d812d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1542
Tested-by: jenkins
2014-01-09 15:20:51 +00:00
Paul Fertser c8161b013c tools: add firmware recovery helpers
This adds a set of helper functions with the aim to make it possible
to flash mass-market devices without RTFMing altogether (i.e. to
obsolete GPL-violating proprietary tjtag and other similar software).

Real-life tested on an RT-N16 and WRT54GL.

Change-Id: I197a9b28a5f386803f081057c4b4ebf2f9c447b1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1850
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-08 22:18:33 +00:00
Robert P. J. Day 647eeefb53 Numerous pedantic fixes to the User's Guide, including typo fixes,
grammar fixes and so on.

Change-Id: Iaeb603447ecd9f77f1d49ce77044431442f4f219
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-on: http://openocd.zylin.com/1855
Reviewed-by: Bill Traynor <btraynor@gmail.com>
Tested-by: jenkins
Reviewed-by: Francois Lorrain <francois.lorrain@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-08 22:17:36 +00:00
Mathias K 963214c83d stlink: remove stlink_api command
Remove stlink_api command.

Change-Id: I8f7885d3756fec462f9ebbee2ed285a98a51366c
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/1760
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22 20:24:56 +00:00
Sergio Chico 93a3a82e49 topic: Support for the Xilinx BSCAN_* Virtual JTAG in Openrisc
This add support to the Xilinx BSCAN_* virtual JTAG interface.
This is the Xilinx equivalent of the Altera sld_virtual_jtag interface,
it allows a user to connect to the debug unit through the main
FPGA JTAG connection.

Change-Id: Ia438e910650cff9cbc8f810b719fc1d5de5a8188
Signed-off-by: Sergio Chico <sergio.chico@gmail.com>
Reviewed-on: http://openocd.zylin.com/1806
Tested-by: jenkins
Reviewed-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-14 21:53:16 +00:00
James G. Smith 0ebf1eb94d hla/stlink: Re-order trace parameters to allow trace output file to be optional
Re-order the "trace" parameters to allow the raw capture (log) file to
be an optional feature. The clock frequency for calculating the "Async
Clock Prescalar" is always required when enabling trace processing and
is now the first "required" parameter.

The ST-Link driver is updated to use the (required parameter)
"trace_source_hz" non-zero value as the indicator of trace being
required, rather than the now optional output file descriptor being
non-NULL.

Background: This patch is groundwork for extending the OpenOCD SWO
capture to implement other (OpenOCD built-in) ITM/DWT processing where
the core trace support is required, but there is no requirement to
store raw trace data to a configured host file. By itself this patch
is almost a functional NOP, since without the other processing in
place there is no reason NOT to specify a capture file.

Change-Id: Ibc385dd0a7adaf9bd652bceded27262fef35fd59
Signed-off-by: James G. Smith <jsmith@ecoscentric.com>
Reviewed-on: http://openocd.zylin.com/1660
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-29 22:54:34 +00:00
Paul Fertser b16a7f9f6e tcl: add memory testing functions for board diagnostics
This is a tcl implementation of public domain tests by Michael Barr,
http://www.barrgroup.com/Embedded-Systems/How-To/Memory-Test-Suite-C

The initial porting is done by Shane Volpe and posted to the mailing
list:
http://www.mail-archive.com/openocd-development@lists.berlios.de/msg16676.html

This patch includes some cosmetic amendments plus hardcodes 32bit word
size (as the code depends on memread32/memwrite32 anyway) which fixes
original code's issue of testing only the first quarter of the
specified nBytes.

Change-Id: I5f3a66f1f16fc4082c7a5a6aba338430646ed21c
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1455
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2013-10-29 22:50:33 +00:00
Spencer Oliver 1f3ca0b5b8 flash: add padded_value cmd
This adds support for setting the default value used when padding image
sections. Previously 0xff was used but some targets have an erased value
of 0x00.

Change-Id: If3df6fea3abf95b09daa3ff7be362acf991070ce
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1635
Tested-by: jenkins
2013-10-07 19:28:19 +00:00
Franck Jullien 4e79b48e2c Add new target type: OpenRISC
Add support for OpenRISC target. This implementation
supports the adv_debug_sys debug unit core. The mohor
dbg_if is not supported. Support for mohor TAP core
and Altera Virtual JTAG core are also provided.

Change-Id: I3b1cfab1bbb28e497c4fca6ed1bd3a4362609b72
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1547
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-09-26 09:52:56 +00:00
Spencer Oliver 6e40c5203a doc: correctly terminate @xref
@xref should be terminated by either a ',' or '.'.

Change-Id: I141335cd4e149992fc971c6f2c04f1dbe390c8f4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1637
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2013-09-25 13:55:42 +00:00
Franck Jullien 4b8f866aeb jtag: drivers: Add JTAP VPI client driver
This patch adds a driver for the jtag_vpi server [1]. This server is
now part of the ORPSoC version 3 (OpenRISC Reference Platform SoC).
The jtag_vpi server provides an interface between OpenOCD and a simulated
core.

[1] http://github.com/fjullien/jtag_vpi

Change-Id: I717b72cace4845f66c878581345074f99002e21a
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1609
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-09-08 15:37:51 +00:00
Spencer Oliver d79bfbb088 docs: add RTOS Support info
Currently we have very little info about the RTOS support. This should
improve that.

We also add info about what symbols are required for each supported RTOS.
This can be a trap, certainly when trying to use FreeRTOS support.

Change-Id: Ie57858571daca97515292ff5738a5a5ef55655b7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1538
Tested-by: jenkins
2013-08-29 13:01:37 +00:00
Pushpal Sidhu 1d4b0090e7 Added new ftdi interface device
Added new configuration file for gw16042 device.
Also added this to interface/ftdi examples in documentation.

Change-Id: I07bb10bfc79a5d13007288cd57f254d889075214
Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
Reviewed-on: http://openocd.zylin.com/1563
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-29 07:56:38 +00:00
Franck Jullien 15b69bf880 doc: Add gdb target description commands
Change-Id: Ie74917082e894cfa8ee2258f7a8cdf7d58ee4a59
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1552
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-29 07:54:41 +00:00
Pushpal Sidhu a4d3446514 doc: update GW16042 hardware information
Fixed a typo in device name as well updated device URL. Also fixed
miscategorization and moved it to USB FT2232 Based section.

Change-Id: Ia3acaed4209eff26244efea8db68046143ecea37
Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
Reviewed-on: http://openocd.zylin.com/1553
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-19 13:59:59 +00:00
Spencer Oliver 2918eb7d94 docs: remove mixed case typo
Change-Id: Iae40c59ed21e72931d440814d112b3cd752aad9c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1540
Tested-by: jenkins
2013-08-07 21:04:00 +00:00
Andrey Yurovsky d998ea40f3 stlink: add SWO tracing support
Enable reading the SWO trace output via STLinkv2 dongles that support
it.

This adds an optional initialization parameter "trace" with which the user
specifies a destination file where SWO trace output is appended as it comes in
as well as the trace module's source clock rate.

STLink will be configured for a 2MHz SWO data rate (STLink's highest
supported rate) if the source clock is > 2MHz, otherwise the source
clock is used as the data rate directly.

For example:

trace swo.log 168000000

If "trace" is specified with a usable file path, the stlink_usb driver will
attempt to configure and read SWO trace data as follows:
- on _run(), the target's TPI and TMI are configured and the STLinkv2 is told
  to enable tracing.  Only generic ARM TPI and TMI registers are
  configured, any MCU-specific settings (ex: pin routing) are the
  responsibility of the target firmware.  The configuration applied is
  based on the STLinkv2's capabilities (UART emulation).
- on _v2_get_status(), the trace data (if any) is fetched from the
  STLink after the target status is checked and the target is found to
  be running.
- on _halt(), the STLink is told to disable tracing.

When fetching trace data, the entire trace frame is written to the output file
and that data is flushed.  An external tool may be used to parse the
trace data into a more human-readable format.

Tested on ARM Cortex M4F and M3 MCUs (STM32F407 and STM32L152).

Change-Id: Ic3983d46c82ba77010c23b0e18ce7b275d917f12
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1524
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-07 21:02:28 +00:00
Spencer Oliver 1018e1e4c8 docs: add missing embKernel rtos arg to docs
Change-Id: Ib304a2bf272d281f6cd124ffca95b32531d57899
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1529
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2013-08-01 10:29:18 +00:00
Paul Fertser 962b3eb40c Add BCM2835 (as found in Raspberry Pi) interface driver
This adds support for JTAG programming by bitbanging GPIOs exposed on
the RaspberryPi's expansion header.

Tested by connecting directly to an STM32VLDiscovery board, without any
additional circuity. I observed maximum about 4MHz on the TCK pin with an
old analogue 'scope and about 100kHz when setting the speed to 100kHz.
Busyloop waiting is needed because even with a single 0ns nanosleep call
(with FIFO priority) it lowers the TCK speed to ~30kHz which is way too low
to be useful.

The speed testing with adapter_khz 2000 gave the following results:
sudo chrt -f 1 nice -n -19 ./src/openocd \
     -f interface/raspberrypi-native.cfg \
     -c "set WORKAREASIZE 0x2000" \
     -f target/stm32f1x.cfg -c "adapter_khz 2000"

wrote 131072 bytes from file random.bin in 3.973677s (32.212 KiB/s)
dumped 131072 bytes in 1.445699s (88.538 KiB/s)

This is 3.7 times faster for writing and 14.3 times faster for reading
compared to the generic sysfsgpio driver; probably the writing speed is
limited by the target itself here and reading speed might be considerably
higher too with appropriate connection and a capable target.

BCM2835 name is choosen over BCM2708 because the published peripherals
datasheet uses the particular model name and not family name.

Change-Id: Ib78168be27f53c2a3c88c3dd8154d1190c318c78
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/758
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-10 09:39:48 +00:00
William M.A. Traynor 7d8b046187 user guide: Update the ZY1000 description.
As per request from Peter at Ultimate Solutions, updated the
description of the ZY100 Stand-alone JTAG probe.

Signed-off-by: Bill Traynor <wmat@alphatroop.com>

Change-Id: Ia5c0b9a7261becd524a02aba1b22a98a2e09a4c9
Signed-off-by: William M.A. Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/1357
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-05-30 22:43:25 +00:00
Freddie Chopin ef1c4a2b1f doc: add info about FT232H and JTAG-lock-pick Tiny 2 adapter
Change-Id: I3b1047580669da3f17ea87183536275a10671fec
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/1367
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-05-02 16:43:31 +00:00
Freddie Chopin fcca2e82ec doc: Update list of interfaces, targets and boards
Change-Id: If9481e061f09a37f9ee3c461a1a0ce4d382a9a0d
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/1366
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-05-02 16:43:01 +00:00
Spencer Oliver d9ba56c295 target: rename cortex_a8 to cortex_a
Rename cortex_a8 target to use a more correct cortex_a name.
This also adds a deprecated_name var so that older scripts issue a warning
to update the target name.

cfg files have also been updated to the new target name.

Change-Id: I0eb1429c9281321efeb444b27a662a941a2ab67f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1130
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-28 08:56:04 +00:00
Spencer Oliver b7d2cdc0d4 target: rename cortex_m3 to cortex_m
Rename cortex_m3 target to use a more correct cortex_m name.
This also adds a deprecated_name var so that older scripts issue a warning
to update the target name.

cfg files have also been updated to the new target name.

Change-Id: Ia8429f38e88da677249c5caa560c50f8ce56ea10
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1129
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-28 08:55:31 +00:00
Freddie Chopin 564a5eb537 Mention "lpc4300" (with "lpc1800" alias) flash drivers in manual
Change-Id: I0bb28910b2c07b1ca5bd644e0d88b931d585d3e7
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/1352
Tested-by: jenkins
2013-04-28 08:22:46 +00:00
Michel JAOUEN 50c9315212 arm_adi_v5: fix for csw nonsecure access.
Add command to fix CSW_SPROT in register AP_CSW.
This solves dap apmem access in non secure access.

Change-Id: I7cfcb6434d75f5cfd4a2630a059901cdeea010ce
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/1276
Tested-by: jenkins
Reviewed-by: mike brown
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-04-11 16:06:31 +00:00
Spencer Oliver fe97fab6a0 docs: update incorrect urls
These were missed when git was moved to the new SF platform during Nov 2012.

Change-Id: I7b4ae9dea010d95f9bf4c26841b5b724f41768be
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1248
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
2013-03-28 23:24:40 +00:00
Spencer Oliver 8fa4d71d5c docs: remove unnecessary whitespace
Change-Id: I11bad3de145d941b61e9bd4920bc3281ece91ab3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1245
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-03-28 23:02:40 +00:00
Spencer Oliver b7e0cd48f0 docs: fix html anchor xref links
makeinfo has a long outstanding bug that means @anchors are not correctly
formatted for split html, see:
http://lists.gnu.org/archive/html/bug-texinfo/2012-06/msg00000.html

The issue relates to using spaces or hyphens in the @anchor name.
Issue also reported via Trac #44

Change-Id: Id72e23375dd167674b2ae5b314e8242b90a72a5f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1244
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-03-28 23:01:54 +00:00
Rodrigo Melo dd9145b52e doc: opendous interface based on ft2232H
It was listed in the ft2232 based cables supported. Moreover, the
ft2232_channel option, which was added to support this cable, was explained.

Change-Id: I82ebc7bc10d6472f96ab150e78d623a617edccd2
Signed-off-by: Rodrigo Melo <rmelo@inti.gob.ar>
Reviewed-on: http://openocd.zylin.com/1098
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-03-13 12:33:29 +00:00
Spencer Oliver 2467da4b4a tcl: add flash programming helper
This adds a program proc that simplifies using OpenOCD as a standalone
programmer.

Change-Id: I6ece492cd878c170b734e8bb2e09fe8c4557d5a6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1199
Tested-by: jenkins
Reviewed-by: Jörg Fischer <turboj@gmx.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2013-03-12 08:44:22 +00:00
Spencer Oliver bd5df8520b stm32: enable flash bank size override
It has been seen on some stm32 targets that the flash size register that
is probed by the driver may contain an invalid size.

This change enables the user to override the probed value.

Change-Id: I09359e59a96f9133d3d939670957d32a830a944e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1132
Tested-by: jenkins
Reviewed-by: Johan Almquist <johan.almquist@assaabloy.com>
2013-02-25 11:56:18 +00:00
Spencer Oliver 9cdb6b438d docs: update stm32f1x/stm32f2x driver info
As we use the two ST flash drivers for multiple stm32 variants update the
docs as to which targets use which driver.

Change-Id: I84943ff45482a22b3d3dd8491bb4242d79415939
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/990
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-01-21 16:43:30 +00:00
Roman D 7ae9154846 flash: EFM32 flash implementation
Limited (no page unprotect, no block writes) implementation of EFM32
flash support. Verified with EFM32 development kit and STLink V2 adapter
using SWD.

Change-Id: I3db2054d9aa628a1fe4814430425db3c9959c71c
Signed-off-by: Roman D <me@iamroman.org>
Reviewed-on: http://openocd.zylin.com/1106
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-14 10:25:55 +00:00
Andreas Fritiofson 76afadeb7b doc: Add documentation for the ftdi driver
Change-Id: I1ade2eb187b404141051d9f59ba06e8e6e5d51aa
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1099
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-03 16:21:49 +00:00
Spencer Oliver 69359b1c52 doc: replace luminary with TI urls's
Change-Id: Ic8a768f5a498e78b96421c6137238593c159fd72
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/970
Tested-by: jenkins
2012-12-23 21:46:40 +00:00
Spencer Oliver 67801c061f docs: update docs to include info on TI ICDI
Change-Id: I3009920f512f76901d187318ee50284db34ab6f7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/924
Tested-by: jenkins
2012-12-23 21:46:31 +00:00
Spencer Oliver c91dbd41ba jtag: add connect_type reset_config mode flag
This adds the ability to request to the adapter how we want to connect to
the target, eg. while srst is asserted or not.

This ability can very handy for connecting to unresponsive targets.
A prerequisite is that the target supports srst_nogate.

Change-Id: I0f7c9475160048e8a963e16077754f5403ac8325
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/976
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-12-10 16:13:52 +00:00
Spencer Oliver 27f0497efa docs: mention extended-remote support
Change-Id: Idd7cc0364856082cbbfee5015e49cd7d237d68ef
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/913
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-18 16:10:55 +00:00
Matthias Blaicher 14e12c3969 rtos: Add ChibiOS/RT support
This patch adds ChibiOS/RT support. This patch requires at least
ChibiOS/RT development version starting from SVN revision 4734.

Note, that the Thread structures depend not only on the target
but also on the ChibiOS configuration at build time.
To correct this ChibiOS includes a new "memory signature" which
specifies the offsets.

Special thanks go to Peter Stuge and Spencer Oliver for their
continous input and feedback to this patch.

Change-Id: I842bf7ba6c2309a4efe93d29ea6cd0784a8b22a3
Signed-off-by: Matthias Blaicher <matthias@blaicher.com>
Reviewed-on: http://openocd.zylin.com/901
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-16 06:32:03 +00:00
George Harris 516719b6b8 Added SPIFI flash driver, algorithms, and docs
Added a flash driver designed to allow program/erase of
memory-mapped SPI flash chips for LPC43xx/LPC18xx family
micros. This driver includes three algorithms - erase,
write, and SPIFI peripheral initialization (to allow
memory-mapped access after a reset). The driver has been
added to the flash driver table (drivers.c), and the
OpenOCD documentation has been updated to include the flash
driver configuration command.

Change-Id: I79f4ff8f1f07de4e5f2fe4f8c23aeb903f868514
Signed-off-by: George Harris <george@luminairecoffee.com>
Reviewed-on: http://openocd.zylin.com/783
Tested-by: jenkins
Reviewed-by: Aurelien Jacobs <aurel@gnuage.org>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-09-26 16:17:42 +00:00
Spencer Oliver 37f8f0bf9a docs: add user mailing list and irc info
Change-Id: I7000b5ab2967f8dc4cea8983978fce824ea1f98e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/807
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-09-06 19:19:09 +00:00
Spencer Oliver 246f8492da doc: add missing ulink v1 to supported interfaces
Change-Id: Ic497a3f9076ec1799ca715a99bc2e634bd1af40d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/761
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-07-30 06:50:36 +00:00
Liviu Ionescu e571746735 docs: J-Link commands added to the manual
The J-Link related commands and configuration commands were added
to the "8.2 Interface Drivers" section of the manual.
(previously they were enumerated as comments).
The 'jlink pid' was marked as Config all other as Command.
A draft of a compatibility note was added, but probably
a table would be more appropriate.

Change-Id: Ifbe230706815196aaad4e3729ed5089d5088b769
Signed-off-by: Liviu Ionescu <ilg@livius.net>
Reviewed-on: http://openocd.zylin.com/680
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-06-26 10:06:12 +00:00
Spencer Oliver 1dd462a6d6 target: enable TARGET_EVENT_EXAMINE_* events
Change-Id: I33efc0994b7bfe0faa2f4e8457fcc3c8e43d3571
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/635
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
2012-05-21 16:20:07 +00:00
Spencer Oliver bb3793c9a4 target: remove legacy target events
These events have been deprecated for a number of years, update any
remaining scripts to the new events.

Change-Id: Ic31ff388545ac8b3a500045699ca92c541b13f12
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/634
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
2012-05-21 16:19:28 +00:00
Spencer Oliver 482660031a target: remove duplicate target events
Change-Id: Iba9ae441f3e6d48a7dfafe59ed093fef56a34723
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/633
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
2012-05-21 16:19:02 +00:00
Bill Traynor 8f842ea40a UserGuide: Updated list of supported interfaces, boards, and targets.
User Guide: Chapter 6 'Config File Guidelines'.  The directory listings
of interfaces, boards, and targets has been brought up to date.

Change-Id: I53f218a94cb81c5e90298b367259e833192af5f3
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/646
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-05-21 16:16:33 +00:00
Peter Stuge 064475459b docs: Fix incorrect -rtos option values
Commit 9ca1592cb9 started on documentation
for the -rtos option, but some of the documented values were incorrect so
we'll clean up the mess here.

Many thanks to Freddie Chopin for spotting this!

Change-Id: Iaa633bd40ff5f75dd6a69e74e79dafc1643ee21a
Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://openocd.zylin.com/642
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
2012-05-14 16:23:42 +00:00
Spencer Oliver 9ca1592cb9 docs: add initial target rtos support info
Change-Id: Idd39ce17922602aedd4626496ed8f5422bb76e07
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/641
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2012-05-14 14:45:10 +00:00
Spencer Oliver 0eaa8e7db0 jtag: add opendous and estick support
Change-Id: I49c25d226f05fdcaca6cbfc35c2ab47e8464abec
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/611
Tested-by: jenkins
2012-05-14 09:41:49 +00:00
Spencer Oliver 61672009c4 stlink: add stlink_api cmd
This enables the manual selection of the stlink api version.

Change-Id: I0ec8c5b0a101b6456f426d2fec65971da56db4e7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/617
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2012-05-14 09:34:00 +00:00
Olivier Schonken d1cd97777b topic: Added support for the SAM4S variants
Atmel introduced 6 new Cortex-M4 processors on 2011-10-26
SAM4S16C - 1024KB flash LQFP100/BGA100
SAM4S16B - 1024KB flash LQFP64/QFN64
SAM4S16A - 1024KB flash LQFP48/QFN48
SAM4S8C - 512KB flash LQFP100/BGA100
SAM4S8B - 512KB flash LQFP64/QFN64
SAM4S8A - 512KB flash LQFP48/QFN48

The SAM4S processors still suffer from the "6 waitstates needed
to program device" errata.

Other relevant changes are:
1. Address of flash memory starts at 0x400000.
2. EWP (Erase page and write page) only works for the first two 8KB "sectors"
3. Because of the EWP not working for all the sectors, normal page writes have
to be used.  The default_flash_blank_check is used to check if lockregions
should be erased.
4. The EA (Erase All) command takes 7.3s to complete. (Previous timeout was
500 ms)
5. There are 128 lockable regions of 8KB each.

Implemented default blank checking, and page erase for load_image scenarios.
This is to compensate for the EWP flash commands only working on the
first 2 8KB sectors.

Change-Id: I7c5a52b177f7849a107611fd0f635fc416cfb724
Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
Reviewed-on: http://openocd.zylin.com/528
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-26 10:58:14 +00:00
Bill Traynor 6ba7331501 UserGuide: Fixing link to USBprog tool.
In section '2.8 USB Other' updated the link to the USBprog tool:
http://shop.embedded-projects.net/

Change-Id: I7fa453934ac6a7889e01b22b7e0cb07f42ee168d
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/591
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-23 09:13:23 +00:00
Bill Traynor 941fb511cf UserGuide: Updated link to Versaloon-Link tool.
In section '2.8 USB Other' updated the URL to the Versaloon-Link to:
http://www.versaloon.com

Change-Id: Idd92333cb3d87d1b89dfb282134332387df5a0fc
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/592
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-23 09:11:52 +00:00
Bill Traynor 0a581ccdb1 UserGuide: Fixed link to Wiggler2 project.
In section '2.9 IBM PC Parallel Printer Port based' fixed link to
the Wiggler2 project and removed the alternate URL text to retain
style consistency with the other URLs in the document:
http://www.ccac.rwth-aachen.de/~michaels/index.php/hardware/armjtag

Change-Id: I879db1c6eaf683ca6475a0f466f987087c9d60d0
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/593
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-23 09:10:59 +00:00
Bill Traynor b9ecc64c80 UserGuide: Fixed link to ST flashlink.
In section '2.9 IBM PC Parallel Printer Port Based' fixed link to
ST's flashlink PDF and removed alternate URL text:
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/
DATA_BRIEF/DM00039500.pdf

Change-Id: I99702dd00d4145784baee1f63b5998bf79e06678
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/594
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-23 09:09:16 +00:00
Bill Traynor fa39842d28 UserGuide: Fixing two typos.
In Section 2.7 USB ST-LINK based made these two changes:
"they only works with" to "they only work with"
"following method's" to "following methods"

Change-Id: Idfe6c11c3fa6f2157d01697cd7f480a9d495c8e2
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/590
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-23 09:05:04 +00:00
Bill Traynor c9e59b30ab UserGuide: Fixed link to Raisonance RLINK.
In section 2.6 USB JLINK based, fixed link to RLINK:
http://www.mcu-raisonance.com/~rlink-debugger-programmer__microcontrollers__tool
~tool__T018:4cn9ziz4bnx6.html

Change-Id: I15f7a1b68b851054e07eefc07a50b4590ebce677
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/588
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-20 15:31:59 +00:00
Bill Traynor e6e8bf46e4 UserGuide: Update Section 2.3 USB FT2232 Based
Updated the link for the usbjtag project to the correct URL:
http://elk.informatik.fh-augsburg.de/hhweb/doc/openocd/usbjtag/usbjtag.html

Added a NOTE to indicate the axm0432_jtag as no longer being
available from the axman.com page.

Change-Id: I70727303dad58d9dc0c5f9b7cce219288b762042
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/583
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-20 15:06:32 +00:00
Bill Traynor 818cc61775 UserGuide: Add ref. to Flyswatter2
Added the Flyswatter2 to section 2.3 USB FT2232 Based hardware
list.

Change-Id: I6a382644b5a0313d30afb5a97d0a9ea00f01efa9
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/584
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-20 15:05:02 +00:00
Bill Traynor 008336becc UserGuide: Fixed link to USB-JTAG project.
Updated the URL to Kolja Waschk's USB-Blaster compatible adapter:
http://ixo-jtag.sourceforge.net/

Change-Id: If9d2875b5ba5d3bfaaf524cd253a5fab53e05371
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/585
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-20 15:03:54 +00:00
Bill Traynor b4eba5819f UserGuide: Fixed link to IAR J-Link.
In Section 2.5 USB JLINK based, fixed the URL for IAR J-Link:
http://www.iar.com/en/products/hardware-debug-probes/iar-j-link/

Change-Id: If613d2e915a0a704569d74094e612e34bcc849d3
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/586
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-20 15:02:59 +00:00
Bill Traynor 6a1236a7ac zy1000: fixed link to Zylin ZY1000 JTAG Probe
This patch fixes the link to the Zylin ZY1000 JTAG Probe webpage.
The ZY1000 product line was acquired by Ultimate Solutions, Inc. in May 2011.

Change-Id: If68cd45a0c47aa20b2e4bb62939b2c505c8c8c2e
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/571
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-18 22:07:15 +00:00
Stephane Bonnet 57dce9560a ft2232: Support for Digilent HS1 USB adapter
* Added support to the FT2232 driver for the FT2232H-based
  Digilent HS1 adapter.

Change-Id: Iab6cc15f299badaf115615b5d4d785ecb2273c27
Signed-off-by: Stephane Bonnet <bonnetst@hds.utc.fr>
Reviewed-on: http://openocd.zylin.com/558
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-10 20:19:47 +00:00
Spencer Oliver ea39d4b281 docs: add stm32 dual bank example
Change-Id: I1dfe134e2c7694fc978d14b4b21bdf9c82ca4b16
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/507
Tested-by: jenkins
2012-03-13 17:02:22 +00:00
Øyvind Harboe ed12a6521f flash: retire unused eCos flash driver
even the AT91EB40a's flash is covered by CFI and nobody ever submitted
any other drivers based on eCos code. It's just possible that this
idea was missing documentation and "marketing", but it's in git if
somebody wants to resurrect it.

Change-Id: I66449aa6e0997301f9d67f28098789bfc891d6e9
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/502
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-03-11 21:14:21 +00:00
Spencer Oliver 5793056d96 jtag: use correct tap -ignore-version mask
when -ignore-version is used we should mask of the upper 4bits not 8bits.

Change-Id: I9ffe24c2aeeb414677357a647609fdf018890194
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/473
Tested-by: jenkins
2012-02-26 01:14:39 +00:00
Spencer Oliver 897981c318 docs: fix more texinfo warnings
A period or comma must follow the closing brace of an @xref.

Change-Id: Ida5dc3600eca328d95b0a8f6b5c9fe0a0f3ba820
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/475
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-02-22 20:55:11 +00:00
Spencer Oliver ddb2bb28fa docs: fix texinfo warnings
A period or comma must follow the closing brace of an @xref.

Change-Id: I272f1e7fac8f1fee4844f485b0b8e2e4e9cf352d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/456
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-02-16 08:57:07 +00:00
Spencer Oliver de545ee93a docs: correct small typo
Change-Id: I5e8bea591274b4032d3e04c4be7e9110138d5bc2
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/447
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2012-02-13 12:34:06 +00:00
Freddie Chopin 7d48be5bd3 Add init_board documentation
This patch adds init_board concept information to OpenOCD manual.
Additionally a link from init_targets chapter to new chapter about
init_board is added.

Change-Id: I09b9aaa1cf68b94f35701224f641cae9811a5bcf
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/440
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-13 11:06:55 +00:00
Freddie Chopin 394dcc8e34 Add missing init_targets documentation
Add init_targets procedure documentation to OpenOCD manual explaining
the concept.

Change-Id: I82933ed90397cbcdc5c72801182573ca69b1d265
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/439
Reviewed-by: Chris Morgan <chmorgan@gmail.com>
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2012-02-09 18:07:22 +00:00
Spencer Oliver dbbe2a5388 docs: add original stlink (STLINK-V1) usage note
Add a note to the docs about the original stlink being broken under linux.

Change-Id: Ib440d78e5c7d31eeace99f611a76fcf701bfb8bc
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/433
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-02-07 22:38:33 +00:00
Timo Ketola 28b1fbd5ee doc: Update patch procedure
Change-Id: I3e50357b4ddaf483712bbac68b6427b31529f666
Signed-off-by: Timo Ketola <timo@exertus.fi>
Reviewed-on: http://openocd.zylin.com/387
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-18 21:46:15 +00:00
Spencer Oliver a77ba6a8b4 docs: add initial st-link info
Change-Id: I213bf26dec582fd8e273e604d43a6e849599dd50
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/340
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-01-09 09:49:33 +00:00
Spencer Oliver e8b094b846 docs: whitespace fixes
Change-Id: I9c6c7017ce3077bb131a05ea9b53a115506c94d9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/339
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-07 16:37:56 +00:00
Erik Ahlén c402c1166b Documentation for mxc NAND flash controller
Change-Id: I9e552491e8b4737c01e4f8ae2b9a582b6ff2bc5d
Signed-off-by: Erik Ahlén <erik.ahlen@avalonenterprise.com>
Reviewed-on: http://openocd.zylin.com/273
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-12-23 09:43:39 +00:00
Uwe Hermann 498662e2e5 Add an interface file for DLP Design DLP-USB1232H.
The DLP Design DLP-USB1232H UART/SPI/JTAG module is based on an FTDI FT2232H
chip. Among other things, it can used as JTAG programmer if connected to
the JTAG target properly. I have successfully wired the module to an
Olimex STM32-H103 eval board and flashed a firmware onto that using OpenOCD.

The setup details and schematics are documented at:
http://randomprojects.org/wiki/DLP-USB1232H_and_OpenOCD_based_JTAG_adapter

Change-Id: I5eb9255a61eeece233009bee77d7dc3b5d1afb8b
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Reviewed-on: http://openocd.zylin.com/20
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-13 22:29:28 +00:00
Spencer Oliver 24f82100f8 docs: update more url's
Change-Id: I476078f32910579fed55777c3b0e6da3ef3363b7
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-10-12 12:25:59 +01:00
Spencer Oliver ca0cc39f5f docs: update project url's
Change-Id: I54fc3aff722ed25143aad85e58d19b72fcecbba0
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-10-12 09:32:59 +01:00
Spencer Oliver cf692abe83 replace berlios url's with sourceforge url's
Change-Id: I1c9957bb64df87cee7c5e832f21453eb8934a5fb
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-10-11 17:18:05 +01:00
Richard Uhler 1411ad11c1 Implementation of a new jtag remote_bitbang driver.
The driver sends ascii encoded bitbang commands over unix sockets or TCP to
another process. This driver is useful for debugging software running on
processors which are being simulated.
2011-09-02 16:50:01 +02:00
Jie Zhang 738b91ddb4 remove useless pxref to SMP subsection 2011-08-11 22:13:32 +02:00
Spencer Oliver 633b1a2b49 docs: remove obsolete luminary target info
The lm3s variant is not required as this is handled in the
target script - see tcl/target/stellaris.cfg.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-28 16:06:24 +01:00
Spencer Oliver c73342fbe7 docs: update to use new stm32 driver names
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-28 11:44:48 +01:00
Spencer Oliver 1cfd3fdda9 doc: add Fujitsu FM3 flash driver info
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-27 10:28:24 +01:00
Jie Zhang ba4b8af4d7 remove doc on the deprecated '-p' option
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-26 21:24:08 +01:00
Jie Zhang 577c3bc087 Update doc about Jim since it's not a single .C file and a single .H file any more
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-26 21:23:20 +01:00
Peter Horn d4cd6f0320 cortex_m3: add auto maskisr
This patch extends the cortex_m3 maskisr command by a new option 'auto'.
The 'auto' option handles interrupts during stepping in a way they are
processed but don't disturb the program flow during debugging.

Before one had to choose to either enable or disable interrupts. The former
steps into interrupt handlers when they trigger. This disturbs the flow during
debugging, making it hard to follow some piece of code when interrupts occur
often.

When interrupts are disabled, the flow isn't disturbed but code relying on
interrupt handlers to be processed will stop working. For example a delay
function counting the number of timer interrupts will never complete, RTOS
task switching will not occur and output I/O queues of interrupt driven
I/O will stall or overflow.

Using the 'maskisr' command also typically requires gdb hooks to be supplied
by the user to switch interrupts off during the step and to enable them again
afterward.

The new 'auto' option of the 'maskisr' command solves the above problems. When
set, the step command allows pending interrupt handlers to be executed before
the step, then the step is taken with interrupts disabled and finally interrupts
are enabled again. This way interrupt processing stays in the background without
disturbing the flow of debugging. No gdb hooks are required. The 'auto'
option is the default, since it's believed that handling interrupts in this
way is suitable for most users.

The principle used for interrupt handling could probably be used for other
targets too.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-07-04 11:31:52 +01:00
Spencer Oliver 89fa8ce2d8 Revert "cortex_m3: add auto maskisr"
This reverts commit ff640f197a.

Original patch reverted as Author's name was incorrectly set.
2011-07-04 11:31:52 +01:00
Spencer Oliver ff640f197a cortex_m3: add auto maskisr
This patch extends the cortex_m3 maskisr command by a new option 'auto'.
The 'auto' option handles interrupts during stepping in a way they are
processed but don't disturb the program flow during debugging.

Before one had to choose to either enable or disable interrupts. The former
steps into interrupt handlers when they trigger. This disturbs the flow during
debugging, making it hard to follow some piece of code when interrupts occur
often.

When interrupts are disabled, the flow isn't disturbed but code relying on
interrupt handlers to be processed will stop working. For example a delay
function counting the number of timer interrupts will never complete, RTOS
task switching will not occur and output I/O queues of interrupt driven
I/O will stall or overflow.

Using the 'maskisr' command also typically requires gdb hooks to be supplied
by the user to switch interrupts off during the step and to enable them again
afterward.

The new 'auto' option of the 'maskisr' command solves the above problems. When
set, the step command allows pending interrupt handlers to be executed before
the step, then the step is taken with interrupts disabled and finally interrupts
are enabled again. This way interrupt processing stays in the background without
disturbing the flow of debugging. No gdb hooks are required. The 'auto'
option is the default, since it's believed that handling interrupts in this
way is suitable for most users.

The principle used for interrupt handling could probably be used for other
targets too.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-06-28 14:16:48 +01:00
Michel Jaouen 53c0fb6ef5 cortex a : smp doc update 2011-05-09 21:50:44 +02:00
Phil 364cfaac1d Added s19 to (fast_)load_image documentation to match the online help. 2011-04-01 09:02:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8e85bb4eea jlink: add Emulator configuration support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
2011-03-13 14:55:20 +01:00
Jean-Christophe PLAGNIOL-VILLARD 952de89bfe jlink: add capability dumper and command
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
2011-03-13 14:54:32 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0eed61b7c4 jlink: add jlink_pid to specify the pid to use
this will allow us to use multiple jlink at the same time as when
the USB-Address is specified the PID change from 0x0101 to
(0x101 + usb_adress)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-03-02 19:04:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD b992dd58f1 jlink: switch commands to subcommands
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-03-02 19:04:00 +01:00
Aaron Carroll 827053c79d openocd.texi: minor fixes in Reset Configuration
Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
2011-01-31 08:46:16 +01:00
David Brownell 7cd2617384 initial SWD transport (SWD infrastructure #2)
This piggy backs on JTAG so it's not yet pretty, but that
seems unavoidable so far given today's OpenOCD internals.

SWD init and data transfer  are unfinished and untested, but
that should cause no regressions, and will be addressed by
the time drivers start using this infrastructure.  Checking
in whould get the code working better sooner, and turn up any
structural/architectural issues while they're easier to fix.

The debug adapter drivers will provide simple SWD driver
structs with methods that kick in as needed (instead of JTAG).
So far just one adapter driver has been updated (not yet
ready to use or circulate).

The biggest issues are probably
  - fault handling, where the ARM Debug Interface V5 pipelining
    needs work in both JTAG and SWD modes and
  - missing  rewrite of block I/O code to work on both of our
Cortex-ready transports (Current code is  hard-wired to JTAG);
relates also to the pipelining issue.
  - omitted support to activate/deactivate SWO/SWV trace (this is
    technically trivial, but configuring what to trace is NOT.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
----

 doc/openocd.texi        |   17 ++
 src/jtag/core.c         |    3
 src/jtag/interface.h    |    4
 src/jtag/jtag.h         |    2
 src/jtag/swd.h          |  114 +++++++++++++++++++
 src/jtag/tcl.c          |    2
 src/target/adi_v5_swd.c |  281 ++++++++++++++++++++++++++++++++++++++++++++++--
 src/target/arm_adi_v5.c |    8 +
 src/target/arm_adi_v5.h |    3
 9 files changed, 425 insertions(+), 9 deletions(-)
2010-12-24 18:50:41 -08:00
Øyvind Harboe af3f77a177 openocd doc: update the comments about Jim Tcl a bit
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-12-16 09:12:46 +01:00
Antonio Borneo 42082f7c23 FLASH/NOR: rename from spearsmi to stmsmi
STMicroelectronics controller SMI is not SPEAr specific.
Rename it and change name to every symbol in the code.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-23 08:37:34 +01:00
Antonio Borneo 06b4903e3e Documentation: fix typo
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-23 08:32:43 +01:00
Antonio Borneo e7a8de1762 NOR/SPEAr: Add support for Serial NOR
Add support and documentation for STMicroelectronics
SPEAr Serial Memory Interface (SMI).
Code tested on SPEAr3xx only.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-16 09:16:11 +01:00
Antonio Borneo 4747af362d JIM: document "echo" command
Document "-n" option in manual;
Modify "echo" command definition as COMMAND_HANDLER to
easily add help message
Add help message aligned with manual.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-09 08:12:51 +01:00
Øyvind Harboe 96a56ba086 pipes: add documentation for pipes
Stick with the name "gdb_port" even if this command
can be used for other things(disable, named pipes,
anonymous stdin/out pipe). "port" is correct for
probably more than 90% of use cases, if not more.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-01 10:26:10 +02:00
Øyvind Harboe 50d5441e2a server: add support for pipes
-p/--pipe is now deprecated. Use '-c "gdb_port pipe;log_output openocd.log"'
instead. Warning logged.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-01 10:26:08 +02:00
Mike Dunn 103c1f9525 xscale: some wp detail added to user manual
Hi everyone (again),

Watchpoints on xscale are quirky, so I thought a little explanation in the
user's manual was warranted.

Comments gratefully received.

Last one, Øyvind :-)

Thanks,
Mike

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
2010-09-20 09:21:13 +02:00
Spencer Oliver 3c69eee9ef cortex m3: add cortex_m3 reset_config cmd
This new cmd adds the ability to choose the Cortex-M3
reset method used.
It defaults to using SRST for reset if available otherwise
it falls back to using NVIC VECTRESET. This is known to work
on all cores.

Move any luminary specific reset handling to the stellaris cfg file.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-08-31 20:09:26 +01:00
Catalin Patulea 36333f9ca8 Fix typo in documentation of usb_blaster_vid_pid command 2010-08-13 23:34:58 +02:00
Øyvind Harboe 8f779cf66b tcl: remove silly ocd_ prefix to array2mem and mem2array
ocd_ prefix is used internally in OpenOCD as a kludge more
or less to deal with the two kinds of commands that OpenOCD
has.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-11 17:24:55 +02:00
Mike Dunn 7682877c8c xscale documentation: vector table handling
Hi everyone.  I noticed some incorrect information in the user manual
regarding how the vector table is handled on the xscale, so for your
consideration, here's a short patch that corrects it, and adds a
little more detail I thought might be helpful.

The documentation states that OpenOCD does not attempt to synchronize
the vector tables in memory with those stored in the "mini instruction
cache".  In fact, on each resume it does copy from memory to the cache
all entries in the high and low tables that were not previously
defined using the 'xscale vector_table' command. (In
src/target/xscale.c, see xscale_update_vectors(), which is invoked by
xscale_resume().)  I take advantage of this during Linux boot-up.  The
extra detail describes in general terms how I do this.

Corrections, comments are of course gratefully received.

Thanks,
Mike

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
2010-08-02 22:39:48 +02:00
David Brownell a463670c31 "transport select" returns Jim value
Make it scriptable, so code can be conditionalized based on
what transport is in use for the session.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-24 14:38:46 -04:00
Spencer Oliver 450aaad1e9 docs: removed unused cmd 'fast'
The cmd fast was removed in commit c0d14dc7f1

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-20 10:46:54 +01:00
Spencer Oliver d249057adf docs: missing parameter from nand check_bad_blocks
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-19 09:10:52 +01:00
Spencer Oliver dc4df8bb97 docs: fix transport typo
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12 19:36:19 +01:00
David Brownell db8b99aed6 Fix minor openocd.texi bug
::X
Signed-off-by: David Brownell <db@helium.(none)>
2010-07-02 17:14:52 -04:00
David Brownell 93f2afa45f initial "transport" framework
This adds the guts of a transport framework with initialization,
which should work with current JTAG-only configurations (tested
with FT2232).

Each debug adapter can declare the transports it supports, and
exactly one transport is initialized.  (with its commands) in
any given OpenOCD session.

  * Define a new "struct transport with init hooks and a few
 "transport"  subcommands to support it:

     "list" ... list the transports configured (just "jtag" for now)
     "select" ... makes the debug session use that transport
     "init" ... initializes the selected transport (internal)

  * "interface_transports" ... declares transports the current interface
    can support.  (Some will do this from C code instead, when there are
    no hardware versioning (or other) issues to prevent it.

Plus some FT2232 tweaks, including a few to streamline upcoming
support for an SWD transport (initially for Luminary adapters).

Eventually src/jtag should probably become src/transport, moving
jtag-specific stuff  to transport/jtag.

Signed-off-by: David Brownell <db@helium.(none)>
2010-07-02 16:45:28 -04:00
Spencer Oliver 5319ccd7eb flash: add virtual flash bank driver
This adds a virtual flash bank driver that allows virtual banks to
be defined that refer to an existing flash bank.

For example the real address for bank0 on the pic32 is 0x1fc00000
but the user program will either be in kseg0 (0xbfc00000) or
kseg1 (0x9fc00000).
This also means that gdb will be aware of all the read only flash
addresses.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-05-26 11:10:15 +01:00
Marc Pignat 4e022886d6 Documentation: consistency in GDB command name
Always use the complete name of the GDB command, not an abbreviation.
2010-05-11 20:01:18 +02:00
Marc Pignat 4cf13101e5 Documentation : arm920t implements armv4
There is a small typo in the cpu list, arm920t is armv4.
2010-05-11 20:01:18 +02:00
Øyvind Harboe 737c9b6258 flash: stop caching protection state
There are a million reasons why cached protection state might
be stale: power cycling of target, reset, code executing on
the target, etc.

The "flash protect_check" command is now gone. This is *always*
executed when running a "flash info".

As a bonus for more a more robust approach, lots of code could
be deleted.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 15:24:25 +02:00
Øyvind Harboe f7e0f3c285 flash: erase_address now has an unlock option
Quite useful to be able to unlock the flash, just like in
the flash write_image cmd.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 15:24:25 +02:00
Marc Pignat ca0f6a5c58 documentation typo
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 11:10:12 +02:00
Øyvind Harboe 80660288e0 docs: now builds again
Fix gaffe committed last time.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 09:21:58 +02:00
michal smulski cc5f3c85de docs: improve load_image docs
add docs for missing args.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-04-20 22:18:04 +02:00
Øyvind Harboe e4056cca2d doc: gdb-attach can fix gdb connect issues
Flash probing must succeed for e.g. gdb load and automatic
hardware/software breakpoints to work.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-04-20 09:05:07 +02:00
David Brownell d60ebc0ab5 jtag/tcl.c cleanup -- split out "adapter.c"
Clean up the jtag/tcl.c file, which was one of the biggest and
messiest ones in that directory.  Do it by splitting out all the
generic adapter commands to a separate "adapter.c" file (leaving
the "tcl.c" file holding only JTAG utilities).

Also rename the little-used "jtag interface" to "adapter_name", which
should have been at least re-categorized earlier (it's not jtag-only).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-27 10:07:13 -07:00
Spencer Oliver d37ed9094a DOCS: update flash bank examples
- include the $_FLASHNAME in all flash bank examples.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-18 09:36:00 +00:00
Spencer Oliver ae1c64706a PIC32MX: add unlock cmd
'unlock' performs a full unlock/erase of the device, removing any
code protection.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-18 09:35:45 +00:00
Spencer Oliver 3ad171cd53 SCRIPT: add add_script_search_dir cmd
Add a add_script_search_dir cmd so that adding search
dir's can be added to cfg scripts.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-17 09:57:44 +00:00
Spencer Oliver 79ca05b106 MIPS: remove ejtag_srst variant
The mips_m4k_assert_reset has now been restructured
so the variant ejtag_srst is not required anymore.
The ejtag software reset will be used if the target does not
have srst connected.

Remove ejtag_srst from docs.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-17 09:01:45 +00:00
David Brownell 1bd3ae3986 rename jtag_nsrst_assert_width as adapter_nsrst_assert_width
Globally rename "jtag_nsrst_assert_width" as "adapter_nsrst_assert_width",
and move it out of the "jtag" command group ...  it needs to be used with
non-JTAG transports

Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break.  That aid should Sunset in about a year.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15 08:42:26 -07:00
David Brownell b559b273b5 rename jtag_nsrst_delay as adapter_nsrst_delay
Globally rename "jtag_nsrst_delay" as "adapter_nsrst_delay", and move it
out of the "jtag" command group ...  it needs to be used with non-JTAG
transports

Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break.  That aid should Sunset in about a year.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15 08:41:30 -07:00
David Brownell 96f9790279 rename jtag_khz as adapter_khz
Globally rename "jtag_khz" as "adapter_khz", and move it out of the "jtag"
command group ...  it needs to be used with non-JTAG transports

Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break.  That aid should Sunset in about a year.  (We may want to
update it to include a nag message too.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15 08:37:43 -07:00
Michal Demin 24e1e3dd26 Add support for Bus Pirate as a JTAG adapter.
This includes a driver and matching config file.  This support needs to be
enabled through the initial "configure" (use "--enable-buspirate").

Signed-off-by: Michal Demin <michaldemin@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-11 11:35:50 -08:00
David Brownell 591e0bbab9 split "interface" commands from "jtag" ones
We'll need to be able to work with debug adapter interfaces (drivers)
even when they're not used for JTAG ... for example, while there are
multi-transport drivers which support JTAG *and* several other
transports (or just one more, like SWD) there are also adapters
with more limited goals (and no JTAG support at all).

Start decoupling the two concepts ("debug adapter driver", "jtag")
by having two command groups, which initialize separately.

This will help us support OpenOCD sessions using only non-JTAG
transports, in which JTAG commands should not be registered.
Update docs to mention that the JTAG, SVF, and XSVF commands
won't work without a JTAG transport.

Note that at least commands working with SRST are still inappropriately
coupled  to JTAG ... inappropriate because (a) SRST is not part of the
JTAG standard, for all that many platforms (like ARM) expect it; and also
(b) because they're used with non-JTAG debug and programming interfaces,
too.  They should perhaps become generic "interface" operations at some
point.  (Similarly with the clock rate to be used by a given adapter.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-11 09:47:47 -08:00
David Brownell c6e323b983 doc: not all debug adapters are "dongles"
Talk more about "debug adapters" instead of only "dongles".  Not all
adapters are discrete widgets; some are integrated onto boards.  If
we only talk about "dongles" we rule out many valid setups, and help
confuse some users (who may be using Dongle-free environments).

Also start bringing out the point that JTAG isn't the only transport
protocol, even though OpenOCD historically presumes "all is JTAG".
(Not all debug adapters are JTAG adapters, or JTAG-only adapters.)

Plus a few minor fixes (spelling etc) in the vicinity of those changes,
and updates about FT2232H clocking issues (they can go faster than the
older chips, and can support adaptive clocking).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-05 21:09:03 -08:00
Spencer Oliver 9d6ede25dd semihosting: move semihosting cmd to arm cmd group
Move semihosting cmd to the arm cmd group.

Targets that support semihosting will setup the
setup_semihosting callback function.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-02-28 22:48:37 +00:00
Spencer Oliver 550abe7396 CortexM3: move disassemble cmd to arm cmd group
Rather than using a Cortex disassemble cmd, we now use
the arm generic version.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-02-28 22:48:19 +00:00
Mariano Alvira 0324eb2496 Add board/redbee-usb.cfg
The Redbee USB is a small form-factor usb stick from Redwire, LLC
(www.redwirellc.com/store), built around a Freescale MC13224V
ARM7TDMI + 802.15.4 radio (plus antenna).

It includes an FT2232H for debugging, with Channel B connected to the
mc13224v's JTAG interface (unusual) and Channel A connected to UART1.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-28 10:33:46 -08:00
Mariano Alvira 63763345d9 add board/redbee-econotag.cfg and JTAG support
The Redbee Econotag is an open hardware development kit from
Redwire, LLC (www.redwirellc.com/store), for the Freescale
MC13224V ARM7TDMI + 802.15.4 radio.

It includes both an MC13224V and an FT2232H (for JTAG and UART
support).  It has flexible power supply options.

Additional features are:

  - inverted-F pcb antenna
  - 36 GPIO brought out to 0.1" pin header
    (includes all peripheral pins)
  - Reset button
  - Two push buttons (on kbi1-5 and kbi0-4)
  - USB-A connector, powered from USB
  - up to 16V external input
  - pads for optional buck inductor
  - pads for optional 32.768kHz crystal
  - 2x LEDS on TX_ON and RX_ON

[ dbrownell@users.sourceforge.net: shrink lines; texi ]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-27 22:52:34 -08:00
David Brownell e70d42a727 new "stellaris recover" command
Stellaris chips have a procedure for restoring the chip to
what's effectively the "as-manufactured" state, with all the
non-volatile memory erased.  That includes all flash memory,
plus things like the flash protection bits and various control
words which can for example disable debugger access.  clearly,
this can be useful during development.

Luminary/TI provides an MS-Windows utility to perform this
procedure along with its Stellaris developer kits.  Now OpenOCD
users will no longer need to use that MS-Windows utility.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-27 00:31:35 -08:00
David Brownell 4aa0a4d811 User's Guide mentions OS-specific installation
Specifically the Linux issue of needing "udev" rules, and MS-Windows
needing driver configuration.

Also, update the existing udev note to use the correct name of that
rules file in the source tree.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-21 09:29:24 -08:00
David Brownell 527e073bba User's Guide: "#" in filesystems names is bad
Sometimes MS-Windows users try to use filesystem names which include
the "#" character.  That's generally unwise, since it begins Tcl
comments.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-10 16:42:37 -08:00
David Brownell 84ac6bb0d9 User's Guide: clarify jtag_rclk advice
Not all cores and boards support adaptive clocking, so qualify
all advice to use it to depend on core and board support.

It's primarily ARM cores which support this; and many of the
newer ones (like Cortex-M series) don't.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-10 11:27:48 -08:00
David Brownell 3ea9e62189 Documentation: mention bug database
Have the User's Guide and BUG handling notes both reference
the fact that we now have a bug database at SourceForge.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-04 11:10:15 -08:00
David Brownell 5750e899e0 NOR: User's Guide updates
Remove long-obsolete text about "erase_check" affecting "flash info" output.
Move parts of that text to "protect_check", where it's still relevant; and
update the "flash info" description to mention the issue.

(This is still awkward.  It might be best to make "protect_check" mirror
"erase_check" by dumping what it finds, so "flash info" doesn't dump any
potentially-stale cache info.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-02 10:53:13 -08:00
David Brownell 804c0b2ad3 doc clarifications for server flags
The "-f" is a shortcut for "-c" ... and providing any "-c" options
means the "openocd.cfg" file isn't implicitly used.  Both the User's
Guide and the manual page were weak on these points, which has led
to some confusion.

Also update the manual page to include highlights of the search path
mechanism, including the facts that it exists and that "-s" adds to it.
Stop saying only the current directory is involved; the OpenOCD
script library is quite significant.

(Missing: complete manpage coverage of the search path, including a
FILES section listing all components and saying where the script
library is found.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-28 14:03:29 -08:00
David Brownell 08b0be94b5 User's Guide secton on target hardware setup
Highlight the needs to properly jumper development boards; to
make the OpenOCD configuration match the jumpering; and to have
a usable "reset-init" method when debugging early boot code.

Specific mention of the "ATX Mode" that seems useful on
many i.MX boards, forcing NAND boot.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-21 16:15:41 -08:00
David Brownell 20d1ef70e8 User's guide: mention lpc2000 checksum issue
Folk almost certainly want to have OpenOCD compute the checksum
when they modify the vector table.  However, that almost guarantees
that "verify_image" will fail.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-20 00:04:17 -08:00
Peter Korsgaard 000a1cfd01 nand flash support for s3c64xx
Identical to the existing 2412/2443 support except for the base address
and NFCONF value (bit 2 is reserved and should be written as 1 ref UM).

Tested on a s3c6410 board, but controller is identical in 6400/6410
except for 8bit MLC ECC support in 6410 which isn't supported by the
driver.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-14 21:07:46 +01:00
David Brownell b60dd35e33 User's Guide updates
Capture various bits of useful information that have come up on the
list but haven't yet gotten into the documentation:

 - Watchdog timers firing during JTAG debug need attention;

 - Some chips have special registers to help JTAG debug;

 - Cortex-M3 stepping example with IRQs and maskisr;

 - Clarifications re adaptive clocking:  not all ARMs do it, and
   explain it a bit better.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-13 23:33:53 -08:00
David Brownell 73566405b6 NOR: add optional "flash erase_address" sector padding
Add a NOR flash mechanism where erase_address ranges can be padded
out to sector boundaries, triggering a diagnostic:

  > flash erase_address 0x0001f980 16
  address range 0x0001f980 .. 0x0001f98f is not sector-aligned
  Command handler execution failed
  in procedure 'flash' called at file "command.c", line 647
  called at file "command.c", line 361
  >

  > flash erase_address pad 0x0001f980 16
  Adding extra erase range, 0x0001f800 to 0x0001f97f
  Adding extra erase range, 0x0001f990 to 0x0001fbff
  erased address 0x0001f980 (length 16) in 0.095975s (0.163 kb/s)
  >

This addresses what would otherwise be something of a functional
regression.  An earlier version of the interface had a dangerous
problem:  it would silently erase data outside the range it was
told to erase.  Fixing that bug turned up some folk who relied on
that unsafe behavior.  (The classic problem with interface bugs!)
Now they can get that behavior again.  If they really need it,
just specify "pad".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-13 23:33:25 -08:00
David Brownell c8267930c7 FreeBSD build fixes
Based on notes from Tomek Cedro <tomek.cedro@gmail.com> and
Steve Franks <bahamasfranks@gmail.com>.

In the User's Guide, sort the list of operating systems reported
through Tcl with $ocd_HOSTOS ... and include FreeBSD.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-10 10:06:58 -08:00
David Brownell ff647e6bb4 parport (mostly) doc fixes
The "parport_port" commands generally don't *require* a port_number;
they're of the "apply any parameter, then print result" variety.  Update
the User's Guide accordingly.

Some of those commands are intended to be write-once: parport_port,
and parport_cable.  Say so.

Use proper EBNF for the parport_write_on_exit parameter.

Parport address 0xc8b8 is evidently mutant.  Say so in the "parport.cfg"
file, to avoid breaking anyone with that mutant config.  But update the
User's Guide to include a sane example for the LP2 port.

Finally document the "presto_serial" command.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09 21:56:11 -08:00
David Brownell 1c5c57ec8e src/flash/nor: usage/help/doc updates
Make "usage" messages use the same EBNF as the User's Guide;
no angle brackets.  Improve and correct various helptexts.

Don't use "&function"; a function's name is its address.
Remove a couple instances of pointless whitespace; shrink a
few overlong lines; fix some bad indents.

Add TODO list entry re full support for NAND/NOR bank names.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09 10:25:03 -08:00
David Brownell fc9a2d0e6f src/server: usage/help/doc updates
Make "usage" messages use the same EBNF as the User's Guide;
no angle brackets.  Improve and correct various helptexts.

Specifically for the port commands, clarify that the number
is optional, and omitting it causes the current number to be
displayed.

Don't use "&function"; a function's name is its address.
Remove a couple instances of pointless whitespace; shrink a
few overlong lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09 00:55:41 -08:00
David Brownell 2a76c1bcf9 NAND: help/usage/doc updates
Usage messages should use the same EBNF as the User's Guide;
no angle brackets.  Be more complete too ... some params were
missing.  Improve and correct various helptexts.

Make user's guide refer to the NAND "driver" name, not the
controller name; that's a bit more precise.

Don't use "&function"; its name is its address.  Line up struct
initializers properly.  Remove some blank lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-08 23:18:46 -08:00
David Brownell c1cb20971e Coexist with quilt: rename PATCHES --> PATCHES.txt
The issues is on Win32, which ignores case in filesystem
and thus doesn't tolerate the quilt "patches" directory.

Rename, and add "patches" to .gitignore so that developers
can choose to use quilt for local patch management.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-08 17:20:47 -08:00
David Brownell 82c0fb5277 ARM966: help/usage updates
Usage syntax messages have the same EBNF as the User's Guide;
there should be no angle brackets in either place.

Fix the User's Guide to say where the magic CP15 bits are defined;
and add comments in case someone provides mcr/mrc methods.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:39:32 -08:00
David Brownell e7965cd3eb Xscale: User's Guide updates
Fix some EBNF goofs ... these commands have *optional* params, etc

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:34:44 -08:00
David Brownell a42bea654c ARM720: help/usage updates
Deprecate the "pass an instruction opcode" flavor of cp15
access in favor of the "arm mcr ..." and "arm mrc ..."
commands, which offer fewer ways to break things.

Use the same EBNF syntax in the code as for the user's guide.

Update User's Guide to say where to find those magic values
(which table in the ARM920 TRM).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:30:09 -08:00
David Brownell e0b6e5deef ARM720: help/usage updates
Deprecate the "pass an instruction opcode" flavor of cp15 access
in favor of the "arm mcr ..." and "arm mrc ..." commands, which
offer fewer ways to break things.

Use the same EBNF syntax in the code as for the user's guide.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:25:03 -08:00
David Brownell 199abf49ea ARM11: help/usage updates
Usage syntax messages have the same EBNF as the User's Guide;
there should be no angle brackets in either place.

Uupdate some helptext to be more accurate.

Fix the User's Guide in a few places to be more consistent (mostly
to use brackets not parentheses) and to recognize that parameter may
be entirely optional (in which case the command just displays output,
and changes nothing).  Also reference NXP, not Philips, for LPC chips.

Don't use "&function"; functions are like arrays, their address
is their name.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:21:24 -08:00
David Brownell 48d51e1719 ARM7/ARM9: help/usage updates
Provide helptext which was sometimes missing; update some of it
to be more accurate.

Usage syntax messages have the same EBNF as the User's Guide;
there should be no angle brackets in either place.

Fix the User's Guide in a few places to be more consistent (mostly
to use brackets not parentheses) and to recognize that parameter may
be entirely optional (in which case the command just displays output,
and changes nothing).  Also reference NXP, not Philips, for LPC chips.

Don't use "&function"; functions are like arrays, their address
is their name.  Shrink some overlong lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:20:14 -08:00
David Brownell 17921f51ab ARMv7: help/usage updates
Provide helptext which was sometimes missing; update some of it
to be more accurate.

Usage syntax messages have the same EBNF as the User's Guide;
there should be no angle brackets in either place.

Don't use "&function"; functions are like arrays, their address
is their name.  Shrink some overlong lines, remove some empties.

Add a couple comments about things that should change:  those
extra TCK cycles for MEM-AP reads are in the wrong place (that
might explain some problems we've seen); the DAP command tables
should be shared, not copied.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-07 16:18:01 -08:00
David Brownell b3bf1d12b2 streamline and document helptext mode displays
Most commands are usable only at runtime; so don't bother saying
that, it's noise.  Moreover, tokens like EXEC are cryptic.  Be
more clear: highlight only the commands which may (also) be used
during the config stage, thus matching the docs more closely.
There are

 - Configuration commands (per documentation)
 - And also some commands that valid at *any* time.

Update the docs to note that "help" now shows this mode info.

This also highlighted a few mistakes in command configuration,
mostly commands listed as "valid at any time" which shouldn't
have been.  This just fixes ones I noted when sanity testing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02 15:52:35 -08:00
David Brownell 384e9193e9 User's Guide: warn about the forum
Namely, that developers don't hang out; it's a users-only club.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-31 03:09:03 -08:00
Antonio Borneo 7c5acf8660 whitespace cleanup, mostly for docs
Remove useless space/tab at end of lines.
Remove spaces in indentation and replace with tab.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-30 11:51:29 -08:00
David Brownell ec297e4bf1 Fix Luminary FT2232 layout docs/configs
Most of this patch updates documentation and comments for various
Luminary boards, supporting two bug fixes by helping to make sense
of the current mess:

 - Recent rev C lm3s811 eval boards didn't work.  They must use
   the ICDI layout, which sets up some signals that the older
   boards didn't need.  This is actually safe and appropriate
   for *all* recent boards ... so just make "luminary.cfg" use
   the ICDI layout.

 - "luminary-lm3s811.cfg", was previously unusable!  No VID/PID;
   and the wrong vendor string.  Make it work, but reserve it
   for older boards where the ICDI layout is wrong.

 - Default the LM3748 eval board to "luminary.cfg", like the
   other boards.  If someone uses an external JTAG adapter, all
   boards will use the same workaround (override that default).

The difference between the two FT2232 layouts is that eventually
the EVB layout will fail cleanly when asked to enable SWO trace,
but the ICDI layout will as cleanly be able to enable it.  Folk
using "luminary.cfg" with Rev B boards won't see anything going
wrong until SWO support is (someday) added.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-28 12:59:47 -08:00
David Brownell 155a6a2c0b NOR: make flash_write_unlock() pad to sector end
Resolve a regression when using newish automagic "write_image"
modes, by always padding to the end of affected sectors.

Also document some issues associated with those automagic options,
in the User's Guide and also some related code comments.

We might need similar padding at the *beginning* of some sectors,
but this is a minimalist fix for the problems which have currently
been reported (plus doc updates).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-27 11:34:31 -08:00
Catalin Patulea 84dbf8ab5a Driver for USB-JTAG, Altera USB-Blaster and compatibles
The 10-pin JTAG layout used with these adapters is used by
a variety of platforms including AVR.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-26 15:05:06 -08:00
David Brownell e7f81c11c9 User's Guide: update GDB info
Advise leaving background polling enabled; fix broken URL;
add simple program startup example.
2009-12-26 10:35:24 -08:00
Dean Glazeski 3ac2a44041 AT91SAM9 NAND flash driver.
This creates the TCL interface for configuring an AT91SAM9 NAND flash
controller and implements the necessary functions to correctly work with
a NAND flash device connected to the chip.  This includes updates to the
driver list and the Makefile.am to support building the driver and also
houses the documentation update in openocd.texi.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19 13:26:33 -08:00
David Brownell abe8b43755 ETM: add "etm trigger_debug" command
In conjunction with manual register setup, this lets the ETM trigger
cause entry to debug state.   It should make it easier to test and
bugfix the ETM code, by enabling non-trace usage and isolating bugs
specific to thef ETM support.  (One current issue being that trace
data collection using the ETB doesn't yet behave.)

For example, many ARM9 cores with an ETM should be able to implement
four more (simple) breakpoints and two more (simple) watchpoints than
the EmbeddedICE supports.  Or, they should be able to support complex
breakpoints, incorporating ETM sequencer, counters, and/or subroutine
entry/exit criteria int criteria used to trigger debug entry.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19 13:09:19 -08:00
David Brownell 9abad965ab ETM trigger_percent becomes an ETB command
This command was misplaced; it's not generic to all traceport drivers,
only the ETB supports this kind of configuration.  So move it, and
update the relevant documentation.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19 13:06:46 -08:00
David Brownell 2c3e413d49 JTAG: shrink "scan_chain" output
Tweak the "scan_chain" output by removing column separators.  Also
remove the "current instruction" state ... which changes constantly.

Now its style resembles the "targets" output, and can even fit on
one line in standard terminals and in the PDF docs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-16 14:19:44 -08:00
mkdorg@users.sourceforge.net 646ce814b4 target: add basic dsp563xx support 2009-12-15 18:38:52 +01:00
David Brownell af79925eb1 jtag: add '-ignore-version' option
Add a "-ignore-version" to "jtag newtap" which makes the IDCODE
comparison logic optionally ignore version differences.

Update the "scan_chain" command to illustrate this by showing
the "*" character instead of the (ignored) version nibble.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-14 15:55:51 -08:00
David Brownell 81aec6be04 ARM: list number of HW breakpoints/watchpoints
When starting up, say how many hardware breakpoints and watchpoints
are available on various targets.

This makes it easier to tell GDB how many of those resources exist.
Its remote protocol currently has no way to ask OpenOCD for that
information, so it must configured by hand (or not at all).

Update the docs to mention this; remove obsolete "don't do this" info.
Presentation of GDB setup information is still a mess, but at least
it calls out the three components that need setup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07 14:57:44 -08:00
David Brownell 927ae6899d User's Guide: add quickie setup notes
Add a brief "setup with no customization" note showing the
how easily things can work if standard OpenOCD config scripts
already exist.  We've had some new users comment that this
information is needlessly hard to find, so that starting to
use OpenOCD is more difficult than it should be.

Plus describe a few other issues that come up when setting
up an OpenOCD server.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07 14:57:44 -08:00
David Brownell 5da53f17f0 User's Guide: mention ETM on ARM11 comes up too
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07 14:57:43 -08:00
Zachary T Welch 30a6e683b8 add 'flash list', rewrite 'flash banks'
Rename the existing 'flash banks' implementation as 'flash list', and
replace the broken 'flash_banks' TCL wrapper with a new command handler.

Adds documentation for the new 'flash list' command in the user guide.
2009-12-06 21:39:35 -08:00
David Brownell acd6d33994 User's Guide: more semihosting info
List it in the concept index, in the section about target software
changes a project might want to consider, and in the section about
debug messaging.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04 10:11:31 -08:00
Nicolas Pitre ed59dfc80a basic ARM semihosting support
Semihosting enables code running on an ARM target to use the
I/O facilities on the host computer. The target application must
be linked against a library that forwards operation requests by
using the SVC instruction that is trapped at the Supervisor Call
vector by the debugger.  The "hosted" library version provided
with CodeSourcery's Sourcery G++ Lite for ARM EABI is one example.

This is currently available for ARM9 processors, but any ARM
variant should be able to support this with little additional work.

Tested using binaries compiled with Sourcery G++ Lite 2009q1-161
and ARM RVCT 3.0.

[dbrownell@users.sourceforge.net: doc tweaks, NEWS]

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-03 18:42:01 -08:00
David Brownell a65e75ea34 Tcl and doc: update to match new 'arm mcr ...' etc
Make them match the C code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-01 01:10:19 -08:00
Marek Vasut 17b7600a59 XScale: initial PXA3xx support
[dbrownell@users.sourceforge.net: user's guide; variant param is optional]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-29 12:57:05 -08:00
David Brownell 4e56a2303b target: groundwork for "reset-assert" event
This defines a "reset-assert" event and a supporting utility
routine, and documents both how targets should implement it
and how config scripts should use it.  Core-specific updates
are needed to make this work.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27 18:50:20 -08:00
Andreas Fritiofson 0583cb0a0d support for scripts in $HOME/.openocd
Add $HOME/.openocd as the first default script search directory, allowing
the user to override the standard scripts.

Update the user guide with information on where OpenOCD expects to find
configuration files and scripts. Also fixed some minor formatting issues.

Add entry to NEWS as well.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-24 08:57:02 +01:00
Øyvind Harboe eeb4276deb arm926ejs: retire cp15 commands, handled by mrc/mcr.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-23 14:02:03 +01:00
David Brownell 85fe1506a2 ARM7/ARM9: remove old "debug commands"
Remove two commands that were documented as "debug commands"
and where "you probably don't want to use this".   We never
intended to support them, and at least one problem report
boiled down to using this when it shouldn't have been used.

Update the docs on the existing register commands to talk a
bit more about register access and cache behavior.  (Those
debug commands existed largely to *bypass* the cache.)  And
fix some minor doc goofs that snuck in with recent changes,
renaming "armv4_5" as "arm" and "arm9tdmi" as "arm9".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-20 16:21:29 -08:00
Zachary T Welch 4b18ef15a3 document new flash syntax
Updates the user documentation with the new syntax for defining
flash and nand banks.
2009-11-19 13:39:42 -08:00
David Brownell 56adbaffd0 ARMv7A: use standard disassembler
We no longer need v7A-specific code for this.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16 16:36:21 -08:00
David Brownell f86137066a ARM: "armv4_5" command prefix becomes "arm"
Rename the "armv4_5" command prefix to straight "arm" so it makes
more sense for newer cores.  Add a simple compatibility script.

Make sure all the commands give the same "not an ARM" diagnostic
message (and fail properly) when called against non-ARM targets.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16 16:36:09 -08:00
Zachary T Welch 555757175e Add 'nand verify' command
Add the 'nand verify' command to perform a dump and fake-write
simultaneously, checking the read bits against those generated by the
write process.  Appropriate user documentation for this command has
been added to the user guide as well.

The algorithm presently makes a relatively naive comparison.  Some chips
that use ECC may not verify correctly using this implementation, but the
new documentation provides details about this limitation.
2009-11-16 01:38:19 -08:00
David Brownell d47764ff71 ETM: start support for ETMv2+
ARM11 and newer cores include updated ETM modules.  Recognize
their version codes and some key config differences.  Sanity
checked on an OMAP2, with an ETM11RV r0p1 (ETMv3.1).

This still handles only scan chain 6, with at most 128 registers.
Newer cores (mostly, Cortex) will need to use the DAP instead.

Note that the newer ETM modules don't quite fit the quirky config
model of the older ones ... having more port widths is easy, but
the modes aren't the same.  That still needs to change.

Fix a curious bug ... how did the register cache NOT get saved??

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-12 20:24:41 -08:00
Jonas Horberg de735d375b parport: add support for the jtag_khz command.
Add the khz and speed_div functions to the parport interface driver.
Add the parport_toggling_time function that tells the parport driver
how long (in nanoseconds) it takes for the hardware to toggle TCK.

[dbrownell@users.sourceforge.net: tweak doc for clarity, mention
multimeter, and whitespace fixes]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-12 12:39:37 -08:00
David Brownell 61af6a6816 target: MMU-aware init for memory read/write
Start switching MMU handling over to a more sensible scheme.
Having an mmu() method enables MMU-aware behaviors.  Not having
one kicks in simpler ones, with no distinction between virtual
and physical addresses.

Currently only a handful of targets have methods to read/write
physical memory:  just arm720, arm920, and arm926.  They should
all initialize OK now, but the arm*20 parts don't do the "extra"
stuff arm926 does (which should arguably be target-generic).

Also simplify how target_init() loops over all targets by making
it be a normal "for" loop, instead of scattering its three parts
to the four winds.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 11:58:31 -08:00
Øyvind Harboe c202ba7d34 ARM11: remove old mrc/mcr commands
Switch to new commands in config scripts

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10 13:13:13 +01:00
David Brownell d70d9634bf finish removing deprecated/obsolete commands
It's been about a year since these were deprecated and, in most
cases, removed.  There's no point in carrying that documentation,
or backwards compatibility for "jtag_device" and "jtag_speed",
around forever.  (Or a few remnants of obsolete code...)

Removed a few obsolete uses of "jtag_speed":

 - The Calao stuff hasn't worked since July 2008.  (Those Atmel
   targets need to work with a 32KHz core clock after reset until
   board-specific init-reset code sets up the PLL and enables a
   faster JTAg clock.)
 - Parport speed controls don't actually work (tops out at about
   1 MHz on typical HW).
 - In general, speed controls need to live in board.cfg files (or
   sometimes target.cfg files), not interface.cfg ...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09 13:16:32 -08:00
David Brownell 9253ce9bae User's Guide: Flash/NAND doc tweaks
Rename the "Drivers, Options, and Commands" sections to be
just "Driver List" matching the earlier reference.  Add an
example of parallel CFI flash.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09 12:02:23 -08:00
David Brownell 4882647f3e User's Guide: bugfix global state info
The "$ocd_HOSTOS" variable was wrongly documented.  Fix its
documentation, and its value on Linux.

Shrink a few of the too-long lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09 09:40:55 -08:00
David Brownell 3e6f9e8d1e target.cfg: remove "-work-area-virt 0"
The semantics of "-work-area-virt 0" (or phys) changed with
the patch to require specifying physical or virtrual work
area addresses.  Specifying zero was previously a NOP.  Now
it means that address zero is valid.

This patch addresses three related issues:

 - MMU-less processors should never specify work-area-virt;
   remove those specifications.  Such processors include
   ARM7TDMI, Cortex-M3, and ARM966.

 - MMU-equipped processors *can* specify work-area-virt...
   but zero won't be appropriate, except in mischievous
   contexts (which hide null pointer exceptions).

   Remove those specs from those processors too.  If any of
   those mappings is valid, someone will need to submit a
   patch adding it ... along with a comment saying what OS
   provides the mapping, and in which context.  Example,
   say "works with Linux 2.6.30+, in kernel mode".  (Note
   that ARM Linux doesn't map kernel memory to zero ...)

 - Clarify docs on that "-virt" and other work area stuff.

Seems to me work-area-virt is quite problematic; not every
operating system provides such static mappings; if they do,
they're not in every MMU context...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-08 08:52:40 -08:00
David Brownell afed39c0fe User's Guide: TAP setup tweakage
Highlight that the "-expected-id" probably comes from vendor
documentation, and that it *should* be used where possible.

Don't use ircapture/irmask in examples, to help discourage
use of those params when they're not required.  Explain a
bit better about why/when those params get used.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 11:31:32 -08:00
David Brownell 72210fe3a3 User's Guide: more init info, autoprobing, etc
Mention the autoprobing as a tool that may be useful when
figuring out how to set up; and add a section showing how
to use that mechanism (with an example).

Strengthen the differences between config and run stage
descriptions; add a section for the latter.

Mention Dragonite.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-01 17:54:47 -08:00
David Brownell 19b84dafb0 ARM: rename "arm9tdmi vector_catch" to "arm9 ..."
And update doc accordingly.  That EmbeddedICE register was
introduced for ARM9TDMI and then carried forward into most
new chips that use EmbeddedICE.
2009-10-25 14:03:14 -07:00
David Brownell 75cdc8a260 arm9tdmi vector_catch: reserved means "don't use"
Bit 5 shouldn't be used.  Remove all support for modifying it.
Matches the exception vector table, of course ... more than one
bootloader uses that non-vector to help distinguish valid boot
images from random garbage in flash.
2009-10-23 12:28:03 -07:00
David Brownell 344bed2f7e ETM: rename registers, doc tweaks
The register names are perversely not documented as zero-indexed,
so rename them to match that convention.  Also switch to lowercase
suffixes and infix numbering, matching ETB and EmbeddedICE usage.

Update docs to be a bit more accurate, especially regarding what
the "trigger" event can cause; and to split the issues into a few
more paragraphs, for clarity.

Make "configure" helptext point out that "oocd_trace" is prototype
hardware, not anything "real".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-22 12:01:27 -07:00
Øyvind Harboe fcf1301e52 mww_phys retired. Replaced by generic mww phys in target.c 2009-10-21 22:25:33 +02:00
Øyvind Harboe e996452089 virt2phys is now implemented by target.c globally, retire target specific documentation. 2009-10-21 22:25:24 +02:00