]> git.sur5r.net Git - openocd/log
openocd
14 years agoSTR750: Add SMI interface support
Antonio Borneo [Wed, 17 Nov 2010 03:28:46 +0000 (11:28 +0800)]
STR750: Add SMI interface support

Modified spearsmi driver to include support for STR75x
Added missing initialization in tcl file for STR750

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoNOR/SPEARSMI: fix segfault
Antonio Borneo [Thu, 18 Nov 2010 07:01:03 +0000 (15:01 +0800)]
NOR/SPEARSMI: fix segfault

If flash chip is not listed in the table, or if no flash is
connected, pointer must be properly initialized.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoDocumentation: fix typo
Antonio Borneo [Mon, 22 Nov 2010 11:32:57 +0000 (19:32 +0800)]
Documentation: fix typo

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoflash: iterating over an address range now handles multiple banks
Øyvind Harboe [Mon, 22 Nov 2010 10:16:40 +0000 (11:16 +0100)]
flash: iterating over an address range now handles multiple banks

e.g. flash erase_address now works across an address
range that spans multiple flash chips.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agofastload: fix error handling upon running out of memory
Øyvind Harboe [Mon, 22 Nov 2010 08:15:47 +0000 (09:15 +0100)]
fastload: fix error handling upon running out of memory

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agobuild: remove AC_CONFIG_AUX_DIR macro
Spencer Oliver [Fri, 19 Nov 2010 11:53:17 +0000 (11:53 +0000)]
build: remove AC_CONFIG_AUX_DIR macro

This was used during testing and should have been removed.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agobuild: disable jimtcl lineedit
Spencer Oliver [Fri, 19 Nov 2010 11:24:11 +0000 (11:24 +0000)]
build: disable jimtcl lineedit

This is a recent jimtcl feature but it currently breaks mingw
builds as this system does not have termios.h etc.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agobuild: fix subconfigure parameter issue
Spencer Oliver [Fri, 19 Nov 2010 09:57:37 +0000 (09:57 +0000)]
build: fix subconfigure parameter issue

When passing CFLAGS for example through to the jimtcl subconfigure the
quotes were not being preserved.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agobuild: update bootstrap comments
Spencer Oliver [Fri, 19 Nov 2010 09:08:09 +0000 (09:08 +0000)]
build: update bootstrap comments

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agobuild: prepend --with-jim-ext=nvp to jimtcl configure
Spencer Oliver [Fri, 19 Nov 2010 09:07:43 +0000 (09:07 +0000)]
build: prepend --with-jim-ext=nvp to jimtcl configure

This allows us to add options to jimtcl configure.
The default autoconf AC_CONFIG_SUBDIRS does not currently support this.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agobuild: add autobuild jimtcl to configure scripts
Spencer Oliver [Wed, 17 Nov 2010 10:26:21 +0000 (10:26 +0000)]
build: add autobuild jimtcl to configure scripts

Rather than having to configure/build jimtcl openocd
will do this as part of its own build.

To use an external jimtcl lib specify disable-internal-jimtcl
to the configure step.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agobuild: add common.mk
Spencer Oliver [Fri, 12 Nov 2010 11:41:55 +0000 (11:41 +0000)]
build: add common.mk

Rather than specifying common makefile variables move
them all to a common.mk.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoFLASH/NOR: Remove useless file tms470.h
Antonio Borneo [Wed, 17 Nov 2010 13:28:34 +0000 (21:28 +0800)]
FLASH/NOR: Remove useless file tms470.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file str9xpec.h
Antonio Borneo [Wed, 17 Nov 2010 13:25:57 +0000 (21:25 +0800)]
FLASH/NOR: Remove useless file str9xpec.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file str9x.h
Antonio Borneo [Wed, 17 Nov 2010 13:23:04 +0000 (21:23 +0800)]
FLASH/NOR: Remove useless file str9x.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file str7x.h
Antonio Borneo [Wed, 17 Nov 2010 13:20:02 +0000 (21:20 +0800)]
FLASH/NOR: Remove useless file str7x.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file stm32x.h
Antonio Borneo [Wed, 17 Nov 2010 13:16:23 +0000 (21:16 +0800)]
FLASH/NOR: Remove useless file stm32x.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file stellaris.h
Antonio Borneo [Wed, 17 Nov 2010 13:12:37 +0000 (21:12 +0800)]
FLASH/NOR: Remove useless file stellaris.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file pic32mx.h
Antonio Borneo [Wed, 17 Nov 2010 13:04:37 +0000 (21:04 +0800)]
FLASH/NOR: Remove useless file pic32mx.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file lpc288x.h
Antonio Borneo [Wed, 17 Nov 2010 13:00:25 +0000 (21:00 +0800)]
FLASH/NOR: Remove useless file lpc288x.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file lpc2000.h
Antonio Borneo [Wed, 17 Nov 2010 12:55:40 +0000 (20:55 +0800)]
FLASH/NOR: Remove useless file lpc2000.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file avrf.h
Antonio Borneo [Wed, 17 Nov 2010 10:01:07 +0000 (18:01 +0800)]
FLASH/NOR: Remove useless file avrf.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoflash: fix bug with multiple back-to-back flash chips
Øyvind Harboe [Mon, 15 Nov 2010 13:43:16 +0000 (14:43 +0100)]
flash: fix bug with multiple back-to-back flash chips

flash programming via flash write_image or gdb load would
produce a bogus error message that the flash chip was to
small.

The solution is to limit the current flash programming
run to the current chip.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoFLASH/NOR: Remove useless file at91sam7.h
Antonio Borneo [Wed, 17 Nov 2010 02:53:30 +0000 (10:53 +0800)]
FLASH/NOR: Remove useless file at91sam7.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file at91sam3.h
Antonio Borneo [Wed, 17 Nov 2010 02:25:55 +0000 (10:25 +0800)]
FLASH/NOR: Remove useless file at91sam3.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoFLASH/NOR: Remove useless file spearsmi.h
Antonio Borneo [Wed, 17 Nov 2010 00:21:22 +0000 (08:21 +0800)]
FLASH/NOR: Remove useless file spearsmi.h

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoNOR/SPEARSMI: Add comments about SPI
Antonio Borneo [Wed, 17 Nov 2010 00:12:45 +0000 (08:12 +0800)]
NOR/SPEARSMI: Add comments about SPI

SMI interface hides the real SPI bus between SPEAr and
external flash.
Added comments to highlight the SPI operation, to help a
future rework in SPI generic and SPEAr specific drivers.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoTCL/SPEAr: Added Serial flash in board file
Antonio Borneo [Thu, 11 Nov 2010 06:16:52 +0000 (14:16 +0800)]
TCL/SPEAr: Added Serial flash in board file

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoNOR/SPEAr: Add support for Serial NOR
Antonio Borneo [Thu, 11 Nov 2010 06:12:31 +0000 (14:12 +0800)]
NOR/SPEAr: Add support for Serial NOR

Add support and documentation for STMicroelectronics
SPEAr Serial Memory Interface (SMI).
Code tested on SPEAr3xx only.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agohttpd: retire this server
Øyvind Harboe [Thu, 11 Nov 2010 07:15:49 +0000 (08:15 +0100)]
httpd: retire this server

this never panned out and there are enough mistakes in
the code that probably nobody used this.

Use the tcl server and implement a standalone http
app instead works fine.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoAdd comments and tiny improvements to STM32 flash loader algorithm
Freddie Chopin [Sat, 13 Nov 2010 14:42:00 +0000 (15:42 +0100)]
Add comments and tiny improvements to STM32 flash loader algorithm

Add comments to assembly flash loader for STM32. Add tiny improvement in
size of the algorithm (40 vs 48 bytes) and tiny speed improvement (~1.5%,
as time is wasted on waiting for end of operation anyway).

Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
14 years agogdb: fix occasional crash when flash probe failed
Øyvind Harboe [Sat, 13 Nov 2010 12:03:29 +0000 (13:03 +0100)]
gdb: fix occasional crash when flash probe failed

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agogdb: improve error message when gdb connect fails
Øyvind Harboe [Thu, 11 Nov 2010 07:50:22 +0000 (08:50 +0100)]
gdb: improve error message when gdb connect fails

gdb connect can fail when the flash has not been probed.

During gdb connect, the flash layout is reported, but this
can not be automatically detected for a target that is
powered up and OpenOCD supports connecting to gdb server
even if the target is powered down.

The solution is to turn of the gdb_memory_map feature.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agocortex_m3: report detected error condition in poll
Øyvind Harboe [Tue, 9 Nov 2010 08:14:21 +0000 (09:14 +0100)]
cortex_m3: report detected error condition in poll

If the CPU crashed at some point, poll will discover this.

Previously the poll fn would clear the error and print a warning,
rather than propagating the error.

The new behavior is to report the error back up, but still
clear the error.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agotarget: document that target_poll() will report and clear sticky errors
Øyvind Harboe [Tue, 9 Nov 2010 08:17:49 +0000 (09:17 +0100)]
target: document that target_poll() will report and clear sticky errors

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoTCL scripts: replace "puts" with "echo"
Antonio Borneo [Mon, 8 Nov 2010 09:23:49 +0000 (17:23 +0800)]
TCL scripts: replace "puts" with "echo"

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoJIM: document "echo" command
Antonio Borneo [Mon, 8 Nov 2010 07:13:28 +0000 (15:13 +0800)]
JIM: document "echo" command

Document "-n" option in manual;
Modify "echo" command definition as COMMAND_HANDLER to
easily add help message
Add help message aligned with manual.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoJIM: Add "-n" option to "echo"
Antonio Borneo [Mon, 8 Nov 2010 04:08:56 +0000 (12:08 +0800)]
JIM: Add "-n" option to "echo"

With the new JIMTCL, "puts" only writes to stdout.
To write on telnet port too, "echo" must be used.
This patch gives to "echo" similar commandline option of "puts".

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agostm32: return early upon block write failure
Øyvind Harboe [Mon, 8 Nov 2010 15:53:24 +0000 (16:53 +0100)]
stm32: return early upon block write failure

only if we do not have enough ram do we continue.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agostm32: return error when failing to read
Øyvind Harboe [Mon, 8 Nov 2010 15:26:58 +0000 (16:26 +0100)]
stm32: return error when failing to read

add missing error handling.

Output warning when assuming maximum flash size in the
family when failing to read.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agostm32: add error propagation on writes
Øyvind Harboe [Mon, 8 Nov 2010 15:22:22 +0000 (16:22 +0100)]
stm32: add error propagation on writes

catch problems earlier.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agostm32: sharpen error handling for timeouts
Øyvind Harboe [Mon, 8 Nov 2010 15:02:07 +0000 (16:02 +0100)]
stm32: sharpen error handling for timeouts

delete lots of crud by handling this all in one spot.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agolpc3131: target definition
Andrew Leech [Tue, 9 Nov 2010 07:05:02 +0000 (08:05 +0100)]
lpc3131: target definition

14 years agoTCL scripts: add support for ST SPEAr310
Antonio Borneo [Thu, 4 Nov 2010 08:53:28 +0000 (16:53 +0800)]
TCL scripts: add support for ST SPEAr310

Initial support for ST SPEAr310 and for the evaluation
board EVALSPEAr310 Rev. 2.0.
Scripts are split in generic for SPEAr3xx family and
specific for SPEAr310. This should easily allow adding
new members of the family.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoAdd EfikaMX smarttop board support
Marek Vasut [Fri, 29 Oct 2010 01:06:16 +0000 (03:06 +0200)]
Add EfikaMX smarttop board support

This patch finally adds support for i.MX51 based Genesi USA EfikaMX smarttop
board.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoCortexA8: Introduce Freescale i.MX51 variant
Marek Vasut [Fri, 29 Oct 2010 00:57:32 +0000 (02:57 +0200)]
CortexA8: Introduce Freescale i.MX51 variant

This patch introduces support for Cortex A8 based Freescale i.MX51 CPU. This CPU
has the Debug Access Port located at a different address (0x60008000) than TI
OMAP3 series of CPUs.

i.MX51 configuration file based on OMAP3 configuration file and an email from
Alan Carvalho de Assis <acassis@gmail.com>.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoCortexA8: Implement debug base autodetection
Marek Vasut [Fri, 29 Oct 2010 00:57:32 +0000 (02:57 +0200)]
CortexA8: Implement debug base autodetection

Implement autodetection of debug base. Also, implement a function solving
various hardware quirks (like iMX51 ROM Table location bug).

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoADIv5: Implement function to lookup CoreSight component
Marek Vasut [Sun, 31 Oct 2010 06:11:47 +0000 (07:11 +0100)]
ADIv5: Implement function to lookup CoreSight component

This patch implements "dap_lookup_cs_component()", which allows to lookup CS
component by it's identification.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoADIv5: Introduce function to detect ROM Table location
Marek Vasut [Sun, 31 Oct 2010 04:24:36 +0000 (05:24 +0100)]
ADIv5: Introduce function to detect ROM Table location

This patch adds function called "dap_detect_debug_base()", which should be
called to get location of the ROM Table. By walking ROM Table, it's possible to
discover the location of DAP.

Sadly, some CPUs misreport this value, therefore I had to introduce an fixup
table, which will be used in case such CPU is detected.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoarm964e: Add support for ARM946E target.
ddraskovic [Thu, 4 Nov 2010 13:33:10 +0000 (14:33 +0100)]
arm964e: Add support for ARM946E target.

So far most of the people have been using existing ARM966E in the
place of ARM946E, because they have practically the same scan chains.

However, ARM946E has caches, which further complicates JATG handling
via scan-chain. this was preventing single-stepping for ARM946E when
SW breakpoints are used.

This patch thus introduces :
1) Correct cache handling on memory write
2) Possibility to flush whole cache and turn it off during debug, or
just to flush affected lines (faster and better)
3) Correct SW breakpoint handling and correct single-stepping
4) Corrects the bug on CP15 read and write, so CP15 values
are now correctly R/W

14 years agobootstrap: add quick start build instructions
Øyvind Harboe [Fri, 29 Oct 2010 13:05:15 +0000 (15:05 +0200)]
bootstrap: add quick start build instructions

leave some bread-crumbs for users to figure out how
to build OpenOCD

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agojimtcl: 0.63 release
Øyvind Harboe [Fri, 15 Oct 2010 07:51:08 +0000 (09:51 +0200)]
jimtcl: 0.63 release

as a git module.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agojim tests: use installed
Øyvind Harboe [Sun, 10 Oct 2010 17:17:03 +0000 (19:17 +0200)]
jim tests: use installed

Delete obsolete jim that comes with OpenOCD.

14 years agosrc: add loader src description
Spencer Oliver [Thu, 28 Oct 2010 09:08:16 +0000 (10:08 +0100)]
src: add loader src description

 - add comment where to find the various loaders src files.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agocontrib: add ram loader src code
Spencer Oliver [Thu, 28 Oct 2010 08:19:37 +0000 (09:19 +0100)]
contrib: add ram loader src code

Add src code for ram loaders to contrib directory.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoimx31pdk: use rclk w/1MHz fallback
Øyvind Harboe [Thu, 28 Oct 2010 06:34:41 +0000 (08:34 +0200)]
imx31pdk: use rclk w/1MHz fallback

measure_clk indicates ca. 3-4MHz, so 1MHz should be safe.

Added self_test proc used to test that rclk worked.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agohelp: help now works on configuration commands
Øyvind Harboe [Wed, 27 Oct 2010 06:37:54 +0000 (08:37 +0200)]
help: help now works on configuration commands

help would not show help for commands when the command
interpreter was in the wrong mode, which means that
e.g. "help newtap" didn't work, it wouldn't show the
"jtag newtap" help as it was a configuration command.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoMake systesetreq typos read sysresetreq instead
Peter Stuge [Sun, 24 Oct 2010 14:28:48 +0000 (16:28 +0200)]
Make systesetreq typos read sysresetreq instead

Signed-off-by: Peter Stuge <peter@stuge.se>
14 years agoRemove srst_pulls_trst from LPC1768 target
Peter Stuge [Sun, 24 Oct 2010 14:28:47 +0000 (16:28 +0200)]
Remove srst_pulls_trst from LPC1768 target

srst_pulls_trst may be true on some (broken) LPC1768 boards but is
not true in general for the LPC1768.

Signed-off-by: Peter Stuge <peter@stuge.se>
14 years agobuspirate: change handling of communication speed setting + create serial port open...
Michal Demin [Fri, 22 Oct 2010 21:26:43 +0000 (23:26 +0200)]
buspirate: change handling of communication speed setting + create serial port open function

Signed-off-by: Michal Demin <michaldemin@gmail.com>
14 years agobuspirate: Serial port was not correctly closed.
Michal Demin [Fri, 22 Oct 2010 19:06:31 +0000 (21:06 +0200)]
buspirate: Serial port was not correctly closed.

Signed-off-by: Michal Demin <michaldemin@gmail.com>
14 years agoTARGET: review handle_load_image_command()
Antonio Borneo [Tue, 12 Oct 2010 08:47:24 +0000 (16:47 +0800)]
TARGET: review handle_load_image_command()

Collect variable definitions.
Report syntax error to command dispatcher.
Propagate error when unable to open file.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoTARGET: fix segfault in handle_dump_image_command()
Antonio Borneo [Tue, 12 Oct 2010 08:08:35 +0000 (16:08 +0800)]
TARGET: fix segfault in handle_dump_image_command()

The struct fileio is used after fileio_close().
Move fileio_close() after last usage.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoswj-dp.tcl (SWD infrastructure #1)
David Brownell [Sun, 10 Oct 2010 21:41:11 +0000 (14:41 -0700)]
swj-dp.tcl (SWD infrastructure #1)

Provide new helper proc that can set up either an SWD or JTAG DAP
based on the transport which is in use -- mostly for SWJ-DP.

 Also update some SWJ-DP based chips/targets to use it.  The goal
is making SWD-vs-JTAG transparent in most places.  SWJ-DP based chips
really need this flexible configuration to cope with debug adapters
that support different transports, without needing new target configs
for each transport or adapter.

For JTAG-DP, callers will use "jtag newtap" directly, as today; only
one chip-level transport option exists.

For SW-DP (e.g. LPC1[13]xx or EFM32, they'll use "swd newdap" directly
(part of an upcoming SWD transport patch).  Again, only one transport
option exists, so hard-wiring is appropriate there.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14 years agoadd JLINK protocol doc ref
David Brownell [Sun, 10 Oct 2010 21:27:35 +0000 (14:27 -0700)]
add JLINK protocol doc ref

Provide URL for a recent
version of JLINK protocol.
Signed-Off-By: David Brownell <dbrownell@users.sourceforge.net>
14 years agobuild: remove warn_unused_result errors
Spencer Oliver [Tue, 5 Oct 2010 15:29:37 +0000 (16:29 +0100)]
build: remove warn_unused_result errors

Remove any build errors for strtol when building release
version of openocd.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agogdbderver: fix gdb pipe startup overflow
Spencer Oliver [Tue, 5 Oct 2010 14:00:40 +0000 (15:00 +0100)]
gdbderver: fix gdb pipe startup overflow

When usng gdb pipes we need to keep openocd output at a minimum,
otherwise the gdb stdin will overflow and fail.
Make the calls to gdb_port and log_output synchronous to stop this.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agogdbserver: fix gdb_port memory leak
Spencer Oliver [Mon, 4 Oct 2010 19:35:33 +0000 (20:35 +0100)]
gdbserver: fix gdb_port memory leak

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agoserver: fix server pipe windows support
Spencer Oliver [Mon, 4 Oct 2010 19:34:47 +0000 (20:34 +0100)]
server: fix server pipe windows support

commit 50d5441e2a615fb2c44b41a777e4373901f7a2e6 caused
native windows build to fail.

Firstly this patch fixes the build issue, but it also disables support
for named pipes under Windows. Windows does not support posix named
pipes.
A cross-platfom access layer will need creating before support can be
enabled again.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
14 years agozy1000: add : port number syntax for tftp filing system
Øyvind Harboe [Sun, 5 Sep 2010 19:20:15 +0000 (21:20 +0200)]
zy1000: add : port number syntax for tftp filing system

Allows using non-standard port number. Default to port 69.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agopipes: add documentation for pipes
Øyvind Harboe [Mon, 27 Sep 2010 20:55:30 +0000 (22:55 +0200)]
pipes: add documentation for pipes

Stick with the name "gdb_port" even if this command
can be used for other things(disable, named pipes,
anonymous stdin/out pipe). "port" is correct for
probably more than 90% of use cases, if not more.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoserver: add support for pipes
Øyvind Harboe [Mon, 27 Sep 2010 06:50:49 +0000 (08:50 +0200)]
server: add support for pipes

-p/--pipe is now deprecated. Use '-c "gdb_port pipe;log_output openocd.log"'
instead. Warning logged.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoserver: specify port as a string
Øyvind Harboe [Mon, 27 Sep 2010 06:48:31 +0000 (08:48 +0200)]
server: specify port as a string

This will allow switching to using named pipes.

Split this out as a seperate commit to make changes
easier to follow.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoserver: read/write now goes through connection fn's
Øyvind Harboe [Mon, 27 Sep 2010 07:24:51 +0000 (09:24 +0200)]
server: read/write now goes through connection fn's

depending on whether the connection is over a socket
or pipe, the read is done differently.

pipes can return -1 when writing 0 bytes, make 0 byte
writes a successful no-op. 0 byte writes falls out
naturally of tcl server code.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoserver: split file descriptors in in/out fd's
Øyvind Harboe [Mon, 27 Sep 2010 06:26:31 +0000 (08:26 +0200)]
server: split file descriptors in in/out fd's

pipes have different fd's for in/out. This makes the
code more orthogonal and prepares for adding pipes.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoserver: rely on ctrl-c to stop openocd
Øyvind Harboe [Sun, 26 Sep 2010 17:30:31 +0000 (19:30 +0200)]
server: rely on ctrl-c to stop openocd

there was special support to support pressing 'x' to quit
openocd. ctrl-c is sufficient. The main server loop is already
complicated enough.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agolog: remove hack to redirect logs when pipes are in use
Øyvind Harboe [Sun, 26 Sep 2010 16:24:36 +0000 (18:24 +0200)]
log: remove hack to redirect logs when pipes are in use

There is an explicit command "log_output" that can
be used to redirect log output to a file, no need
for a hack in the first place.

Before enabling pipes, use "log_output foo" to redirect
log output to the "foo" files.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoUpdate ep93xx and at91rm9200 drivers
Luca Bruno [Mon, 27 Sep 2010 14:21:04 +0000 (16:21 +0200)]
Update ep93xx and at91rm9200 drivers

ep93xx and at91rm9200 are conditionally built only on arm and were not
updated to reflect changes in command registration handler.
This patch makes them properly compile again, fixing a build failure
experienced on Debian armel.

Signed-off-by: Luca Bruno <lucab@debian.org>
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
14 years agofileio: fileio_size() can now fail
Øyvind Harboe [Wed, 29 Sep 2010 07:11:01 +0000 (09:11 +0200)]
fileio: fileio_size() can now fail

Part of making the fileio API more robust.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agofileio: refactor struct fileio to be an opaque structure
Øyvind Harboe [Tue, 28 Sep 2010 13:37:56 +0000 (15:37 +0200)]
fileio: refactor struct fileio to be an opaque structure

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoTCL scripts: fix ocd_mem2array/mem2array
Antonio Borneo [Tue, 28 Sep 2010 08:37:19 +0000 (16:37 +0800)]
TCL scripts: fix ocd_mem2array/mem2array

In previous patch, I have introduced again the symbol
"ocd_mem2array", now replaced by "mem2array".
Fix the error.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agoflash: fix error handling
Øyvind Harboe [Mon, 27 Sep 2010 14:45:25 +0000 (16:45 +0200)]
flash: fix error handling

memory leaks and missing check on memory allocation.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoimage: fix spelling mistake
Øyvind Harboe [Mon, 27 Sep 2010 14:29:08 +0000 (16:29 +0200)]
image: fix spelling mistake

struct imageection => struct imagesection

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoFix omap3_dbginit to write to physical memory.
Zachary T Welch [Fri, 24 Sep 2010 23:13:04 +0000 (16:13 -0700)]
Fix omap3_dbginit to write to physical memory.

Setting the OMAP3530 DBGEN bit must be done in physical memory, so
update omap3_dbginit callback to use the new 'mww phys' command syntax.

14 years agozy1000: fix non-JTAG master build
Øyvind Harboe [Sun, 26 Sep 2010 18:37:53 +0000 (20:37 +0200)]
zy1000: fix non-JTAG master build

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agogdb: fix blank line at top
Øyvind Harboe [Sun, 26 Sep 2010 16:01:54 +0000 (18:01 +0200)]
gdb: fix blank line at top

snuck in at some point...

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agojtagdp: remove #if 0'd kludges and explain why the code is correct
Øyvind Harboe [Tue, 21 Sep 2010 20:13:09 +0000 (22:13 +0200)]
jtagdp: remove #if 0'd kludges and explain why the code is correct

short story: if the JTAG clock is too high, then the
behavior will be flaky and kludging the code may
seem to make things beter, but really it's just a red
herring.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoflash: fix error handling
Øyvind Harboe [Mon, 20 Sep 2010 07:22:46 +0000 (09:22 +0200)]
flash: fix error handling

sensible error must be reported at failure site

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoembeddedice: fix error handling
Øyvind Harboe [Mon, 20 Sep 2010 07:40:09 +0000 (09:40 +0200)]
embeddedice: fix error handling

error is now reported at failure site.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agoTCL scripts: collect duplicated procedures
Antonio Borneo [Tue, 21 Sep 2010 08:06:37 +0000 (16:06 +0800)]
TCL scripts: collect duplicated procedures

TCL procedures mrw and mmw, originally in DaVinci target code,
are duplicated in other TCL scripts.
Moved in a common helper file, and added help/usage description.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 years agostartup: removed capture_catch
Øyvind Harboe [Fri, 10 Sep 2010 09:42:12 +0000 (11:42 +0200)]
startup: removed capture_catch

not used.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agohelper: fix flaky capture command
Øyvind Harboe [Mon, 20 Sep 2010 09:50:32 +0000 (11:50 +0200)]
helper: fix flaky capture command

capture of progress output would get polling
results. This will break in the example below
where polling output would override the tcl
return value.

capture {sleep 10000; set abc def}

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agotcl_server: switch to ctrl-z
Øyvind Harboe [Wed, 8 Sep 2010 18:04:27 +0000 (20:04 +0200)]
tcl_server: switch to ctrl-z

by using ctrl-z instead of line end, multi-line tcl scripts
can be handled.

Testing: send ctrl-z a couple of times to make telnet enter the
mode where it sends ctrl-z unencoded.

Programs that talk to the tcl_server can send ctrl-z to
indicate end of tcl-let to be executed without having
to worry about telnet protocols.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agologging: turn of stdout/stderr buffering
Øyvind Harboe [Fri, 17 Sep 2010 23:37:42 +0000 (01:37 +0200)]
logging: turn of stdout/stderr buffering

with this buffering disabled fancier logging scripts will
be able to process each line as it is output.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: add support for Linux host
Øyvind Harboe [Tue, 7 Sep 2010 18:27:45 +0000 (20:27 +0200)]
zy1000: add support for Linux host

used /dev/mem and mmem() to memory map JTAG registers
into user space and used new configure options to exclude
eCos specific code.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agojtag: build jtag first because it generates header files
Øyvind Harboe [Mon, 20 Sep 2010 11:44:03 +0000 (13:44 +0200)]
jtag: build jtag first because it generates header files

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agowarnings: fix alignment warnings
Øyvind Harboe [Fri, 3 Sep 2010 20:49:37 +0000 (22:49 +0200)]
warnings: fix alignment warnings

These warnings are for architectures that do not
support non-aligned word access.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: split out configure option for eCos and JTAG master
Øyvind Harboe [Tue, 7 Sep 2010 18:19:05 +0000 (20:19 +0200)]
zy1000: split out configure option for eCos and JTAG master

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agozy1000: remove obsolete debug code
Øyvind Harboe [Tue, 7 Sep 2010 18:22:38 +0000 (20:22 +0200)]
zy1000: remove obsolete debug code

Obsolete code clutter

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
14 years agotcl: remove incomplete unused tcl file
Øyvind Harboe [Mon, 20 Sep 2010 07:23:24 +0000 (09:23 +0200)]
tcl: remove incomplete unused tcl file

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>