summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* buspirate: change handling of communication speed setting + create serial ↵Michal Demin2010-10-251-11/+16
| | | | | | port open function Signed-off-by: Michal Demin <michaldemin@gmail.com>
* buspirate: Serial port was not correctly closed.Michal Demin2010-10-251-0/+9
| | | | Signed-off-by: Michal Demin <michaldemin@gmail.com>
* TARGET: review handle_load_image_command()Antonio Borneo2010-10-121-16/+8
| | | | | | | | 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>
* TARGET: fix segfault in handle_dump_image_command()Antonio Borneo2010-10-121-3/+3
| | | | | | | The struct fileio is used after fileio_close(). Move fileio_close() after last usage. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* swj-dp.tcl (SWD infrastructure #1)David Brownell2010-10-103-1/+44
| | | | | | | | | | | | | | | | | | | | 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>
* add JLINK protocol doc refDavid Brownell2010-10-101-0/+3
| | | | | | Provide URL for a recent version of JLINK protocol. Signed-Off-By: David Brownell <dbrownell@users.sourceforge.net>
* build: remove warn_unused_result errorsSpencer Oliver2010-10-052-2/+2
| | | | | | | Remove any build errors for strtol when building release version of openocd. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* gdbderver: fix gdb pipe startup overflowSpencer Oliver2010-10-051-3/+5
| | | | | | | | 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>
* gdbserver: fix gdb_port memory leakSpencer Oliver2010-10-041-1/+3
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* server: fix server pipe windows supportSpencer Oliver2010-10-041-10/+14
| | | | | | | | | | | | | 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>
* zy1000: add : port number syntax for tftp filing systemØyvind Harboe2010-10-011-1/+11
| | | | | | Allows using non-standard port number. Default to port 69. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* pipes: add documentation for pipesØyvind Harboe2010-10-014-10/+31
| | | | | | | | | 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>
* server: add support for pipesØyvind Harboe2010-10-017-89/+82
| | | | | | | -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>
* server: specify port as a stringØyvind Harboe2010-10-015-41/+104
| | | | | | | | | 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>
* server: read/write now goes through connection fn'sØyvind Harboe2010-10-015-5/+35
| | | | | | | | | | | 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>
* server: split file descriptors in in/out fd'sØyvind Harboe2010-10-015-19/+15
| | | | | | | 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>
* server: rely on ctrl-c to stop openocdØyvind Harboe2010-10-011-26/+2
| | | | | | | | 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>
* log: remove hack to redirect logs when pipes are in useØyvind Harboe2010-10-011-17/+2
| | | | | | | | | | | 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>
* Update ep93xx and at91rm9200 driversLuca Bruno2010-09-302-26/+12
| | | | | | | | | | 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>
* fileio: fileio_size() can now failØyvind Harboe2010-09-299-20/+92
| | | | | | Part of making the fileio API more robust. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* fileio: refactor struct fileio to be an opaque structureØyvind Harboe2010-09-299-39/+64
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* TCL scripts: fix ocd_mem2array/mem2arrayAntonio Borneo2010-09-281-1/+1
| | | | | | | | 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>
* flash: fix error handlingØyvind Harboe2010-09-271-2/+11
| | | | | | memory leaks and missing check on memory allocation. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* image: fix spelling mistakeØyvind Harboe2010-09-273-19/+19
| | | | | | struct imageection => struct imagesection Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fix omap3_dbginit to write to physical memory.Zachary T Welch2010-09-261-1/+1
| | | | | Setting the OMAP3530 DBGEN bit must be done in physical memory, so update omap3_dbginit callback to use the new 'mww phys' command syntax.
* zy1000: fix non-JTAG master buildØyvind Harboe2010-09-261-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* gdb: fix blank line at topØyvind Harboe2010-09-261-1/+0
| | | | | | snuck in at some point... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtagdp: remove #if 0'd kludges and explain why the code is correctØyvind Harboe2010-09-211-16/+24
| | | | | | | | | 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>
* flash: fix error handlingØyvind Harboe2010-09-212-40/+5
| | | | | | sensible error must be reported at failure site Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* embeddedice: fix error handlingØyvind Harboe2010-09-212-6/+4
| | | | | | error is now reported at failure site. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* TCL scripts: collect duplicated proceduresAntonio Borneo2010-09-214-35/+25
| | | | | | | | 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>
* startup: removed capture_catchØyvind Harboe2010-09-201-7/+0
| | | | | | not used. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* helper: fix flaky capture commandØyvind Harboe2010-09-201-0/+16
| | | | | | | | | | | 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>
* tcl_server: switch to ctrl-zØyvind Harboe2010-09-201-11/+11
| | | | | | | | | | | | | | 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>
* logging: turn of stdout/stderr bufferingØyvind Harboe2010-09-201-0/+4
| | | | | | | 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>
* zy1000: add support for Linux hostØyvind Harboe2010-09-202-6/+45
| | | | | | | | 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>
* jtag: build jtag first because it generates header filesØyvind Harboe2010-09-201-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* warnings: fix alignment warningsØyvind Harboe2010-09-2013-23/+23
| | | | | | | These warnings are for architectures that do not support non-aligned word access. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: split out configure option for eCos and JTAG masterØyvind Harboe2010-09-201-0/+11
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: remove obsolete debug codeØyvind Harboe2010-09-201-7/+0
| | | | | | Obsolete code clutter Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* tcl: remove incomplete unused tcl fileØyvind Harboe2010-09-201-24/+0
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* xscale: some wp detail added to user manualMike Dunn2010-09-201-0/+9
| | | | | | | | | | | | | | | | Hi everyone (again), Watchpoints on xscale are quirky, so I thought a little explanation in the user's manual was warranted. Comments gratefully received. Last one, Øyvind :-) Thanks, Mike Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* xscale: check that wp length does not exceed addressMike Dunn2010-09-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi everyone, A while back I sent in a patch that adds support for watchpoint lengths greater than four on xscale. It's been working well, until the other day, when it caused an unexpected debug exception. Looking into this I realized there is a case where it breaks: when the length arg is greater than the base address. This is a consequence of the way the hardware works. Don't see a work-around, so I added code to xscale_add_watchpoint() to check for and disallow this combination. Some more detail... xscale watchpoint hardware does not support a length directly. Instead, a mask value can be specified (not to be confused with the optional mask arg to the wp command, which xscale does not support). Any bits set in the mask are ignored when the watchpoint hardware compares the access address to the watchpoint address. So as long as the length is a power of two, setting the mask to length-1 effectively specifies the length. Or so I thought, until I realized that if the length exceeds the base address, *all* bits of the base address are ignored by the comaparator, and the watchpoint range effectively becomes 0 .. length. Questions, comments, criticisms gratefully received. Thanks, Mike Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* xscale: bp/wp: additional LOG_ERROR on failureMike Dunn2010-09-201-6/+10
| | | | | | | | | | | | | | | | | | | | | Hi everyone, Added more LOG_ERROR messsages to watchpoint and breakpoint code, given that the infrastructure no longer interprets returned error codes. Also changed existing LOG_INFO and LOG_WARNING to LOG_ERROR for cases where an error is returned. Note that the check of the target state is superflous, since the infrastruture code currently checks this before calling target code. Is this being reconsidered as well? Also, should we stop returning anything other than ERROR_OK and ERROR_FAIL? Comments gratefully received. Thanks, Mike Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* AM/DM37x: Unify configuration scripts and add support for TI Beagleboard xM.Karl Kurbjun2010-09-203-82/+221
|
* cfi: add sst39vf6401bFlemming Futtrup2010-09-152-0/+15
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* breakpoints: fix error handlingØyvind Harboe2010-09-141-29/+7
| | | | | | | | do not try to interpret "retval" into a string, just amend a bit about the context of the already reported error. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* board scripts: Marvell PXA270M processor has a new TAPID: 0x89265013Takács Áron2010-09-142-1/+20
| | | | | | | | | | the new Marvell PXA270M processor has a new TAPID: 0x89265013. Attached you will find a patch for target/pxa270.cfg that will handle this. I have also attached a board/colibri.cfg file to support the Colibri PXA270 module by Toradex. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* xscale: fix sw breakpoints for thumb; set bp immediatelyMike Dunn2010-09-131-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi everyone, Version 2 of this patch. Code added to breakpoints.c was removed from previous patch, and item 3 added, per discussion with Øyvind regarding error reporting. Item 4 added, which I just noticed. I tried to use a software breakpoint in thumb code on the xscale for the first time recently, and was surprised to find that it didn't work. The result was this patch, which does four things: 1): fix trivial cut-n-paste error that caused thumb breakpoints to not work 2): call xscale_set_breakpoint() from xscale_add_breakpoint() 3): log error on data abort in xscale_write_memory() 4): fixed incorrect error code returned by xscale_set_breakpoint() when no breakpoint register is available; added comment Item 2 not only makes the xscale breakpoint code consistent with other targets, but also alerts the user immediately if an error occurs when writing the breakpoint instruction to target memory (previously, xscale_set_breakpoint() was not called until execution resumed). Also, calling xscale_breakpoint_set() as part of the call chain starting with handle_bp_command() and propagating the return status back up the chain avoids the situation where OpenOCD "thinks" the breakpoint is set when in reality an error ocurred. Item 3 provides a helpful message for a common reason for failure to set sw breakpoint. This was thoroughly tested, mindful of the fact that breakpoint management is somewhat dicey during single-stepping. Comments and criticisms of course gratefully received. Mike Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* propagate return status of set_breakpoint() up call chainMike Dunn2010-09-133-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Hi everyone, I figured since I was poking around in the breakpoint code on other arches, I'd add this change to those arches that don't do it already. This patch propagates the return code of <arch>_set_breakpoint() up the call stack. This ensures that the higher layer breakpoint infrastructure is aware that an error ocurred, in which case the breakpoint is not recorded. Normally I wouldn't touch code that I can't test, but the code is very uniform across architectures, and the change is rather benign, so I figured after careful inspection that it is safe. If the maintainers or others think this is imprudent, the patch can be dropped. Also changed the error code to something more appropriate in two cases where hardware resources are unavailable. Comments and criticisms of course gratefully received. Mike Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>