aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-09-13propagate return status of set_breakpoint() up call chainMike Dunn
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>
2010-09-12helper: add stacktrace command that returns error stacktraceØyvind Harboe
Ability to access the stacktrace from a script is quite handy. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-12jim: fix crash when using Jim_ListInsertElementsØyvind Harboe
Jim_ListInsertElements was simply forgotten from the fn that registered all the APIs. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-11version command: make it scriptableØyvind Harboe
you can now set a variable in a script like set version [version]. Also version takes an optional argument "git" to show git version of source. If git is not installed during the build, then this will yield an error that is ignored during the build and "version git" returns an empty string. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-11command: capture command now handles both types commandsØyvind Harboe
Commands that output progress output and no return value will have the progress output captured. Commands that do not output progress output(tcl commands) will return the tcl return value instead. The advantage here is that it is no longer necessary to consider which command one is capturing, it works for either. Example #1: capture progress output: set foo [capture help] Example #2: capture tcl return value set foo [capture {set abc def}] Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-11cfi: random crash in cfi_probe() fixedØyvind Harboe
for non_cfi cfi chips free() was invoked on rodata. The mystery is why this bug has survived for so long. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-11cfi: tighten up type usage a bitØyvind Harboe
sizeof() is a bit less scary than seing assumption about size of type, no bug as such. Use NULL instead of 0 for pointers. More obvious that it is a pointer from code inspection. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-09xscale: mark xscale registers invalid on debug entryMike Dunn
Hi everyone, This simple patch fixes a problem I noticed on the xscale where incorrect values are sometimes reported by the reg command. The problem can occur when requesting the value of registers in the xscale-specific register cache. With a couple of exceptions, none of the registers in the xscale register cache are automatically retrieved on debug entry. This is probably fine, as they are unlikely to be needed on a regular basis during a typical debug session, and they can be retrieved when explicitly requested by name using the reg command. The problem is that once this is done, the register remains marked as valid for the remainder of the OpenOCD session, and the reg command will henceforth always report the same value because it is obtained from the cache and is never again retrieved from the debug handler on the target. The fix is to mark all registers in the xscale register cache as invalid on debug entry (before the two exceptions are retrieved), thus forcing retrieval (when requested) from the target across resumptions in execution, and avoiding the reporting of stale values. Small addition change by Øyvind: change 'i' to unsigned to fix compiler warning for xscale_debug_entry() fn. Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-08Remove duplicated initializationAlexander Stein
I a mail conversation with Øyvind we stated that speed may not be set at all on case CLOCK_MODE_KHZ and CLOCK_MODE_RCLK. Also there isn't proper error propagation adapter_khz_to_speed or jtag_rclk_to_speed. So jtag_get_speed may need some rewrite for error propagation. CC: Øyvind Harboe <oyvind.harboe@zylin.com> Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-07warning: fix silly -O3 warningØyvind Harboe
Some versions of GCC don't pick up that local variables are set in all code paths. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-03jtag: fix regression with dummy driver and when starting OpenOCD with target ↵Øyvind Harboe
powered down Do not fail startup if communication with target is not possible. OpenOCD supports launching without a target connected or the target powered down. The user will typically power up the target and issue a "reset init" + load his application after OpenOCD is started then. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-03Numonyx M29W160ET patchWookey
Someone called David Carne popped up on IRC and offered a fix (as he's not on this list so can;t post here). I am just passing it on. (thanx David) 10:54 < davidc__> Basically; the Numonyx M29W160ET has an incorrect CFI PRI block; it describes the erase blocks backwards 10:54 < davidc__> the linked patch has a fixup for that part [really trivial]:
2010-08-31cortex m3: add cortex_m3 reset_config cmdSpencer Oliver
This new cmd adds the ability to choose the Cortex-M3 reset method used. It defaults to using SRST for reset if available otherwise it falls back to using NVIC VECTRESET. This is known to work on all cores. Move any luminary specific reset handling to the stellaris cfg file. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-08-31flash: increase stellaris flash loader bufferSpencer Oliver
This speeds up programming for targets with more working area, Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-08-27bitq: unshadow pause()David Brownell
bitq.c: In function ‘bitq_scan_field’: bitq.c:224: error: declaration of ‘pause’ shadows a global declaration /usr/include/unistd.h:429: error: shadowed declaration is here Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-08-15avr32: work-in-progressOleksandr Tymoshenko
committed so as to ease cooperation and to let it be improved over time. So far it supports: - halt/resume - registers inspection - memory inspection/modification I'm still getting up to speed with OpenOCD internals and AVR32 so code is a little bit messy and I'd appreciate any feedback.
2010-08-14Fix typo in usb_blaster_vid_pid error messageCatalin Patulea
2010-08-13Added support for the Lisa/L jtag LEDs.Piotr Esden-Tempski
2010-08-13Added support for Lisa/L builtin JTAG interface.Piotr Esden-Tempski
2010-08-12jtag: fix handling of 'tap enable' errorThomas Koeller
if a tap could not be _enabled_, the error message was 'failed to disable tap'. Fixed that. Also, display the failing tap's name. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
2010-08-12str9x: faster flash erase of entire chipFredrik Hederstierna
The patch improves flash erase for STR9x in case of a full bank erase. Then the chip erase command is used instead which improves speed significantly. Also I think it might help if e.g. STR912 enters some state where flash banks are locked, and a chip erase command is the key for unlocking the flash.
2010-08-11tcl: remove silly ocd_ prefix to array2mem and mem2arrayØyvind Harboe
ocd_ prefix is used internally in OpenOCD as a kludge more or less to deal with the two kinds of commands that OpenOCD has. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-11debug: use assert's when approperiateØyvind Harboe
error was returned instead of using assert. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-11arm: add missing error reportingØyvind Harboe
when an unknown core mode is read from the target, report error. Can be communication failure. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-09arm7/9: fix "reset run + halt"Øyvind Harboe
if polling is off, then "reset run + halt" would fail since halt incorrectly assumed the target was in the reset state as it is the internal poll implementation that moves the sw tracking of the target state out of the reset state. To reproduce: > reset run; halt JTAG tap: zy1000.cpu tap/device found: 0x1f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x1) BUG: arm7/9 does not support halt during reset. This is handled in arm7_9_assert_reset() Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-09target: if polling fails, back offØyvind Harboe
back-off algorithm for polling. Double polling interval up to 5000ms when it fails. when polling succeeds, reset backoff. This avoids flooding logs(as much) when working with conditions where the target polling will fail. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02verify_image: print out a statement that there are no further errorsØyvind Harboe
It is useful to know that the printed errors are *all* the errors there were. Added missing error handling(found by inspection). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02zy1000: use correct base clock when calculating speed divisorØyvind Harboe
revc uses 60MHz and revb 64MHz, use this in calculations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02zy1000: print out khz correctly in response to setting JTAG speedØyvind Harboe
Calculate printout based on same core routines. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02ioutil: fix internal fn namesØyvind Harboe
prefix w/ioutil_ Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02jtag: measure_clk debug procØyvind Harboe
It can be useful to get an approximate measurement of rtck frequency for debugging purposes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02jtag: add jtag_flush_queue_sleep debug commandØyvind Harboe
it can be useful to throttle performance: test differences in behavior, test performance effect of long roundtrips. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-01util: ms command to calculate length of operationsØyvind Harboe
This can be used to calculate approximate RTCK frequency for instance. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-01stellaris flash comment updateDavid Brownell
This flash driver works on more than just two chips. (Though it does need work still, e.g. to protect more than 64K. (On non-'3748-A0 chips where errata allow that.)) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-24"transport select" returns Jim valueDavid Brownell
Make it scriptable, so code can be conditionalized based on what transport is in use for the session. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-23Buspirate: fix shadowMichal Demin
2010-07-20flash: remove algorithm exit_point address for supported targetsSpencer Oliver
For the above targets the exit_point is optional when used with run_algorithm, so remove it. This makes updating the algorithm less error prone. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-20mips32: exit_point optional for mips32_run_algorithmSpencer Oliver
As the mips32 uses instruction breakpoints for algorithms we do not really need to check the pc on exit. This now matches the behaviour of the arm codebase. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-20armv7m: exit_point optional for armv7m_run_algorithmSpencer Oliver
As the armv7m uses instruction breakpoints for algorithms we do not really need to check the pc on exit. This now matches the behaviour of the arm4_5 codebase. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-20armv4_5: add algorithms instruction breakpoint supportSpencer Oliver
Update the arm_checksum_memory and arm_blank_check_memory algorithms to use a breakpoint instruction on v5 arch. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-20arm11 error propagation fixesØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-20arm_jtag_scann error propagation fixesØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19arm_dpm: error propagation fixesØyvind Harboe
found by inspection Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19adi_jtag_ error propagationØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19arm: error propagation of arm_jtag_set_instrØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19arm_adi_v5: dap_run() error propagationØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19arm_adi_v5: mem_ap_write error propagationØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19arm_adi_v5: error propagation of mem_ap_read_atomic_u32 failureØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19mem_ap_read_u32 error propagationØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-19arm_adi_v5: add error propagation for dap_setup_accessportØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>