summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* svf: implement sleep for RUNTEST min_timeJon Povey2011-01-021-30/+28
| | | | | | | | | | | Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk> min_time was effectively ignored, I needed it to program a Lattice MachXO which uses a RUNTEST to wait for an erase operation, amongst other things. With this patch pauses happen and I can program the device with an SVF generated in LSC ispVM (with "Rev D Standard" checked to suppress nonstandard LOOP statements)
* svf: fix USAGE and related error reportingJon Povey2011-01-021-9/+4
| | | | Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
* NAND/S3CXXXX: remove private "target" copyAntonio Borneo2011-01-027-33/+16
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/ORION: remove private "target" copyAntonio Borneo2011-01-021-13/+5
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/NUC910: remove private "target" copyAntonio Borneo2011-01-021-21/+7
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/MX3: remove private "target" copyAntonio Borneo2011-01-022-22/+11
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/MX2: remove private "target" copyAntonio Borneo2011-01-022-20/+11
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/LPC3180: remove private "target" copyAntonio Borneo2011-01-022-24/+16
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/DAVINCI: remove private "target" copyAntonio Borneo2011-01-021-27/+17
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/AT91SAM9: remove private "target" copyAntonio Borneo2011-01-021-37/+22
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/TCL: prepare for common "target" referenceAntonio Borneo2011-01-022-3/+26
| | | | | | | | | Every NAND driver keeps private copy of "target" structure. Prepare infostructure to move private "target" copy in common/shared struct nand_device. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/TCL: fix segfault on syntax errorAntonio Borneo2011-01-021-1/+1
| | | | | | | Fix segfault if incomplete command "nand device dummy" is executed. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/CORE: Comment use of alive_sleep()Antonio Borneo2011-01-021-0/+1
| | | | Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/CORE: Replace decimal dot in messagesAntonio Borneo2011-01-021-66/+66
| | | | | | | | | | | | Table of NAND devices reports operating voltage. Replace comma with proper decimal dot. Øyvind: "." is correct for UK/US, but incorrect for many other languages. OpenOCD is not localized at this point, so sticking to "." for US/UK should be OK. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash/nand: review NAND driver interfaceAntonio Borneo2011-01-0213-47/+2
| | | | | | | | | | From struct nand_flash_controller : - remove unused field register_commands; - remove field controller_ready, exported but never referenced. Remove dead code pointed by controller_ready. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* CORTEX A8: Fix broken CPU identificationMarek Vasut2010-12-301-3/+17
| | | | | | | This patch fixes the issue where the OMAP CPU (and possibly others) was mistaken for iMX51 and therefore had misadjusted debug base. Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* Compilation Warnings on OS X 10.5Andrew MacIsaac2010-12-298-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I received a number of "-Wshadow" related warnings (treated as errors) while trying to build on OS X Leopard. In addition, there were two miscellaneous other warnings in the flash drivers. Attached are two patches which correct these issues and the commit messages to accompany them. My system has the following configuration (taken from uname -a): Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 === Werror_patch.txt Commit Message === compilation: fixes for -Wshadow warnings on OS X These changes fix -Wshadow compilation warnings on OS X 10.5.8 Compiled with the following configure command: ../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi === flash_patch.txt Commit Message === compilation: fixes for flash driver warnings on OS X These changes fix two compilation warnings on OS X 10.5.8: ../../../../src/flash/nor/at91sam3.c:2767: warning: redundant redeclaration of 'at91sam3_flash' ../../../../src/flash/nor/at91sam3.c:101: warning: previous declaration of 'at91sam3_flash' was here and ../../../../src/flash/nor/stmsmi.c:205: warning: format not a string literal and no format arguments Compiled with the following configure command: ../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi === Andrew
* warning: fix warning where GCC didn't catch a doubly declared global structureØyvind Harboe2010-12-291-1/+1
| | | | | | Why hasn't earlier versions of GCC caught this? Bug? Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* warnings: use more 'const' for char *Øyvind Harboe2010-12-2925-30/+30
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: do not expose error numbers to usersØyvind Harboe2010-12-291-6/+0
| | | | | | | error numbers are only reported at DEBUG log levels and used internally, they are not part of the user interface. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* initial SWD transport (SWD infrastructure #2)David Brownell2010-12-248-9/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This piggy backs on JTAG so it's not yet pretty, but that seems unavoidable so far given today's OpenOCD internals. SWD init and data transfer are unfinished and untested, but that should cause no regressions, and will be addressed by the time drivers start using this infrastructure. Checking in whould get the code working better sooner, and turn up any structural/architectural issues while they're easier to fix. The debug adapter drivers will provide simple SWD driver structs with methods that kick in as needed (instead of JTAG). So far just one adapter driver has been updated (not yet ready to use or circulate). The biggest issues are probably - fault handling, where the ARM Debug Interface V5 pipelining needs work in both JTAG and SWD modes and - missing rewrite of block I/O code to work on both of our Cortex-ready transports (Current code is hard-wired to JTAG); relates also to the pipelining issue. - omitted support to activate/deactivate SWO/SWV trace (this is technically trivial, but configuring what to trace is NOT. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> ---- doc/openocd.texi | 17 ++ src/jtag/core.c | 3 src/jtag/interface.h | 4 src/jtag/jtag.h | 2 src/jtag/swd.h | 114 +++++++++++++++++++ src/jtag/tcl.c | 2 src/target/adi_v5_swd.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++-- src/target/arm_adi_v5.c | 8 + src/target/arm_adi_v5.h | 3 9 files changed, 425 insertions(+), 9 deletions(-)
* stm32x : always use valid flash base addressSpencer Oliver2010-12-231-0/+3
| | | | | | | This change matches the previous behaviour of using the known flash address. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* flash: print flash bank name on flash info cmdSpencer Oliver2010-12-231-2/+2
| | | | | | | | The flash bank name is a required element in adding flash banks, however other than looking at the config file there is no way of getting the name used in openocd. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: fix reversed option byte writeSpencer Oliver2010-12-231-4/+4
| | | | | | This has been a long standing bug that has never been spotted. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: update option bytes for stm32xl familySpencer Oliver2010-12-231-8/+79
| | | | | | | add supoort for xl family boot bank option. The option byte handling will be cleaned up in a later patch. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: add stm32 xl family flash supportSpencer Oliver2010-12-231-1/+45
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: add dual flash bank supportSpencer Oliver2010-12-231-26/+37
| | | | | | | This patch adds the initial dual flash bank support for devices such as the stm32xl family. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* config: add init_targets proc that is executed just before initØyvind Harboe2010-12-222-0/+12
| | | | | | | | | | | this allows configuration scripts to export a init_targets proc rather than setting up the target directly. This allows for new conventions in how to set up target vs. board script and how to transfer default settings between board and target scripts. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* server: remove error value from LOG_INFOØyvind Harboe2010-12-211-1/+1
| | | | | | | | | | the error values is not part of the interface to the user, so they should never be printed in LOG_INFO or LOG_USER. Printing them in LOG_DEBUG() rarely makes much sense but is OK. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* script: support only Tcl commentsØyvind Harboe2010-12-181-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only Tcl comments are now supported. For classic style commands comments were supported at the end of the line. Move in the direction of letting the script language decide syntax, rather than have special rules for some commands. Before this patch goes in, the scripts should be updated to use ;# instead of # for end of line comments. > mdw 0 1 2 mdw ['phys'] address [count] zy1000.cpu mdw address [count] Command handler execution failed in procedure 'mdw' > mdw 0 1 #2 mdw ['phys'] address [count] zy1000.cpu mdw address [count] Command handler execution failed in procedure 'mdw' > mdw 0 1 ;#2 0x00000000: ffffffff > mdw 0 1 0x00000000: ffffffff > mdw 0 0x00000000: ffffffff Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fix for compilation failure amt_jtagaccel.cJohn Devereux2010-12-161-0/+3
| | | | | | | | Hi, I think there are errors in amt_jtagaccel.c I attach a small patch that I needed to make it compile.
* Fix for segfault in handle_nand_dump_command.Paul Richards2010-12-151-5/+5
|
* stm32: fix unprotectØyvind Harboe2010-12-151-4/+11
| | | | | | | | | the unprotect fn in stm32 needs to unprotect more sectors than was requested aligned to some boundary. Print warning when this happens. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: clarify protect documentationØyvind Harboe2010-12-151-3/+6
| | | | | | | some chips unprotect more than the range asked for. The protect fn, must unprotect/protect minimally the range given. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* contrib: add source to the cfi flash loadersSpencer Oliver2010-12-101-6/+13
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: disable buffer writes for M29W128GSpencer Oliver2010-12-102-5/+16
| | | | | | | | | | For some reason buffer writes for the M29W128G do not work reliably, so disable them. See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=504a3e72208fc6a65924426ff5693982590bccdc Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: allow optional buffer write supportSpencer Oliver2010-12-102-2/+12
| | | | | | | Some flash's do not support buffer writes, so we now check they are supported before trying to use them. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: calculate correct timeoutsSpencer Oliver2010-12-102-16/+29
| | | | | | | | The existing code used incorrect timeout values for the various cfi operations. We now calculate the timeouts and convert to msecs if necessary. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: prefix string hex outputSpencer Oliver2010-12-101-12/+12
| | | | | | Add hex prefix so we know output is not decimal. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: add time format to cfi query outputSpencer Oliver2010-12-101-8/+11
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: whitespace and long line cleanupSpencer Oliver2010-12-101-282/+389
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* Fix for segmentation fault from freed memory access in ↵Paul Richards2010-12-101-13/+9
| | | | jtag_unregister_event_callback()
* build: fix build from previous commitSpencer Oliver2010-12-082-2/+2
| | | | | | | commit 740b9e25b410c164e661d0334a9ea4168406726b broke the drivers for ftdi and parport due to retval already being defined. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* jtag: getting the JTAG speed can failØyvind Harboe2010-12-0811-27/+71
| | | | | | | | | | | If the JTAG speed has not been set, then it has no defined value, add code to propagate the error. No change to actual behavior as no new failure paths have been introduced. This is a no-op patch to make subsequent patches smaller. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* svf: various improvementsAndrew Leech2010-12-071-78/+292
| | | | | | | | * added support for targeting particular tap * improved file reading * improved command line parsing * added progress meter * more readable time measurement output
* xscale: trace buffer remains enabled until explicitly disabledMike Dunn2010-12-042-54/+97
| | | | | | | | | | | | | | | | | | | | | Hi everyone, Since a call went out for patches... been sitting on this for months. For some reason, the xscale trace buffer is automatically disabled as soon as a break occurs and the trace data is collected. This patch was a result of the frustration of always re-enabling it, or else hitting a breakpoint and checking the trace data, only to discover that I forgot to re-enable it before resuming. Don't see why it should work this way. There is no run-time penalty, AFAIK. Along the way, I also cleaned up a little by removing the ugly practice of recording wrap mode by setting the fill count variable to "-1", replacing it with an enum that records the trace mode. I've been using this for months. Comments, criticisms gratefully received. Mike Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* Fix sector layout for 504-KiB LPC2000 devicesRolf Meeser2010-12-041-4/+7
|
* cortex_m3: change cortec_m3 reset_config behaviourSpencer Oliver2010-12-032-19/+2
| | | | | | | | | Currently the cmd 'cortex_m3 reset_config' will overide the default target's 'reset_config'. Chnage the behaviour to use the target 'reset_config' if configured and fallback if not. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* profile: use 100Hz as a default sampling frequencyØyvind Harboe2010-12-011-2/+2
| | | | | | | | it's a lie that is somewhere in the vicinity of the truth. Certainly 64MHz confuses gprof and produces zero output and no error messages. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* lpc2900.c: Improve debug output for device probingRolf Meeser2010-12-011-1/+5
|