]> git.sur5r.net Git - openocd/log
openocd
12 years agocfg: Add config file variants using the ftdi driver instead of ft2232
Freddie Chopin [Fri, 20 Jul 2012 08:19:51 +0000 (10:19 +0200)]
cfg: Add config file variants using the ftdi driver instead of ft2232

part 3 - files that are currently untested but verified with schematics

Change-Id: Ia00c3b6437bffcfa0d178e779926ad9309e289fe
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/755
Tested-by: jenkins
12 years agocfg: Add config file variants using the ftdi driver instead of ft2232
Freddie Chopin [Fri, 20 Jul 2012 07:37:10 +0000 (09:37 +0200)]
cfg: Add config file variants using the ftdi driver instead of ft2232

part 2 - files that are currently untested but assumed to work, as other configs using the same layout work
fine

Change-Id: Ifaa1904227ebdc394362ccaf3ad3c5384a716657
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/754
Tested-by: jenkins
12 years agocfg: Add config file variants using the ftdi driver instead of ft2232
Freddie Chopin [Thu, 19 Jul 2012 07:30:27 +0000 (09:30 +0200)]
cfg: Add config file variants using the ftdi driver instead of ft2232

part 1 - files that were tested an verified as working fine

Change-Id: If5986853a1cf118a9eb3b4c13b036d0f71c39624
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/534
Tested-by: jenkins
12 years agotelnet: cleanup comments
Spencer Oliver [Thu, 19 Jul 2012 14:11:45 +0000 (15:11 +0100)]
telnet: cleanup comments

seems comments were mangled during the last cleanup.

Change-Id: If759f62032705c7baffd3973e9717eb7e8a5d17c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/752
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agodoc: add missing ulink v1 to supported interfaces
Spencer Oliver [Mon, 23 Jul 2012 13:54:22 +0000 (14:54 +0100)]
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>
12 years agoBugfixes in mips32_pracc.c
Salvador Arroyo [Thu, 7 Jun 2012 14:44:34 +0000 (16:44 +0200)]
Bugfixes in mips32_pracc.c

When testing a pic32mx220f032b with different values
for adapter_khz and cpu clocks i was getting a lot of
corrupted data from the chip. From time to time
openocd fails with segmentation faults or is aborted
due to memory corruption.

Change-Id: I134743f75c477b3d55dc74ae4474598e153b4a4a
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/690
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoSpeed up mips_m4k_write_memory()
Salvador [Wed, 9 May 2012 15:21:19 +0000 (17:21 +0200)]
Speed up mips_m4k_write_memory()

Do not call mips32_cp0_read() if not needed.
This will speed up execution of mips_m4k_write_memory()
by near 2x, with parameter count = 1.

Change-Id: I7829a7802b6475bc6d4ac3f0632d8d239d1072da
Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/624
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoflash: reduce code duplication in stm32 flash probe
Andreas Fritiofson [Mon, 16 Jul 2012 22:43:46 +0000 (00:43 +0200)]
flash: reduce code duplication in stm32 flash probe

Remove a lot of the repetitive code in stm32f1x flash probe by converting
the large if-selector to a switch, moving the common checks outside it and
concentrating the failure handling to a single point.

Do the same with stm32f2x and stm32lx for consistency.

Change-Id: Ic0ecfb1533c49f5d2108cda5fd20c8372d7c71ef
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/746
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoflash: fix stm32 flash driver typo's
Spencer Oliver [Thu, 12 Jul 2012 11:30:31 +0000 (12:30 +0100)]
flash: fix stm32 flash driver typo's

Change-Id: I37f3fee063d7f8729e057dcfe8904651790439e6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/745
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoflash: handle zero when reading stm32 flash size reg
Spencer Oliver [Thu, 12 Jul 2012 11:29:38 +0000 (12:29 +0100)]
flash: handle zero when reading stm32 flash size reg

Some variants read 0 for the flash size register, rather than
failing lets assume we have max flash fitted.

Change-Id: Ie1fb4e73606f49268a6fd5921c3aef75bc4790d3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/744
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoflash: stm32l handle flash size read failure
Spencer Oliver [Thu, 12 Jul 2012 11:25:10 +0000 (12:25 +0100)]
flash: stm32l handle flash size read failure

Rather than failing if the flash size reg cannot be read lets assume
we have the max flash size fitted.

It is quite common on early ST silicon to not correct support this register.

Change-Id: Ife058d60ae0027faad2c929ebd5b7fe2ef27234d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/743
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoflash: add stm32l Revision X support
Spencer Oliver [Thu, 12 Jul 2012 11:15:26 +0000 (12:15 +0100)]
flash: add stm32l Revision X support

Revision X is not mentioned in the latest RM0038 rev5, however it has been
confirmed correct by ST using ST-LINK Utilty.

Change-Id: I65210e512ea25818a1d0d3b223502ebd7535b29d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/742
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agolpc1768.cfg abstracted and moved to lpc17xx.cfg
Vandra Akos [Sun, 27 May 2012 10:36:55 +0000 (12:36 +0200)]
lpc1768.cfg abstracted and moved to lpc17xx.cfg

- Moved variant-independent code to lpc17xx.cfg, which will be included from
lpc17??.cfg files automatically.
- lpc1768.cfg filled with variant-dependent code.

Change-Id: I7dabe6ed7da7be640ed38c13aaaa096b8796d9a0
Signed-off-by: Vandra Akos <axos88@gmail.com>
Reviewed-on: http://openocd.zylin.com/675
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: remove deprecated stm32 target configs
Andreas Fritiofson [Wed, 11 Jul 2012 19:48:09 +0000 (21:48 +0200)]
cfg: remove deprecated stm32 target configs

These were deprecated in commit 69ac20a.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Change-Id: I047872f8cd61b42aaca6588ab75566219e4a3f5d
Reviewed-on: http://openocd.zylin.com/741
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoAdd support for FT232H chips
Freddie Chopin [Thu, 5 Jul 2012 10:31:11 +0000 (12:31 +0200)]
Add support for FT232H chips

FT232H chips are new highspeed devices from FTDI. Basically these are a half of FT2232H (or a quarter of FT4232H), so only one channel which can be used as OpenOCD
interface. The chips are supported by libftdi 0.20 or later and by ftd2xx 2.08.12 or later.

Change-Id: Ic9a2c279167c3419a24f0d6befacbb83c4ffeb25
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/736
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Salvador Arroyo <sarroyofdez@yahoo.es>
12 years agoflash: don't write to FLASH_CR in stm32x_write_block
Andreas Fritiofson [Wed, 11 Jul 2012 14:23:48 +0000 (16:23 +0200)]
flash: don't write to FLASH_CR in stm32x_write_block

It's unnecessary and prevents reusing this function to fix
option byte writes.

Also try to disable flash writing after an error.

Change-Id: Ib5a7b768a1523e6b8da1555126fef4c1e60ab083
Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com>
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/479
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoTest the incoming debug_level, rather than the current.
Alan Bowman [Wed, 25 Jul 2012 18:58:11 +0000 (19:58 +0100)]
Test the incoming debug_level, rather than the current.

The existing code tests the current debug_level for validity, allowing
the user to set it too high and never change it after that.  The new
behaviour is to test the debug_level that the user has requested.

Change-Id: I85726a2e606c8d137e9b1cfe76fee865084844b1
Signed-off-by: Alan Bowman <alan.michael.bowman@gmail.com>
Reviewed-on: http://openocd.zylin.com/764
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agoRevert "When calling openocd from a shell like this:"
Alex Austin [Fri, 20 Jul 2012 12:58:14 +0000 (12:58 +0000)]
Revert "When calling openocd from a shell like this:"

This reverts commit e8641695c634109ebf5f1149923971770da1d28a

Original premise was wrong. Proper command is "shutdown", not "exit".

Change-Id: I07f5fe0dda9c24abe53628da986bfda0e406bb4a
Signed-off-by: Alex Austin <alex.austin@spectrumdsi.com>
Reviewed-on: http://openocd.zylin.com/757
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoboard: Add TI AM335x Evaluation Module
Tom Rini [Thu, 19 Jul 2012 18:29:54 +0000 (11:29 -0700)]
board: Add TI AM335x Evaluation Module

This patch adds the TI AM335x Evaluation Module (ti_am335xevm) board
configuration file.

Change-Id: Id3529e54972f8acd8c790ad55c8d0f4058a1a1f6
Signed-off-by: Tom Rini <trini@ti.com>
Reviewed-on: http://openocd.zylin.com/753
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoAdd config file for Lattice LC4032ZE CPLD (ispMACH 4000ZE family)
Freddie Chopin [Tue, 17 Jul 2012 08:03:32 +0000 (10:03 +0200)]
Add config file for Lattice LC4032ZE CPLD (ispMACH 4000ZE family)

Change-Id: Iefec12b30ff737317c454b472200fd7e7edde619
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/748
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoMPSSE: Add FT232H to supported chips
Salvador Arroyo [Sun, 27 May 2012 16:03:07 +0000 (18:03 +0200)]
MPSSE: Add FT232H to supported chips

Change-Id: I1ce1db7eb87a7cdeafc1f8b8b34594f6fa3bf1f8
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/677
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoAdd FTDI JTAG driver using MPSSE layer
Andreas Fritiofson [Sun, 29 Jan 2012 23:45:18 +0000 (00:45 +0100)]
Add FTDI JTAG driver using MPSSE layer

Based on ft2232.c but uses the MPSSE layer for low-level access, greatly
simplifying the JTAG logic. Remove all libftdi/FTD2XX code and all layout
specific code. Layout specifications are instead handled in Tcl.

Use a signal abstraction to enable Tcl configuration files to define
outputs for one or several FTDI GPIO. These outputs can then be
controlled using the ftdi_set_signal command. Special signal names are
reserved for nTRST, nSRST and LED (for blink) so that they, if defined,
will be used for their customary purpose.

Depending on the type of buffer attached to the FTDI GPIO, the outputs
have to be controlled differently. In order to support tristateable
signals such as nSRST, both a data GPIO and an output-enable GPIO can be
specified for each signal. The following output buffer configurations are
supported:

* Push-pull with one FTDI output as (non-)inverted data line
* Open drain with one FTDI output as (non-)inverted output-enable
* Tristate with one FTDI output as (non-)inverted data line and another
  FTDI output as (non-)inverted output-enable
* Unbuffered, using the FTDI GPIO as a tristate output directly by
  switching data and direction as necessary

The data and output-enables are specified as 16-bit bitmasks,
corresponding to the concatenation of the high and low FTDI GPIO
registers. To specify an unbuffered output, use the same bitmask
for both data and output-enable.

The adapter configuration file must also specify default values for the
FTDI data and direction GPIO registers, and the channel being used (if
different from 0).

Change-Id: I287a41d4c696cf5fc74eb10d5e63578b0dc7f826
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/452
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoAdd MPSSE communications layer for FTDI chips
Andreas Fritiofson [Sun, 29 Jan 2012 23:16:41 +0000 (00:16 +0100)]
Add MPSSE communications layer for FTDI chips

This is a higher-level libftdi replacement for use when implementing
protocol drivers for FT2232, FT2232H or FT4232H. It takes care of device
open/close and, unlike libftdi, also MPSSE command abstraction, command
queueing, buffer handling and return data parsing.

The FTDI device is accessed through libusb-1.0 in asynchronous mode.

Change-Id: I051adb574dcc39f8ca9cd7f6dbe6ae4aeea5f4c8
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/451
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agotarget: Cortex-M use consistent arm dap access
Spencer Oliver [Wed, 27 Jun 2012 22:49:37 +0000 (23:49 +0100)]
target: Cortex-M use consistent arm dap access

Purely cosmetic but use the same style as Cortex-A target, this makes
searching refs easier.

Change-Id: I732ad9701f561e2312c5d191f5aaffd3a2f2393d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/731
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agostlink: fix arm semihosting support
Spencer Oliver [Tue, 3 Jul 2012 14:50:24 +0000 (15:50 +0100)]
stlink: fix arm semihosting support

Add missing arm cmd handlers that enable semi hosting support to work as
expected.

Change-Id: I063d82c48b82b4f6aed4efc4b08ea752d78e9047
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/734
Tested-by: jenkins
Reviewed-by: Alan Bowman <alan.michael.bowman@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agoflash: add stm32f3x support
Spencer Oliver [Wed, 4 Jul 2012 20:19:17 +0000 (21:19 +0100)]
flash: add stm32f3x support

add support for the new stm32f3x family from stmicro:
http://www.st.com/stm32f3

Change-Id: Icd1db95bb2767d9c0ecef24deefa92b4fdaa4f14
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/735
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
12 years agojtag: fix opendous reset command
Stefan Mahr [Wed, 27 Jun 2012 22:53:54 +0000 (00:53 +0200)]
jtag: fix opendous reset command

This cast to uint16_t is not (host) endianess save.
Depending on compiler usb_out_buffer[1] may be undefined.

Change-Id: If686e5d5da39541329c340bbdef472ee7ab0281c
Signed-off-by: Stefan Mahr <stefan.mahr@sphairon.com>
Reviewed-on: http://openocd.zylin.com/732
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agotarget: detect correct Cortex-M tar auto increment size
Spencer Oliver [Wed, 27 Jun 2012 22:25:07 +0000 (23:25 +0100)]
target: detect correct Cortex-M tar auto increment size

The ADIv5 spec guarentees that tar_autoincr_block will be 10bits.
Make this the default for Cortex-M family until we detect a Cortex-M3/M4,
we then change autoincrement to 12bits.

Change-Id: Ie8c89134aa036879bdd8a3c312cee9715dbc6913
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/730
Tested-by: jenkins
Reviewed-by: simon qian <simonqian.openocd@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agojtag: remove redundant id check
Spencer Oliver [Tue, 26 Jun 2012 12:12:14 +0000 (13:12 +0100)]
jtag: remove redundant id check

commit 5b0a1315948252ddde03fc74763ef8300c5f329c removed the need to check
for 0xffffffff.

Change-Id: Ib4d99bf1797ccd868ec15631dbc16079571a8dd6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/728
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoWhen calling openocd from a shell like this:
Stian Skjelsad [Sat, 18 Feb 2012 15:10:19 +0000 (16:10 +0100)]
When calling openocd from a shell like this:

openocd -f board/sheevaplug.cfg -c init -c exit

the calling shell will believe that openocd exited with an error due to exitval will be non-zero

This is not tested against incomming telnet

Change-Id: I63d15715a7b46f39a7de261a45039f8c3cad7a98
Signed-off-by: Stian Skjelstad <stian@nixia.no>
Reviewed-on: http://openocd.zylin.com/470
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agotarget.c, jim_target_md using command_print_sameline
Vandra Akos [Fri, 25 May 2012 01:02:55 +0000 (03:02 +0200)]
target.c, jim_target_md using command_print_sameline

jim_target_md is supposed to print out results with command_print in
hexdump format. It was using command_print which appends a newline character
aftre every invocation. Using command_print_sameline instead

Change-Id: Iaff03021acc38d54b5a082cb58b82aa4449c0715
Signed-off-by: Vandra Akos <axos88@gmail.com>
Reviewed-on: http://openocd.zylin.com/669
Tested-by: jenkins
Reviewed-by: Alexander Osipenko <sipych@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agotarget/target.c, jim_target_md refractored
Vandra Akos [Thu, 24 May 2012 13:17:34 +0000 (15:17 +0200)]
target/target.c, jim_target_md refractored

 - Added a few lines of comment before the function explaining the usage and the
output generated by the command
 - Added a few lines of comment in the body explaining what is happening to improve
code readability
 - Renamed a few variables to improve readability:
    * a -> addr
    * b -> dwidth
    * c -> count
 - Added a new variable, named byte to contain the number of bytes to read, instead
of overwriting the count parameter, to avoid confusion between the two values.

Change-Id: I5828ec0f5aadaa39becec7b84f198756bb2c3d41
Signed-off-by: Vandra Akos <axos88@gmail.com>
Reviewed-on: http://openocd.zylin.com/665
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoAdd a bit-level transfer queue
Andreas Fritiofson [Sun, 12 Feb 2012 21:29:50 +0000 (22:29 +0100)]
Add a bit-level transfer queue

Interface drivers regularly need to keep track of where each part of a long
read buffer should be copied, once that data arrives. Both source and
destination are often at an arbitrary bit offset.

This queued bit-level copy can help with that, by allowing the driver to
perform postponed reads from the receive buffer already when building the
transmit buffer, and have those reads executed at a later time when data is
available.

For simplicity, it uses the linked list implementation list.h imported from
the Linux kernel.

Change-Id: I06862a0a6f057cbbcacfb021f17a795195faded2
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/450
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agotopic: flash: description/id added for ATSAM3SD8C
Mike Crowe [Tue, 29 May 2012 20:23:27 +0000 (15:23 -0500)]
topic: flash: description/id added for ATSAM3SD8C

New flash description for ATSAM3SD8C used on SAM3S-EK2 development boards.  Name used
is "at91sam3sd8c" and chipid is 0x29ab0a60.  Mirrors description of other similar parts.

Change-Id: I7fc4b82e7969451645ab067223663f08b76d866b
Signed-off-by: Mike Crowe <mpcrowe@gmail.com>
Reviewed-on: http://openocd.zylin.com/684
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoJ-Link: Initialize .transports to suppress warning.
Alexander Osipenko [Fri, 25 May 2012 10:39:13 +0000 (14:39 +0400)]
J-Link: Initialize .transports to suppress warning.

jtag_interface.transports field was left uninitialized, which triggers warning message
on program startup.

Although hardware natively supports SWD interface, no software support
currently present, so the value choosen to be <jtag_only>.

Change-Id: I2da41790b1850950af416cec4362d5b7bf927b2b
Signed-off-by: Alexander Osipenko <sipych@gmail.com>
Reviewed-on: http://openocd.zylin.com/670
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoChanged SAM4S Erase for effective Sector erase
Olivier Schonken [Mon, 4 Jun 2012 05:33:15 +0000 (07:33 +0200)]
Changed SAM4S Erase for effective Sector erase

In the previous iteration, the page counter for erases would not be updated with
the erase size.  This patch keeps the page counter synced with the sector counter.

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
Change-Id: I95e56a3257b2ad8301c9f28167b842fa6466334f
Reviewed-on: http://openocd.zylin.com/686
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoFix idcode end of chain flag.
Mathias K [Wed, 9 May 2012 14:24:35 +0000 (16:24 +0200)]
Fix idcode end of chain flag.

For multi core cpus with cores without an idcode this doesn't work
because the extra bit for every core and a n-bit shift in the data
stream.

Change-Id: Iba0ad9422ea55c01492b27b936d028719be31180
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/618
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agokinetis: update support for all program flash granularities
Christopher Kilgour [Wed, 23 May 2012 18:05:28 +0000 (11:05 -0700)]
kinetis: update support for all program flash granularities

Updates the Kinetis NOR flash support to handle all known block and sector
sizes.  Previously only 2kiB sectors were hard-coded, now all four known
combinations non-volatile sector sizes are supported.

The premise of separating Kinetis Program Flash (PFLASH) from FlexNVM is
also introduced.  This means each "block" of flash (in Freescale terms) is
treated as a bank in OpenOCD.  Correspondingly, the existing board
configuration for the TWR-K60M512 eval system is updated to recognize two
banks instead of one.

A board config for the TWR-K60F120M is also added.

Bank and sector erase and programming has been checked with both of the
mentioned eval boards.

Change-Id: Iae2d10ebf8f548d0a3698df5430bbbe1ccadc58a
Signed-off-by: Christopher Kilgour <techie@whiterocker.com>
Reviewed-on: http://openocd.zylin.com/663
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoJ-Link: Forcibly select JTAG transport
Alexander Osipenko [Mon, 28 May 2012 07:26:34 +0000 (11:26 +0400)]
J-Link: Forcibly select JTAG transport

Some versions of Segger's software do not select JTAG interface by default.
Do it in the intial setup.

Firmware version check code still present, with updated set of unsupported.

Note from Segger:
Alright, we were not aware of that OpenOCD does not select the interface
before it starts communicating with the target.  A debugger should always
select the appropriate target interface before it starts communicating with the target,
since otherwise it could also happen that a previous session with another debugger
had selected SWD and the interface was not switched again by OpenOCD.

Change-Id: I5b4eab7e0e3625ec32be75a36d89e16d17e899bf
Signed-off-by: Alexander Osipenko <sipych@gmail.com>
Reviewed-on: http://openocd.zylin.com/667
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoJLink: added jlink_usb_io() function
Alexander Osipenko [Mon, 28 May 2012 13:22:35 +0000 (17:22 +0400)]
JLink: added jlink_usb_io() function

jlink_usb_io() function added for basic communication,
since jlink_usb_message() is more specific to JTAG transactions.

To verify the patch issue "jlink config" command.

Change-Id: Id7d10bd5e8985d4c77f2e0ca47fb6033db2877bf
Signed-off-by: Alexander Osipenko <sipych@gmail.com>
Reviewed-on: http://openocd.zylin.com/679
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoJ-Link Unsupported firmware version check
Alexander Osipenko [Fri, 25 May 2012 09:27:48 +0000 (13:27 +0400)]
J-Link Unsupported firmware version check

OpenOCD does not work with the latest firmware versions
of Segger J-Link.

Latest working version: V4.42c
Unsupported versions: 4.44 to 4.46f, 4.20 to 4.30

Older versions of firmware can be found here:
  http://www.segger.com/j-link-older-versions.html

The firmware versions does not correspond directly with
"Software and documentation pack for Windows", it may be
distinguished by the "compile" date in the information string.

Print an warning message if unsupported firmware version detected.

Change-Id: Id7d1f965b8ce2fdbcd0026a85ddd093e2fa48720
Signed-off-by: Alexander Osipenko <sipych@gmail.com>
Reviewed-on: http://openocd.zylin.com/666
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agodocs: J-Link commands added to the manual
Liviu Ionescu [Tue, 29 May 2012 11:52:04 +0000 (14:52 +0300)]
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>
12 years agolpc1768.cfg pulled out constants from flash init as variables
Vandra Akos [Sun, 27 May 2012 10:15:21 +0000 (12:15 +0200)]
lpc1768.cfg pulled out constants from flash init as variables

Seems like an esthetic change, but it will allow easy support for
other lpc17xx devices.

Change-Id: I2cb953ce1afdd82f6ca65b38d5557a28416f895e
Signed-off-by: Vandra Akos <axos88@gmail.com>
Reviewed-on: http://openocd.zylin.com/674
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoAT91SAM7 Flash: fixed redundant assignation warning
Mirela Tauciuc [Fri, 22 Jun 2012 08:59:41 +0000 (11:59 +0300)]
AT91SAM7 Flash: fixed redundant assignation warning

Change-Id: Iffacdce9ce90c4ea7e0c8647860a0056b952f387
Signed-off-by: Mirela Tauciuc <mirela.tauciuc@gmail.com>
Reviewed-on: http://openocd.zylin.com/691
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
12 years agotools: initial.sh fixed to accept spaces in current path
Liviu Ionescu [Tue, 29 May 2012 16:41:02 +0000 (19:41 +0300)]
tools: initial.sh fixed to accept spaces in current path

When changing the path to the hooks folder, the path needs to be
surrounded by quotation marks, to avoid failures when the current
path contains spaces (not only legal, but a common case on
Mac OS X).

Change-Id: I8f180ab5f26fab00a7d78ebfe5713d4146c27452
Signed-off-by: Liviu Ionescu <ilg@livius.net>
Reviewed-on: http://openocd.zylin.com/683
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agodocs: update interface support in README
Spencer Oliver [Tue, 29 May 2012 15:01:21 +0000 (16:01 +0100)]
docs: update interface support in README

Change-Id: Id4b982ee426dedc85b643a71c1cdba67d0dd0ffd
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/682
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agodocs: include static members in doxygen output
Spencer Oliver [Fri, 25 May 2012 13:05:23 +0000 (14:05 +0100)]
docs: include static members in doxygen output

Change-Id: I1867e8d7a3bed1a399c0790f63fee68fb6b299c4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/672
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agobuild: remove src file execute permission
Spencer Oliver [Fri, 25 May 2012 12:40:24 +0000 (13:40 +0100)]
build: remove src file execute permission

Change-Id: I42a250cdfcd03424a63cd1a255f9cf4a3c6e3ccd
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/671
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agoJim_GetResult was called twice
Vandra Akos [Wed, 23 May 2012 10:47:55 +0000 (12:47 +0200)]
Jim_GetResult was called twice

Removed the superflous call to Jim_GetResult,
as we are reading in the result to a variable
anyways in the next instruction.

Change-Id: Idc96400737dc15e28304e97bcea79fa6c7a88ae1
Signed-off-by: Vandra Akos <axos88@gmail.com>
Reviewed-on: http://openocd.zylin.com/661
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agotarget: fix segfault in arm7_9 8/16bit read
Spencer Oliver [Wed, 23 May 2012 11:31:16 +0000 (12:31 +0100)]
target: fix segfault in arm7_9 8/16bit read

Seems I5347352e7595686634bd0de13fcf6de6e55027b0 introduced an issue when
reading 8/16 bit data - the in buffer was always set to 32bits.

Change-Id: Ife2bb6a20fcb3ec0e486655512164f25ae9196b4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/660
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
12 years agojtag: fix incorrect LOG_DEBUG abs_chain_position
Spencer Oliver [Tue, 22 May 2012 16:00:55 +0000 (17:00 +0100)]
jtag: fix incorrect LOG_DEBUG abs_chain_position

Call jtag_tap_add before LOG_DEBUG otherwise abs_chain_position does
not get correctly set.

Change-Id: I47bd00cc83259c8bfd5551e08c3bb2ebeb5993f5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/658
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
12 years agoboard: Add Sony Ericsson J100I Phone
Mathias K [Wed, 9 May 2012 20:36:32 +0000 (22:36 +0200)]
board: Add Sony Ericsson J100I Phone

This patch add the Sony Ericsson J100I Phone to the board configurations.

Change-Id: I083ddf067c8ecdfdda0404fe9e9df980dbb86fe8
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/631
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agoconfig: Add TI Calypso CPU configuration
Mathias K [Fri, 25 May 2012 08:57:26 +0000 (10:57 +0200)]
config: Add TI Calypso CPU configuration

This patch add the TI Calypso CPU to the configuration files.

Change-Id: Ieb462960391c4a2c630d7a83699c3b6e8162ace9
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/630
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agojtag: fix osbdm.c typo
Bill Traynor [Tue, 22 May 2012 16:44:16 +0000 (12:44 -0400)]
jtag: fix osbdm.c typo

Fixing up tiny spelling error of "receive" vs. "recieve".

Change-Id: Ib143d7fdb24ac1f2b7bd4ae90cadaf2e12760ff7
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/659
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agojtag: fix opendous typo
Spencer Oliver [Tue, 22 May 2012 11:21:55 +0000 (12:21 +0100)]
jtag: fix opendous typo

Change-Id: Ia88c32f2394bde2048bdd73625e7664c93a9a87d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/656
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agojtag: remove opendous clang warnings
Spencer Oliver [Tue, 22 May 2012 11:17:49 +0000 (12:17 +0100)]
jtag: remove opendous clang warnings

Change-Id: I0285c99507931e7d13aad36f4fc559c29a52faca
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/655
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agostlink: check read_reg result
Spencer Oliver [Tue, 22 May 2012 11:33:40 +0000 (12:33 +0100)]
stlink: check read_reg result

Change-Id: I284824aa6f5eae8f6e910a482e9f7435e649fc0d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/657
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
12 years agotarget: target.h typo and comment cleanup
Spencer Oliver [Mon, 21 May 2012 16:24:17 +0000 (17:24 +0100)]
target: target.h typo and comment cleanup

Change-Id: Ib751803754672bf556f4f65bd3f5621f6bbb7f0c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/654
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
12 years agotarget: enable TARGET_EVENT_EXAMINE_* events
Spencer Oliver [Thu, 10 May 2012 21:36:23 +0000 (22:36 +0100)]
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>
12 years agotarget: enable TARGET_EVENT_RESUME_* events
Spencer Oliver [Mon, 14 May 2012 12:18:19 +0000 (13:18 +0100)]
target: enable TARGET_EVENT_RESUME_* events

Change-Id: I7d8378f9f34c6674db8c8b29d1a961389578e921
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/640
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
12 years agotarget: remove legacy target events
Spencer Oliver [Mon, 14 May 2012 12:15:25 +0000 (13:15 +0100)]
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>
12 years agotarget: remove duplicate target events
Spencer Oliver [Thu, 10 May 2012 20:03:31 +0000 (21:03 +0100)]
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>
12 years agotarget: disable armv6m unaligned memory access
Spencer Oliver [Tue, 15 May 2012 13:37:06 +0000 (14:37 +0100)]
target: disable armv6m unaligned memory access

Change-Id: I42704cf80939ab9c9d4f402d2cd51c196e2fadb3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/645
Tested-by: jenkins
12 years agoUserGuide: Updated list of supported interfaces, boards, and targets.
Bill Traynor [Tue, 15 May 2012 17:08:27 +0000 (13:08 -0400)]
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>
12 years agobuild: add helper/types.h to config.h
Spencer Oliver [Thu, 17 May 2012 11:27:30 +0000 (12:27 +0100)]
build: add helper/types.h to config.h

this header is used in numerous files and adding to config.h
simplifies its use globally.

Change-Id: Id724a9950b90504721233022c7fb5768e9bc5548
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/649
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agoNEWS: add headline items
Spencer Oliver [Mon, 14 May 2012 12:05:56 +0000 (13:05 +0100)]
NEWS: add headline items

Change-Id: Ie78b0a171af76cf647deef501245caf54209d9f8
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/639
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agoflash/nor/driver.h: typo fix
Christopher Kilgour [Sun, 20 May 2012 00:29:30 +0000 (17:29 -0700)]
flash/nor/driver.h: typo fix

Change-Id: Ie260f3c38b648e66958c014658bb6860171a7cc9
Signed-off-by: Christopher Kilgour <techie@whiterocker.com>
Reviewed-on: http://openocd.zylin.com/653
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agostlink: add myself to copyright header
Spencer Oliver [Thu, 17 May 2012 11:42:13 +0000 (12:42 +0100)]
stlink: add myself to copyright header

Change-Id: I39e23b38ee630b80bccb5ff6b5819efa0fcb120a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/651
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agostlink: remove superfluous stlink_usb.h
Spencer Oliver [Thu, 17 May 2012 11:34:58 +0000 (12:34 +0100)]
stlink: remove superfluous stlink_usb.h

Change-Id: I34bc59b35fafd3fa659549e350b91310c5b33dd4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/650
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agocontrib: enable cortex-m0 and cortex-m4 libdcc support
Spencer Oliver [Tue, 15 May 2012 12:36:11 +0000 (13:36 +0100)]
contrib: enable cortex-m0 and cortex-m4 libdcc support

Change-Id: Ib8ff645d1e5b8baca02de8ea95b629d88b203969
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/644
Tested-by: jenkins
12 years agoremote_bitbang: fix native windows build
Spencer Oliver [Thu, 17 May 2012 10:54:04 +0000 (11:54 +0100)]
remote_bitbang: fix native windows build

Change-Id: Ied29ade0346c4595ffc1dafa788e2d5a595e0de3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/648
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agoremote_bitbang: missed closing brace in macro REMOTE_BITBANG_RAISE_ERROR
Alexander Osipenko [Thu, 17 May 2012 08:53:33 +0000 (09:53 +0100)]
remote_bitbang: missed closing brace in macro REMOTE_BITBANG_RAISE_ERROR

Change-Id: I591308bd98810ef6361106c207c55b83c3a83890
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/647
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agodocs: Fix incorrect -rtos option values
Peter Stuge [Mon, 14 May 2012 15:47:09 +0000 (17:47 +0200)]
docs: Fix incorrect -rtos option values

Commit 9ca1592cb9fe4e61ee5bc327345fdfc254c9fe13 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
12 years agodocs: add initial target rtos support info
Spencer Oliver [Mon, 14 May 2012 14:09:42 +0000 (15:09 +0100)]
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>
12 years agojtag: add opendous and estick support
Spencer Oliver [Fri, 11 May 2012 08:10:54 +0000 (09:10 +0100)]
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
12 years agostlink: add armv7m stlink handling
Spencer Oliver [Fri, 11 May 2012 08:39:58 +0000 (09:39 +0100)]
stlink: add armv7m stlink handling

This enables us to better handle some of the low level functions that the
stlink does not support. It also enables us to share a few more of the
standard cortex_m3 functions if necessary.

Change-Id: I7a2c57450122012ec189245d8879d8967913e00e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/637
Tested-by: jenkins
12 years agoflash: blank check use default_flash_blank_check
Spencer Oliver [Thu, 10 May 2012 09:33:07 +0000 (10:33 +0100)]
flash: blank check use default_flash_blank_check

Use default_flash_blank_check, this will use the much faster
blank_check_memory handler if supported - 15x quicker on stm32f4.

Otherwise it will fall back to using the slower default_flash_mem_blank_check.

Change-Id: Ia231b3e95468c9e92594dbdbe1fa2d69e1506fc3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/632
Tested-by: jenkins
12 years agoflash: fix protect check for pic32mx1x/2x family
Spencer Oliver [Thu, 3 May 2012 09:44:42 +0000 (10:44 +0100)]
flash: fix protect check for pic32mx1x/2x family

Change-Id: Ib2692d8b79e52cd40f429008047494aa7f552984
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/612
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agojimtcl: update jim to fix make clean bug
Spencer Oliver [Fri, 11 May 2012 09:04:38 +0000 (10:04 +0100)]
jimtcl: update jim to fix make clean bug

jimtcl 0.73 has a issue when make clean is called.
we have only included that fix as this is close to a release to update
to jimtcl master.

Change-Id: I5791ff32a98bd76e52feb9475605cbecf58420e5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/638
Tested-by: jenkins
12 years agostlink: fix stlink api2 single step
Spencer Oliver [Tue, 8 May 2012 12:51:09 +0000 (13:51 +0100)]
stlink: fix stlink api2 single step

This makes the newer v2 api behave as per the v1 api, eg. single stepping
masks all interrupts.

A better long term solution is to use same behaviour as a cortex-m3
target, see CORTEX_M3_ISRMASK_AUTO.

Change-Id: Iaf9f9adf225cf274faaac938050bb996582aa98f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/621
Tested-by: jenkins
12 years agostlink: add stlink_api cmd
Spencer Oliver [Fri, 4 May 2012 13:31:25 +0000 (14:31 +0100)]
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>
12 years agostlink: stlink/v1 use v2 api if supported
Spencer Oliver [Fri, 4 May 2012 11:48:56 +0000 (12:48 +0100)]
stlink: stlink/v1 use v2 api if supported

The api v2 is supported on the stlink/v1 if it has a least v11 firmware.

Change-Id: Idfdb5a7f5a5881326017451ae9b6004eeaa46a96
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/616
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agomips: support connecting under reset
Spencer Oliver [Tue, 1 May 2012 13:29:43 +0000 (14:29 +0100)]
mips: support connecting under reset

Some targets support connecting while the target's srst is asserted.
Tested on pic32 family.

Change-Id: I0d20c40af6d031d1306043893e95e61f484c0a87
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/608
Tested-by: jenkins
12 years agoUse hardware reset and connect under reset on boards with ST-LINK/V2, as
Freddie Chopin [Tue, 1 May 2012 17:47:28 +0000 (19:47 +0200)]
Use hardware reset and connect under reset on boards with ST-LINK/V2, as
now it is supported.

Change-Id: Id3b2ca9a2270974a5f453323f9057ecece400c94
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/609
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfg: add stm320518-eval onboard stlink config
Spencer Oliver [Thu, 3 May 2012 15:09:09 +0000 (16:09 +0100)]
cfg: add stm320518-eval onboard stlink config

Change-Id: Ie92a87ce077c538fdd04af37c798e0a8054b423a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/610
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
12 years agostlink: support connecting under reset
Spencer Oliver [Tue, 1 May 2012 13:00:27 +0000 (14:00 +0100)]
stlink: support connecting under reset

Some targets support connecting while the target's srst is asserted.
Tested on stm32 family.

Change-Id: I1197dd721a1e1cbf95ee77dfd8e1082b165b22a9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/607
Tested-by: jenkins
12 years agocortex-m3: support connecting under reset
Spencer Oliver [Tue, 1 May 2012 12:18:42 +0000 (13:18 +0100)]
cortex-m3: support connecting under reset

Some targets support connecting while the target's srst is asserted.
Tested on stm32 family.

Change-Id: I9df43623025e37832155aeee7aa099b844b85f16
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/606
Tested-by: jenkins
12 years agocfi: fix write_bank segfault with spansion flash on armv7m
Aurelien Jacobs [Tue, 8 May 2012 18:53:18 +0000 (20:53 +0200)]
cfi: fix write_bank segfault with spansion flash on armv7m

cfi_spansion_write_block() passes an arm_algorithm struct to
target_run_algorithm() which in turn calls armv7m_start_algorithm()
which expect an armv7m_algorithm struct.
As armv7m_algorithm is bigger than arm_algorithm, when
armv7m_start_algorithm() writes in the struct, it overrun the buffer,
writting junk on the stack, which latter on generates a segfault.

This patch ensure we use a properly sized armv7m_algorithm struct
when the target is an armv7m.

Change-Id: I4ab67c15ae4bb72454414a81b92a4231dcdb2239
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Reviewed-on: http://openocd.zylin.com/623
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
12 years agocfi: fix cfi arch check regression
Spencer Oliver [Thu, 3 May 2012 15:34:16 +0000 (16:34 +0100)]
cfi: fix cfi arch check regression

seems 9933fa334de551096674d4044ed7ac2152213e8b introduce a regression
if the target was anything other than armv4_5 or armv7m.

Just check that we have an arm target.

Change-Id: I67c05138e5be2952ee92e9bfa15e1d050844462a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/615
Tested-by: jenkins
Reviewed-by: Aurelien Jacobs <aurel@gnuage.org>
12 years agocfi: check supported arch
Spencer Oliver [Thu, 3 May 2012 15:30:31 +0000 (16:30 +0100)]
cfi: check supported arch

check that the cfi driver supports the current target arch.

Change-Id: I8a95908684de67bf1657d1956f2573662a641cc1
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/614
Tested-by: jenkins
Reviewed-by: Aurelien Jacobs <aurel@gnuage.org>
12 years agobuild: use generic name for arm_algorithm vars
Spencer Oliver [Thu, 3 May 2012 15:24:11 +0000 (16:24 +0100)]
build: use generic name for arm_algorithm vars

This makes the code a bit easier to read as arm_algorithm can
refer to other arch's, not just armv4_5.

Change-Id: I78c99d40f34cda04e06f2daee75b48ff40a1d23d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/613
Tested-by: jenkins
Reviewed-by: Aurelien Jacobs <aurel@gnuage.org>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agobuild: add missing erase_check loader src
Spencer Oliver [Tue, 1 May 2012 08:48:09 +0000 (09:48 +0100)]
build: add missing erase_check loader src

Change-Id: I1534c1ea1606fda9eb6ffa6a11a708f8c8a3d46a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/605
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agoarmv7m: update crc/erase_check loaders for cortex-m0
Spencer Oliver [Tue, 1 May 2012 08:46:07 +0000 (09:46 +0100)]
armv7m: update crc/erase_check loaders for cortex-m0

Use loaders that have been built for cortex-m0, making them usable for both
cortex-m0 and cortex-m3 families.

Change-Id: Ifd82be87eaec2cb96464290c80800cec3630d619
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/604
Tested-by: jenkins
12 years agocontrib: fix Neo1973 udev permission typo
Spencer Oliver [Fri, 11 May 2012 08:06:05 +0000 (09:06 +0100)]
contrib: fix Neo1973 udev permission typo

Change-Id: I6d5ad0cc28e0cb52104ead9e974b8b1ed92d9cdc
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/636
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agoflash: use correct stm32f0 flash size register
Spencer Oliver [Mon, 30 Apr 2012 13:29:18 +0000 (14:29 +0100)]
flash: use correct stm32f0 flash size register

The stm32f0 parts use a different address then the rest of the family.
Add a function that returns the correct FLASH_SIZE reg depending on variant.

Change-Id: Idb41580f7162f395b347cec034d6b745847326b7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/601
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agocfg: increase stm32f0discovery board working area
Spencer Oliver [Mon, 30 Apr 2012 13:30:12 +0000 (14:30 +0100)]
cfg: increase stm32f0discovery board working area

Change-Id: Iea166ee27fc60bbfdeb851fdcf71509f3984f72f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/602
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agocfg: increase stm32f0 default working area
Spencer Oliver [Mon, 30 Apr 2012 13:45:23 +0000 (14:45 +0100)]
cfg: increase stm32f0 default working area

The smallest stm32f0 has 4k sram, so use this as the default.

Change-Id: I9097be9608da92b1b9da504e5bacc1280c86907a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/603
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
12 years agocfg: Deleted duplicate busblaster.cfg and renamed original.
Bill Traynor [Tue, 8 May 2012 13:32:35 +0000 (09:32 -0400)]
cfg: Deleted duplicate busblaster.cfg and renamed original.

The busblaster.cfg was contributed on April 23, 2012 and is a
duplicate of dp_busblaster.cfg that was contributed on Oct. 23,
2011.  Therefore, deleting the second version.  Also, renaming
the original dp_busblaster.cfg to simply busblaster.cfg, as this
name is more concise.

Change-Id: Iccb1f10f53dbbb248b1ff4c6295eaf67c32247c1
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/622
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
12 years agocfg: Fixed product link to Flyswatter2
Bill Traynor [Mon, 7 May 2012 19:54:51 +0000 (15:54 -0400)]
cfg: Fixed product link to Flyswatter2

Fixed the product link to the Flyswatter2 debugger:
http://www.tincantools.com/product.php?productid=16153

Change-Id: I7d65e8c94d4521e61b9ae72a5ce14b140b775697
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/620
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
12 years agocfg: add default pid/vid pair to beaglebone board cfg.
Bill Traynor [Mon, 7 May 2012 18:38:16 +0000 (14:38 -0400)]
cfg: add default pid/vid pair to beaglebone board cfg.

The newer versions of BeagleBone boards use the default vid/pid
pair for FT2232 debugging.  Please see the following README:
http://beagleboard.org/static/beaglebone/latest/README.htm
On revision A3/A4 boards, the VID/PID were chosen to match the
 TI XDS100v2 (0x0403/0xA6D0). On A5 and newer revisions when we've
 given the authors of CCS the chance to update their software, the
generic FTDI VID/PID (0x0403/0x6010) will be used to simplify
installation of drivers for systems already having those drivers.

Change-Id: I44228eb2029162f23d084eb05bcfef39e615668d
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/619
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>