]> git.sur5r.net Git - openocd/log
openocd
14 years agoARM: add #defines for JTAG ack codes
David Brownell [Tue, 5 Jan 2010 21:03:27 +0000 (13:03 -0800)]
ARM: add #defines for JTAG ack codes

JTAG has only two possible JTAG ack codes for APACC and DPACC
register reads/writes.  Define them, and remove empty "else"
clause in the code which now uses those codes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: add comments re DAP assumptions
David Brownell [Tue, 5 Jan 2010 20:55:46 +0000 (12:55 -0800)]
ARM: add comments re DAP assumptions

I think some of these assumptions are not well-founded.
Related, that swjdp_transaction_endcheck() is a bit iffy.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoMIPS: pracc access tweaks
Spencer Oliver [Tue, 5 Jan 2010 17:43:29 +0000 (17:43 +0000)]
MIPS: pracc access tweaks

reorder the pracc access so we can save a few access cycles

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoPIC32: enable ram execution
Spencer Oliver [Mon, 21 Dec 2009 17:23:09 +0000 (17:23 +0000)]
PIC32: enable ram execution

add reset-init script to allow ram execution from reset, this is required for ejtag fastdata access.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoMIPS: optimize pracc access
Spencer Oliver [Mon, 21 Dec 2009 16:33:03 +0000 (16:33 +0000)]
MIPS: optimize pracc access

remove unnecessary nops when accessing ejtag pracc
general fastdata patch cleanup

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoparport: output port as hex rather than dec
Spencer Oliver [Thu, 17 Dec 2009 11:53:39 +0000 (11:53 +0000)]
parport: output port as hex rather than dec

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoMIPS: merge mips fast_data patch from David N. Claffey
David Claffey [Wed, 16 Dec 2009 11:23:52 +0000 (11:23 +0000)]
MIPS: merge mips fast_data patch from David N. Claffey

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agogdb: fix regression in gdb_port command
Øyvind Harboe [Tue, 5 Jan 2010 13:57:45 +0000 (14:57 +0100)]
gdb: fix regression in gdb_port command

The gdb_port command can be invoked during normal execution
to report the port used for gdb, whereas it was listed as
CONFIG stage only, which caused an error when excuting
it to return the reported error.

Also in line with the grander goal of making more commands
available during all "modes" (perhaps retiring config mode),
there is no particular reason to limit gdb_port to the
config stage.

Regression was introduced in:

b3bf1d12b2fdfba1c1cbee3e1afbfbb27cbd1a26 aka
v0.4.0-rc1-32-gb3bf1d1

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoupdate udev rules for new udev version
Johannes Stezenbach [Mon, 4 Jan 2010 15:08:10 +0000 (16:08 +0100)]
update udev rules for new udev version

New versions of udev (148+) emit the following warnings:

udevd[425]: BUS= will be removed in a future udev version,
  please use SUBSYSTEM= to match the event device, or
  SUBSYSTEMS= to match a parent device, in /lib/udev/rules.d/60-openocd.rules:1
udevd[425]: SYSFS{}= will be removed in a future udev version,
  please use ATTR{}= to match the event device, or
  ATTRS{}= to match a parent device, in /lib/udev/rules.d/60-openocd.rules:4
udevd[425]: SYSFS{}= will be removed in a future udev version,
  please use ATTR{}= to match the event device, or
  ATTRS{}= to match a parent device, in /lib/udev/rules.d/60-openocd.rules:7
...

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560141

[dbrownell@users.sourceforge.net: add IDs for Stellaris ICDI, Olimex Tiny-H]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARMv7-M: use AP_REG_* symbol
David Brownell [Tue, 5 Jan 2010 06:11:34 +0000 (22:11 -0800)]
ARMv7-M:  use AP_REG_* symbol

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoFT2232: fix doc typo
David Brownell [Sun, 3 Jan 2010 23:02:51 +0000 (15:02 -0800)]
FT2232: fix doc typo

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoJTAG/drivers: ft2232 docs
David Brownell [Sun, 3 Jan 2010 22:54:52 +0000 (14:54 -0800)]
JTAG/drivers: ft2232 docs

Add doxyegen description for this driver.

Correct the helptext (configures *or* displays based on #params),
and usage (use the same BNF as the User's Guide).

Remove superfluous #include

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoJTAG/Drivers: Amontec JTAG accelerator fixes
David Brownell [Sun, 3 Jan 2010 22:51:01 +0000 (14:51 -0800)]
JTAG/Drivers: Amontec JTAG accelerator fixes

Remove superfluous #include.

Correct the helptext (configures *or* displays based on #params),
and usage (use the same BNF as the User's Guide).

Add doxygen -- file-level description and a @todo for doing
RTCK correctly.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoJTAG: Amontec JTAG accelerater "rtck" is back
David Brownell [Sun, 3 Jan 2010 21:30:06 +0000 (13:30 -0800)]
JTAG: Amontec JTAG accelerater "rtck" is back

The command processing conversion a while back lost the
"rtck" enable/disable command; restore it.

NOTE that having such a command is wrong; there's a standard
way to enable adaptive clocking ("speed 0").

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoJTAG/drivers: cleanup jtag_interface structs
David Brownell [Sun, 3 Jan 2010 21:07:18 +0000 (13:07 -0800)]
JTAG/drivers: cleanup jtag_interface structs

Get rid of excess indents.
Ditto superfluous "&" before function pointers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoJTAG/drivers: amt_jtagaccel fixes + cleanup
David Brownell [Sun, 3 Jan 2010 20:59:51 +0000 (12:59 -0800)]
JTAG/drivers: amt_jtagaccel fixes + cleanup

Build fixes:  it failed abysmally with PPDEV enabled.  Swapped
a build-time error with a FIXME comment in the affected macros.

Cleanup: remove "&" before function pointers, and excess indent,
for the interface struct declaration.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: ADIv5 JTAG symbol cleanup
David Brownell [Sat, 2 Jan 2010 23:53:33 +0000 (15:53 -0800)]
ARM: ADIv5 JTAG symbol cleanup

Rename DAP_IR_* as JTAG_DP_* since those symbols are specifically
for JTAG-DP (or SWJ-DP in JTAG mode), and won't work with SWD.
Define the JTAG ABORT and IDCODE instructions for completeness;
add a comment about where to (someday) use ABORT.

Fix messaging which assumes everything is an SWJ-DP; say "JTAG-DP"
instead, it's at least more appropriate for all JTAG transports.

Shrink the affected lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: dap info fix + tweaks
David Brownell [Sat, 2 Jan 2010 23:53:18 +0000 (15:53 -0800)]
ARM: dap info fix + tweaks

Fix: don't print the BASE address except if it's a MEM-AP;
that's an unlikely error, but there's no point getting it wrong.
Tweaks: comments, capitalization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: ADIv5 export cleanup
David Brownell [Sat, 2 Jan 2010 23:53:06 +0000 (15:53 -0800)]
ARM: ADIv5 export cleanup

Make some private functions "static".  Remove their public declarations,
and what is now an obviously unused function.  Shrinks this object's size
(about 5% on x86_64) while making the code's scope easier to understand.
Shrink the affected lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: ADIv5 symbol and comment cleanup
David Brownell [Sat, 2 Jan 2010 23:53:03 +0000 (15:53 -0800)]
ARM: ADIv5 symbol and comment cleanup

Instead of magic numbers, use their AP_REG_* constants.  Rename
the ROM address symbol as BASE to match ARM's documentation.

Comment various other symbols in the header; add some missing ones.
Remove an unused struct.  Add some doxygen for stuff including the
DAP structure and initialization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoCortex-M3: minor breakpoint cleanup
David Brownell [Sat, 2 Jan 2010 23:52:52 +0000 (15:52 -0800)]
Cortex-M3: minor breakpoint cleanup

Shrink some lines, add some comments, simplify some tests.
During debug startup, log the core revision level too.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostreamline and document helptext mode displays
David Brownell [Sat, 2 Jan 2010 23:52:35 +0000 (15:52 -0800)]
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>
14 years agoFix usage/help search for subcommands.
Dean Glazeski [Thu, 31 Dec 2009 22:01:32 +0000 (16:01 -0600)]
Fix usage/help search for subcommands.

This makes it so that the usage/help command properly uses the whole command,
including subcommand, in the search for help information.  This previously
caused erroneous output from the usage command handler.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoAdd the current command to the command information
Dean Glazeski [Sat, 2 Jan 2010 01:58:38 +0000 (19:58 -0600)]
Add the current command to the command information

I wanted to make it so I can be ignorant of a commands invocation string, so
I tried to use CMD_CURRENT (aka cmd->current) which is supposed to house a
pointer to the current command.  It turns out that this wasn't being set.

This patch adds the current command structure to the command invocation
structure before sending it along to the command handler.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoAdded ST FlashLINK interface config file.
Antonio Borneo [Thu, 31 Dec 2009 12:19:26 +0000 (20:19 +0800)]
Added ST FlashLINK interface config file.

The relevant cable config is already in OpenOCD, but not a config for
the JTAG adapter.  I have tested with FlashLINK on ARM926.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoUser's Guide: warn about the forum
David Brownell [Thu, 31 Dec 2009 11:09:03 +0000 (03:09 -0800)]
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>
14 years agoRemove some more Eclipse stuff from Git's eyes.
Dean Glazeski [Thu, 31 Dec 2009 05:21:33 +0000 (23:21 -0600)]
Remove some more Eclipse stuff from Git's eyes.

This adds the .settings folder and the .cproject file put down
by Eclipse from the eyes of Git.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM7_9: Fix segfaults
Antonio Borneo [Wed, 30 Dec 2009 23:13:16 +0000 (07:13 +0800)]
ARM7_9: Fix segfaults

Handlers for commands
 - arm7_9 semihosting <enable | disable>
 - $_TARGETNAME arp_reset assert 1
didn't check if target has already been examined, and could
segfault when using the NULL pointer "arm7_9->eice_cache".

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agowhitespace cleanup, mostly for docs
Antonio Borneo [Tue, 29 Dec 2009 23:48:49 +0000 (07:48 +0800)]
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>
14 years agoARM9TDMI: Fix segfault.
Antonio Borneo [Wed, 30 Dec 2009 18:43:56 +0000 (02:43 +0800)]
ARM9TDMI: Fix segfault.

The handler for "arm9tdmi vector_catch ..." did not check
if target has already been examined.  Without this fix it
segfaults when using NULL pointer "arm7_9->eice_cache".

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoFix parport_dcl5 config file.
Antonio Borneo [Wed, 30 Dec 2009 14:34:48 +0000 (22:34 +0800)]
Fix parport_dcl5 config file.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agozy1000: add zy1000_ prefix to uart command
Øyvind Harboe [Wed, 30 Dec 2009 12:13:31 +0000 (13:13 +0100)]
zy1000: add zy1000_ prefix to uart command

less polution of the general namespace(preventive action,
no problems reported).

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: unlock flash upon startup for revc
Øyvind Harboe [Wed, 30 Dec 2009 11:36:22 +0000 (12:36 +0100)]
zy1000: unlock flash upon startup for revc

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: reconfigure FPGA upon reset instead of just the CPU
Øyvind Harboe [Tue, 29 Dec 2009 11:30:02 +0000 (12:30 +0100)]
zy1000: reconfigure FPGA upon reset instead of just the CPU

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: firmware upgrade fixes for revc
Øyvind Harboe [Fri, 25 Dec 2009 20:50:41 +0000 (21:50 +0100)]
zy1000: firmware upgrade fixes for revc

Use ecos firmwareutil upgrade utilities

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: less warnings
Øyvind Harboe [Fri, 25 Dec 2009 22:05:50 +0000 (23:05 +0100)]
zy1000: less warnings

use inline for static functions in header files to
avoid warnings about fn not being used.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoAdded Open-BLDC board config file.
Piotr Esden-Tempski [Mon, 28 Dec 2009 16:30:32 +0000 (17:30 +0100)]
Added Open-BLDC board config file.

14 years agoAdded floss-jtag interface config file.
Piotr Esden-Tempski [Mon, 28 Dec 2009 16:15:21 +0000 (17:15 +0100)]
Added floss-jtag interface config file.

14 years agoMinGW build fixes
Freddie Chopin [Mon, 28 Dec 2009 20:08:48 +0000 (21:08 +0100)]
MinGW build fixes

Print "ssize_t" as "%ld" (+ cast to long) not as "%zu".
Official MinGW (gcc 3.4.5) doesn't understand "z" flag.

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostm32x commands get "usage"
Freddie Chopin [Mon, 28 Dec 2009 20:40:39 +0000 (21:40 +0100)]
stm32x commands get "usage"

Add .usage fields to stm32x command_registration,
so that "help stm32x" shows required parameters.

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoFix Luminary FT2232 layout docs/configs
David Brownell [Mon, 28 Dec 2009 20:59:47 +0000 (12:59 -0800)]
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>
14 years agoNOR: last_addr also needs correction when checking alignment
Piotr Esden-Tempski [Mon, 28 Dec 2009 15:43:51 +0000 (16:43 +0100)]
NOR: last_addr also needs correction when checking alignment

Otherwise the new alignment checking algorithm thinks that the
address is not aligned, because it is way beyond the last sector.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agocreate tcl/board/dm365evm.cfg
David Brownell [Sun, 27 Dec 2009 20:16:55 +0000 (12:16 -0800)]
create tcl/board/dm365evm.cfg

This config is only lightly tested, and doesn't work well yet;
but it's a start.

 * Notably missing is PLL configuration, since each DaVinci
   does that just a bit differently; and thus DDR2 setup.

 * The SRST workaround needed for the goof in the CPLD's VHDL
   depends on at least the not-yet-merged patch letting ARM9
   (and ARM7) chips perform resets that don't use SRST.

So this isn't yet suitable for debugging U-Boot.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoNOR: make flash_write_unlock() pad to sector end
David Brownell [Sun, 27 Dec 2009 19:34:31 +0000 (11:34 -0800)]
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>
14 years agoDriver for USB-JTAG, Altera USB-Blaster and compatibles
Catalin Patulea [Sat, 26 Dec 2009 23:05:06 +0000 (15:05 -0800)]
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>
14 years agoOlimex SAM9-L9260 board configuration update.
Dean Glazeski [Wed, 9 Dec 2009 18:51:52 +0000 (12:51 -0600)]
Olimex SAM9-L9260 board configuration update.

This updates the board configuration for the SAM9-L9260 board with the
configuration for the on-board NAND and dataflash.  Included are commands
for configuring the AT91SAM9 NAND flash driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: add comment re register exports
David Brownell [Sat, 26 Dec 2009 19:25:44 +0000 (11:25 -0800)]
ARM: add comment re register exports

Modern versions of GDB can understand VFP3 and iwMMXt hardware.

14 years agoUser's Guide: update GDB info
David Brownell [Sat, 26 Dec 2009 18:35:24 +0000 (10:35 -0800)]
User's Guide: update GDB info

Advise leaving background polling enabled; fix broken URL;
add simple program startup example.

14 years agoNOR: messaging fix
David Brownell [Sat, 26 Dec 2009 18:24:39 +0000 (10:24 -0800)]
NOR: messaging fix

Fix syntax error:  default to "wrote N bytes"; writing a
single byte is an unusual case, not the normal one.

14 years agoNOR: Allocate the right amount of memory
David Brownell [Sat, 26 Dec 2009 18:22:28 +0000 (10:22 -0800)]
NOR: Allocate the right amount of memory

Switch to calloc() to simplify review and initialization.

14 years agocygwin 1.7 build fixes
David Brownell [Sat, 26 Dec 2009 18:19:19 +0000 (10:19 -0800)]
cygwin 1.7 build fixes

It's less accepting of signed char ... insisting that e.g. tolower()
not receive one as a parameter.

It's probably good to phase out such usage, given the number of bugs
that lurk in the vicinity (assumptions that char is unsigned), so fix
these even though such usage is actually legal.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoPARPORT code cleanup:
Antonio Borneo [Sat, 26 Dec 2009 00:06:10 +0000 (08:06 +0800)]
PARPORT code cleanup:

Align elements in array.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoRestore "-dev" version suffix
David Brownell [Mon, 21 Dec 2009 22:49:36 +0000 (14:49 -0800)]
Restore "-dev" version suffix

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agov0.4.0-rc1 milestone v0.4.0-rc1
David Brownell [Mon, 21 Dec 2009 22:45:52 +0000 (14:45 -0800)]
v0.4.0-rc1 milestone

Winter Solstice, 2009.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoPackaging fix, NEWS update
David Brownell [Mon, 21 Dec 2009 20:50:17 +0000 (12:50 -0800)]
Packaging fix, NEWS update

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoPackaging fix
David Brownell [Mon, 21 Dec 2009 20:31:12 +0000 (12:31 -0800)]
Packaging fix

Don't forget to list target/arm_opcodes.h

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agohelp: list all commands that match string
Oyvind Harboe [Sun, 20 Dec 2009 21:14:10 +0000 (22:14 +0100)]
help: list all commands that match string

Restore behavior where help lists all commands that
match string passed to help.

Signed-off-by: Oyvind Harboe <oyvind.harboe@zylin.com>
14 years agoCortex-M3: cleanup
David Brownell [Mon, 21 Dec 2009 00:33:00 +0000 (16:33 -0800)]
Cortex-M3: cleanup

Misc:
 - Introduce some "struct reg" temporaries, for clarity
 - Shorten lines
 - Add some missing whitespace
 - Clean up comments
 - Add notes about some fault handling issues
 - Most of these errata workarounds are for *OLD* chip revisions

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM11: recognize ARM11 MPCore
David Brownell [Sun, 20 Dec 2009 06:54:07 +0000 (22:54 -0800)]
ARM11: recognize ARM11 MPCore

And add my copyright.  MPCore is untested, but it's the
only other ARM11 core to care about.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoarm7_9: Support VINITHI signal
Antonio Borneo [Sun, 20 Dec 2009 17:30:18 +0000 (01:30 +0800)]
arm7_9: Support VINITHI signal

Command "reset halt" checks if PC properly resets, issueing warning:
"PC was not 0. Does this target need srst_pulls_trst?".
Checking PC against 0 is not always correct.

Removed PC value check, as suggested by Øyvind Harboe.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: U-PROPRIET-28D9DF\PROPRIETAIRE <PROPRIETAIRE@propriet-28d9df.(none)>
14 years agocygwin build fixes
David Brownell [Sat, 19 Dec 2009 23:43:55 +0000 (15:43 -0800)]
cygwin build fixes

and shrink some too-long lines

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoAT91SAM9 NAND flash driver.
Dean Glazeski [Wed, 9 Dec 2009 18:40:54 +0000 (12:40 -0600)]
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>
14 years agooocd_trace buildfixes
David Brownell [Sat, 19 Dec 2009 21:24:59 +0000 (13:24 -0800)]
oocd_trace buildfixes

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoETM: add "etm trigger_debug" command
David Brownell [Sat, 19 Dec 2009 21:09:19 +0000 (13:09 -0800)]
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>
14 years agoETM: more ETM_CTRL bit cleanup
David Brownell [Sat, 19 Dec 2009 21:07:26 +0000 (13:07 -0800)]
ETM: more ETM_CTRL bit cleanup

Change handling of the CYCLE_ACCURATE, BRANCH_OUTPUT, and
TRACE_* flags; also the CONTEXTID size values.

 - Convert to symbols matching the actual register bits, instead of
   some random *other* bits (and then correcting that abuse).

 - Get rid of a now-needless enum.

 - Keep those values in etm->control, and remove etm->tracemode.

These values all affect the trace data that's recorded by a trace
pod or in the ETB.  I modified the file format used to dump ETB
data; since it's fairly clear nobody can use this mechanism now,
this can't cause anyone trouble.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoETM: start cleaning up ETM_CTRL bit handling
David Brownell [Sat, 19 Dec 2009 21:07:25 +0000 (13:07 -0800)]
ETM: start cleaning up ETM_CTRL bit handling

Provide better comments for the ETM_CTRL bits; use the correct bit
for half/full clock mode; and define a few more of the bits available
from the earliest ETM versions.

The new bit defintions use ETM_CTRL_* names to match their register
(instead of ETM_PORT_* or ETMV1_*).  For clarity, and better matching
to docs, they are defined with bitshifting not pre-computed masks.

Stop abusing typdefs for ETM_CTRL values; such values are not limited
to the enumerated set of individual bit values.

Rename etm->portmode to etm->control ... and start morphing it into a
single generic shadow of ETM_CTRL.  Eventually etm->tracemode should
vanish, so we can just write etm->control to ETM_CTRL.

Restore an "if" that somehow got dropped.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoETM trigger_percent becomes an ETB command
David Brownell [Sat, 19 Dec 2009 21:06:46 +0000 (13:06 -0800)]
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>
14 years agoNEWS: mention libftdi 0.17
David Brownell [Sat, 19 Dec 2009 21:01:30 +0000 (13:01 -0800)]
NEWS: mention libftdi 0.17

14 years agoNOR FLASH: only erase/unlock whole sectors
David Brownell [Fri, 18 Dec 2009 18:16:52 +0000 (10:16 -0800)]
NOR FLASH: only erase/unlock whole sectors

Much to my surprise, I observed a "flash erase_address ..."
command erasing data which I said should not be erased.

The issue turns out to be generic NOR flash code which was
silently, and rather dangerously, morphing partial-sector
references into unrequested whole-sector ones.

This patch removes that low-level morphing.  If desired, it
can and should be done in higher level code.  (We might need
to fix some stuff in the GDB server code.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoSubject: flash fill[bwh] should use bulk i/o
David Brownell [Fri, 18 Dec 2009 18:09:35 +0000 (10:09 -0800)]
Subject: flash fill[bwh] should use bulk i/o

It's currently allocating a big buffer but writing it out in
units of sizeof(host's pointer) ... sub-optimal.

Plus fix a couple minor coding style goofs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostellaris: fix min buffer length checks
David Brownell [Fri, 18 Dec 2009 17:59:40 +0000 (09:59 -0800)]
stellaris: fix min buffer length checks

Word count == size/4; cope.  And increase buf_min so it's large
enough to cover the overhead in my tests.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoXScale: better {read,write}_phys()
David Brownell [Fri, 18 Dec 2009 17:53:59 +0000 (09:53 -0800)]
XScale: better {read,write}_phys()

We can actually do the right thing if the MMU is off; save
the error message for the phys-but-MMU-enabled path, which
is what isn't yet supported.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agodsp563xx: cygwin build fixes
David Brownell [Fri, 18 Dec 2009 11:08:49 +0000 (03:08 -0800)]
dsp563xx: cygwin build fixes

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostellaris: update bulk flash writes
David Brownell [Fri, 18 Dec 2009 09:33:19 +0000 (01:33 -0800)]
stellaris: update bulk flash writes

Try to right-size the SRAM buffers, by not:
 - using them for very small writes
 - giving up when a large buffer isn't available
 - allocating buffers much larger than their data

Also don't:
 - bother loading the code unless we allocate the writebuffer too
 - be so verbose with messaging:
    * be more concise
    * reduce importance (e.g. DEBUG not WARNING)
    * remove duplication

The minimum buffer size is something of a guess.  It's eight
times smaller than before, almost the same size as the code
being downloaded.  It probably deserves some tuning.

Also, note an erratum affecting flash protection on some chips;
and narrow many over-wide lines affected by the above changes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoNAND write data page refactoring.
Dean Glazeski [Fri, 18 Dec 2009 03:02:40 +0000 (21:02 -0600)]
NAND write data page refactoring.

Refactored the write page raw function into two new functions
for writing data to a NAND device and then another function to
finish up a write to a NAND device.  This includes some new
updates to introduce more error checking to existing code.

[dbrownell@users.sourceforge.net: fix fault handling, whitespace]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoNAND read data page refactor.
Dean Glazeski [Fri, 18 Dec 2009 03:02:39 +0000 (21:02 -0600)]
NAND read data page refactor.

Added a new function to encapsulate reading a page of data from
a NAND device using either the read_block_data function of a NAND
controller or to use direct reading of data from the NAND device.

This also adds some performance enhancements and uses the read_data
function if the read_block_data function fails safely (because it
can't allocate a buffer in the working area).

[dbrownell@users.sourceforge.net: fix fault handling, whitespace]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agotarget.cfg: update to use new flash configuration syntax
Spencer Oliver [Thu, 17 Dec 2009 10:53:09 +0000 (10:53 +0000)]
target.cfg: update to use new flash configuration syntax

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoRemove duplicate Olimex-"tiny" interface
David Brownell [Wed, 16 Dec 2009 22:21:06 +0000 (14:21 -0800)]
Remove duplicate Olimex-"tiny" interface

We already have tcl/interface/olimex-jtag-tiny.cfg and
don't need a clone of it.

14 years agoJTAG: shrink "scan_chain" output
David Brownell [Wed, 16 Dec 2009 22:19:44 +0000 (14:19 -0800)]
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>
14 years agostellaris: comments
David Brownell [Wed, 16 Dec 2009 22:17:31 +0000 (14:17 -0800)]
stellaris: comments

Someday revisit various issues:  Tempest parts support writing
more than one word at a time; for some target firmware it might
be necessary to save and restore flash IRQ configuration.  (The
safest policy is likely to always reset after flash updates.)

Plus swap some undesirable TAB characters with SPACE.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostellaris: probe() cleanups
David Brownell [Wed, 16 Dec 2009 22:17:31 +0000 (14:17 -0800)]
stellaris: probe() cleanups

Fix potential memory leak:  make sure the per-bank data
structures are only allocated in probe(), and that calling
probe() multiple times is a NOP.  Use it for auto_probe().

Require probe() to have done its thing:  don't make access
routines cope with it not having been called.  Shrink a
bunch of failure paths; and in some cases, correct them.

Don't needlessly insist on a halted target for probe().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostellaris: remove needless code
David Brownell [Wed, 16 Dec 2009 22:17:31 +0000 (14:17 -0800)]
stellaris: remove needless code

No point in reading and discarding a status value when fetching
part description data.  Or having that needless "#if 0" code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostellaris: avoid chip writes
David Brownell [Wed, 16 Dec 2009 22:17:31 +0000 (14:17 -0800)]
stellaris: avoid chip writes

Previously "reading" clock info (and part info) also, as a side
effect, wrote the flash timing register.  Instead, be more safe:
"reading" should only read.  Write paths still refresh timing,
coping with changes the application code may have made.

Also rename the routine which sets flash timing, indicating what
it's really doing; it's got nothing to do with a "mode".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoNOR: bugfix "flash fill[bwh] ..." helptext
David Brownell [Wed, 16 Dec 2009 19:57:59 +0000 (11:57 -0800)]
NOR: bugfix "flash fill[bwh] ..." helptext

These commands don't have a "bank" parameter.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agozy1000: removed some redundant include
Øyvind Harboe [Wed, 16 Dec 2009 13:44:58 +0000 (14:44 +0100)]
zy1000: removed some redundant include

spotted by lint.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoecos: crisper implementation of timeval_ms()
Øyvind Harboe [Tue, 15 Dec 2009 13:57:38 +0000 (14:57 +0100)]
ecos: crisper implementation of timeval_ms()

A crisper/faster implementation under eCos that makes profiling a
tad easier.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoserver: server loop will exhaust data inputs before sleeping
Øyvind Harboe [Tue, 15 Dec 2009 14:43:38 +0000 (15:43 +0100)]
server: server loop will exhaust data inputs before sleeping

By exhausting data on input, the performance will be more
consistent + the code more clearly distinguishes between
polling and processing. A test showed gdb packet load
performance go from ~1550kByte/s to 1650kBytes/s + being
more stable.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agomore tcl/{board,target} cleanup
David Brownell [Tue, 15 Dec 2009 22:39:25 +0000 (14:39 -0800)]
more tcl/{board,target} cleanup

Remove more remnants of the old "jtag_device" syntax.

Don't [format "%s.cpu" $_CHIPNAME] ... it's needless complexity.

Remove various non-supported "-variant" target options; they're not
needed often at all.

Flag some of the board files as needing to have and use target files
for the TAP and target declarations.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agotesting/examples/.../*cfg: rm jtag_device calls
David Brownell [Tue, 15 Dec 2009 17:15:54 +0000 (09:15 -0800)]
testing/examples/.../*cfg: rm jtag_device calls

That syntax has been obsolete forever and is now gone; remove a few
remaining references.  Shows how seldom this stuff gets used.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoXScale: use all-ones for BYPASS, not five-ones
David Brownell [Tue, 15 Dec 2009 04:06:21 +0000 (20:06 -0800)]
XScale: use all-ones for BYPASS, not five-ones

PXA3xx has more than five bits in IR.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agotarget: add basic dsp563xx support
mkdorg@users.sourceforge.net [Tue, 15 Dec 2009 17:30:59 +0000 (18:30 +0100)]
target: add basic dsp563xx support

14 years agozy1000: keep up with command.h cleanup
Øyvind Harboe [Tue, 15 Dec 2009 12:24:28 +0000 (13:24 +0100)]
zy1000: keep up with command.h cleanup

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agocommand: retire obsolete macro
Øyvind Harboe [Tue, 15 Dec 2009 12:23:07 +0000 (13:23 +0100)]
command: retire obsolete macro

COMMAND_REGISTER() was only used transiently during
code conversion.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoimx31: move srst delay into config script
Øyvind Harboe [Tue, 15 Dec 2009 06:55:20 +0000 (07:55 +0100)]
imx31: move srst delay into config script

reset init/run now works again.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoARM11: improved reset support
David Brownell [Tue, 15 Dec 2009 03:56:36 +0000 (19:56 -0800)]
ARM11: improved reset support

Teach ARM11 how to use:

 - the new "reset-assert" event
 - vector catch to implement "reset halt"
 - use SRST more like other cores do
 - ... including leaving post-SRST delays up to config scripts

This gives OMAP2420 the ability to reset, and doesn't seem to
cause new iMX31 problems.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoARM: disassemble STM correctly
David Brownell [Tue, 15 Dec 2009 03:53:10 +0000 (19:53 -0800)]
ARM: disassemble STM correctly

There is no "STMMIDA" instruction.  There is however "STMDAMI".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agolm3748: use new Stellaris config file
David Brownell [Tue, 15 Dec 2009 00:29:53 +0000 (16:29 -0800)]
lm3748: use new Stellaris config file

Use the new file, and remove the old target/lm3s3748.cfg one.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoCommon target file for Stellaris chips
Yegor Yefremov [Tue, 15 Dec 2009 00:29:31 +0000 (16:29 -0800)]
Common target file for Stellaris chips

Common target.cfg file for LM3S CPU family

[dbrownell@users.sourceforge.net: rename, generalize more]

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agostellaris: device IDs
Eric Wetzel [Mon, 14 Dec 2009 20:59:27 +0000 (15:59 -0500)]
stellaris: device IDs

I added the remaining devices and device IDs to stellaris.c, and
removed several devices that don't exist on the Stellaris web page.

Additionally, I found a few devices with duplicate IDs ... the DID1
Version Number for LM3Sxxx parts have DID1 Version = 0x0, and for
LM3Sxxxx have DID1 Version = 0x1. So I extended the comparison to
use the VER and FAM fields from DID1 also.

ID=0x33: LM3S812 (DID1v0) and LM3S2616 (DID1v1)
ID=0x39: LM3S808 (DID1v0) and LM3S2276 (DID1v1)

These are the parts I removed from the file for lack of documentation
(no data sheet to confirm part ID):

  LM3S318,
  LM3S1101, LM3S1108,
  LM3S1615, LM3S1616,
  LM3S2016,
  LM3S2101, LM3S2108,
  LM3S3759, LM3S3768,
  LM3S5757, LM3S5767, LM3S5768, LM3S5769,
  LM3S6815, LM3S6816,
  LM3S6915, LM3S6916,
  LM3S6111, LM3S6118.

Also, sort devices according to part number.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agojtag: add '-ignore-version' option
David Brownell [Mon, 14 Dec 2009 23:55:51 +0000 (15:55 -0800)]
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>