Commit Graph

4576 Commits

Author SHA1 Message Date
Øyvind Harboe
fdae51287c 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>
2010-11-15 09:18:21 +01:00
Freddie Chopin
015bf55944 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>
2010-11-15 09:17:14 +01:00
Øyvind Harboe
6287c23b32 gdb: fix occasional crash when flash probe failed
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-15 09:14:05 +01:00
Øyvind Harboe
c62fb3fa81 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>
2010-11-11 08:51:49 +01:00
Øyvind Harboe
aa4c140a12 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>
2010-11-09 13:03:22 +01:00
Øyvind Harboe
6c04f1e440 target: document that target_poll() will report and clear sticky errors
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-09 13:03:22 +01:00
Antonio Borneo
e7b2958229 TCL scripts: replace "puts" with "echo"
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-09 08:12:51 +01:00
Antonio Borneo
4747af362d JIM: document "echo" command
Document "-n" option in manual;
Modify "echo" command definition as COMMAND_HANDLER to
easily add help message
Add help message aligned with manual.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-11-09 08:12:51 +01:00
Antonio Borneo
d220e22e63 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>
2010-11-09 08:12:51 +01:00
Øyvind Harboe
fc4e001de3 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>
2010-11-09 08:12:51 +01:00
Øyvind Harboe
6ef3d4ccfe 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>
2010-11-09 08:12:25 +01:00
Øyvind Harboe
49a231f38d stm32: add error propagation on writes
catch problems earlier.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-09 08:05:55 +01:00
Øyvind Harboe
e774df7f69 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>
2010-11-09 08:05:55 +01:00
Andrew Leech
fc4cbc0f98 lpc3131: target definition 2010-11-09 08:05:55 +01:00
Antonio Borneo
074498f836 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>
2010-11-06 15:40:52 +01:00
Marek Vasut
8f1f8e7b96 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>
2010-11-05 11:25:57 +01:00
Marek Vasut
d5b9c7998c 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>
2010-11-05 11:25:57 +01:00
Marek Vasut
1fa91f336a 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>
2010-11-05 11:25:57 +01:00
Marek Vasut
887cac65b0 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>
2010-11-05 11:25:57 +01:00
Marek Vasut
0649fb2f6c 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>
2010-11-05 11:25:57 +01:00
ddraskovic
9e3d43cfe7 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
2010-11-04 14:52:47 +01:00
Øyvind Harboe
70b1538996 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>
2010-10-29 15:18:52 +02:00
Øyvind Harboe
d8464623bd jimtcl: 0.63 release
as a git module.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-29 15:18:37 +02:00
Øyvind Harboe
559d08c19e jim tests: use installed
Delete obsolete jim that comes with OpenOCD.
2010-10-29 15:10:51 +02:00
Spencer Oliver
4617cd0f91 src: add loader src description
- add comment where to find the various loaders src files.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-10-28 10:08:16 +01:00
Spencer Oliver
1fafb669c9 contrib: add ram loader src code
Add src code for ram loaders to contrib directory.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-10-28 09:19:37 +01:00
Øyvind Harboe
53228fbc2e 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>
2010-10-28 08:43:04 +02:00
Øyvind Harboe
2ff1adfa79 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>
2010-10-27 08:50:45 +02:00
Peter Stuge
f176278e98 Make systesetreq typos read sysresetreq instead
Signed-off-by: Peter Stuge <peter@stuge.se>
2010-10-25 08:05:23 +02:00
Peter Stuge
e7d26173fc 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>
2010-10-25 08:04:58 +02:00
Michal Demin
1ceb2c7e7a buspirate: change handling of communication speed setting + create serial port open function
Signed-off-by: Michal Demin <michaldemin@gmail.com>
2010-10-25 08:01:44 +02:00
Michal Demin
d4de14dafe buspirate: Serial port was not correctly closed.
Signed-off-by: Michal Demin <michaldemin@gmail.com>
2010-10-25 08:01:44 +02:00
Antonio Borneo
ed44447e3d 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>
2010-10-12 11:22:32 +02:00
Antonio Borneo
2ee47b22c6 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>
2010-10-12 11:22:26 +02:00
David Brownell
e3773e3e3d 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>
2010-10-10 14:41:11 -07:00
David Brownell
3864da1ab8 add JLINK protocol doc ref
Provide URL for a recent
version of JLINK protocol.
Signed-Off-By: David Brownell <dbrownell@users.sourceforge.net>
2010-10-10 14:27:35 -07:00
Spencer Oliver
6229e438dd 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>
2010-10-05 16:29:37 +01:00
Spencer Oliver
ebe431879d 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>
2010-10-05 15:00:40 +01:00
Spencer Oliver
7e4cf8db58 gdbserver: fix gdb_port memory leak
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-10-04 20:35:33 +01:00
Spencer Oliver
45de3b1fbe server: fix server pipe windows support
commit 50d5441e2a 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>
2010-10-04 20:34:47 +01:00
Øyvind Harboe
d543aa0148 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>
2010-10-01 14:18:15 +02:00
Øyvind Harboe
96a56ba086 pipes: add documentation for pipes
Stick with the name "gdb_port" even if this command
can be used for other things(disable, named pipes,
anonymous stdin/out pipe). "port" is correct for
probably more than 90% of use cases, if not more.

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

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-01 10:26:08 +02:00
Øyvind Harboe
6c137a2fc0 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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe
cb2dba2c12 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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe
5a41435e45 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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe
a60a57d8ed 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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe
d623832685 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>
2010-10-01 10:21:33 +02:00
Luca Bruno
fb7235f12a 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>
2010-09-30 18:14:36 -07:00
Øyvind Harboe
3931b99d14 fileio: fileio_size() can now fail
Part of making the fileio API more robust.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-29 18:56:07 +02:00