aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-01-21gdb_server: handle stepi/continue packet while target is running with more graceØyvind Harboe
Rather than issuing a halt and then stepi/resume, just wait for target to halt. Issue a sterner warning via gdb console that any gdb register changes will be ignored in this case. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-21ecos: add missing PRId8 definitionØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-20BUILD: remove cygwin gcc 3.4.4 build warningsSpencer Oliver
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-20gdb_server: correctly report flash sector sizesDavid Brownell
Report each region of same-size sectors separately, instead of incorrectly reporting that every sector has the same size. This is a longstanding bug on NOR flash chips with non-uniform sector sizes. It was largely hidden by other bugs in flash handling. When some of those were recently fixed, this one was exposed as a regression on str710. [oyvind.harboe@zylin.com: update the loop to behave on str7 ] Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-20arm7/9: add nags upon reset about options to improve performanceØyvind Harboe
arm7_9 fast_memory_access and working area nags added. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-20ARMV7M: handle bkpt instruction on resume/stepSpencer Oliver
Skip over a bkpt instruction if found on resume/step. Only software breakpoints known to OpenOCD are currently handled. So this handles the special case of either a user added bkpt or library added, eg. semi-hosting support. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-19gdb_server -- subroutinize memory map logicDavid Brownell
Put the memory map logic into its own subroutine. This will make it a bit easier to package bugfixes, and simplifies the query packet handling. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-19gdb_server -- symbol cleanupDavid Brownell
Make most methods static; net minor object code shrink. Likewise various data symbols; no net change. Shrink some overlong lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-19update win32 script search pathAndreas Fritiofson
The default script search path on Windows is out of date with the current layout (from installation and documentation), which makes the standard script library not be found after a normal ./configure && make && make install under msys/MinGW. The same should hold true for cygwin native builds (not verified). Update search path to ../share/openocd/scripts not ../lib/openocd, relative to the openocd executable. Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-19NOR: fix diagnosticDavid Brownell
The "NOR: last_addr also needs correction when checking alignment" patch omitted a necessary update to the key diagnostic; fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-19zy1000: flush jtag buffer before changing speedØyvind Harboe
It is conceivable that there could be commands in the queue when a speed change request comes in. Flush the hw queue before changing speed. Not observed, found by inspection. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-19zy1000: print out PCB revision upon bootØyvind Harboe
Simplify debugging a bit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-19flash: add error messages upon incorrect arguments to flash iterationØyvind Harboe
According to OpenOCD error handling rules the error is logged at where it occurs(same site where an exception would have been thrown). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-18vsllink -- add commentDavid Brownell
Previous patch deserved *inline* comment, not just in git revision history. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-18commands: allow scan_chain command to be executed during configØyvind Harboe
Adding taps and then dumping them is quite reasonable thing to do in a config script. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-17read target voltage first in vsllinksimon qian
The very first command after init command should be "read target voltage". This is a tweak for the Old Versaloon firmware. Without this, in most most cases, it works. Under Ubuntu9.04, there is a chance that the USB will fail. The problem disappears if I read target voltage first. For the lastest Versaloon firmware, it's OK. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-16NAND: lpc3180 crashes on LPC3250richard vegh
The LPC3180 NAND driver was crashing on some large page chips. Fix: - Crash and related functionality (don't memset too much OOB data) - Some debug messages - Command handling now works [dbrownell@users.sourceforge.net: whitespace/linelength/message cleanup] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-15ADIv5 improved diagnosticDavid Brownell
Don't just complain about an invalid ACK; say what the value was, to help troubleshooting. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-15ARM DPM: disable some nyet-ready breakpoint codeDavid Brownell
Until we manage breakpoints at runtime (patches not ready for 0.4) the only way this code should touch them is to disable them at server startup (a previous debug session may have left them active). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-14jtag.h whitespace/comment cleanupDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-14ARM ADIv5: add commentsDavid Brownell
Add doxygen and other comments for what's more or less the lowest level JDAG-DP primitive, to access JTAG_DP_{A,D}PACC registers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-14ARM7/ARM9: improved reset supportDavid Brownell
Teach most remaining ARM cores how to use the "reset-assert" event. Same model as elsewhere: iff a handler is provided for that event, use that instead of trying to assert SRST (which may be unavailable, or inappropriate since it resets too much). Else no change. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-14nand flash support for s3c64xxPeter Korsgaard
Identical to the existing 2412/2443 support except for the base address and NFCONF value (bit 2 is reserved and should be written as 1 ref UM). Tested on a s3c6410 board, but controller is identical in 6400/6410 except for 8bit MLC ECC support in 6410 which isn't supported by the driver. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-14str9x.c: remove optimization when erasing the whole bankLaurentiu Cocanu
Using the erase bank command will cause a time out error. Replacing this with the erase sector bank will provide a slower but safer and stable method to erase the flash. Signed-off-by: Laurentiu Cocanu <laurentiu.cocanu@zylin.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-14ARM7/9 minor cleanupsDavid Brownell
Shrink some overlong lines. Add my 2009 copyright. Move a declaration to the beginning of its block. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-14GDB: change gdb_breakpoint_override to COMMAND_ANYSpencer Oliver
- enable gdb_breakpoint_override to be used within config script. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-13NOR: add optional "flash erase_address" sector paddingDavid Brownell
Add a NOR flash mechanism where erase_address ranges can be padded out to sector boundaries, triggering a diagnostic: > flash erase_address 0x0001f980 16 address range 0x0001f980 .. 0x0001f98f is not sector-aligned Command handler execution failed in procedure 'flash' called at file "command.c", line 647 called at file "command.c", line 361 > > flash erase_address pad 0x0001f980 16 Adding extra erase range, 0x0001f800 to 0x0001f97f Adding extra erase range, 0x0001f990 to 0x0001fbff erased address 0x0001f980 (length 16) in 0.095975s (0.163 kb/s) > This addresses what would otherwise be something of a functional regression. An earlier version of the interface had a dangerous problem: it would silently erase data outside the range it was told to erase. Fixing that bug turned up some folk who relied on that unsafe behavior. (The classic problem with interface bugs!) Now they can get that behavior again. If they really need it, just specify "pad". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-13Cortex-M3: improved core exception handlingDavid Brownell
This updates three aspects of debugger/exception interactions: - Save the user's "vector_catch" setting, and restore it after reset. Previously, it was obliterated (rather annoyingly) each time. - Don't catch BusFault and HardFault exceptions unless the user says to do so. Target firmware may need to handle them. - Don't modify SHCSR to prevent escalating BusFault to HardFault. Target firmware may expect to handle it as a HardFault. Those simplifications fix several bugs. In one annoying case, OpenOCD would cause the target to lock up on ome faults which triggered after the debugger disconnected. NOTE: a known remaining issue is that OpenOCD can still leave DEMCR set after an otherwise-clean OpenOCD shutdown. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-13arm7/9: enable check that DCC downloads have been enabledØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-13arm7/9: add fn to check if dcc downloads have been enabledØyvind Harboe
DCC downloads should be enabled for any self repecting openocd config file for arm7/9. Print out note about it otherwise. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-13target: add check_reset hookØyvind Harboe
Allow targets to run checks post reset. Used to check that e.g. DCC downloads have been enabled. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-13gdbserver: fix typo that broke read/write watchpointØyvind Harboe
It looks like a bugfix from normal breakpoints was not copied over. Do not use clever mathematics and assumptions to convert from GDB enum for break/watchpoints to OpenOCD enum. Drop connection upon unknown breakpoint type, this code path was not really considered by the previous code I think. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-13debug: make logging of commands terserØyvind Harboe
one line / command instead of one line per argument. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-12ARM: bugfix for "movt" disassemblyDavid Brownell
Use the correct bitfield to specify the register whose top halfword gets replaced. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-11target: return JIM_OK instead of ERROR_OKØyvind Harboe
No change in actual binary as JIM_OK == ERROR_OK, but JIM_OK is correct here. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-11reset: better error messagesØyvind Harboe
Use correct tcl syntax to throw exception. the syntax is "return -code error" not "return -error" Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-11commands: make error messages a bit more terseØyvind Harboe
we don't need to know the build path of command.c when reading normal user level error messages. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-11zy1000: reset bugfixØyvind Harboe
flush JTAG FIFO before reset. Fixes RCLK problems observed w/lpc2148, but really fixes a wider range of problems. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-11Doxygen file commentsDavid Brownell
Add file comments to a few files. Make the GDB server use more conventional (pointer-free) hex digit conversion. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-11shutdown: more graceful shutdownØyvind Harboe
Shutdown is not an error condition, do not return error from main. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-10FreeBSD build fixesDavid Brownell
Based on notes from Tomek Cedro <tomek.cedro@gmail.com> and Steve Franks <bahamasfranks@gmail.com>. In the User's Guide, sort the list of operating systems reported through Tcl with $ocd_HOSTOS ... and include FreeBSD. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09Presto: doxygen fixDavid Brownell
Newline needed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09jtag/tcl help/usage fixupsDavid Brownell
The usual: expand several helptexts to be more correct and to use full sentences; make the usage messages use the same EBNF as the User's Guide; use function names for their addresses. Also add a comment about that odd jtag_command_handlers_to_move[] thing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09ZY1000 help/usage fixupsDavid Brownell
The usual: same EBNF as in the User's Guide, full sentence helptext, function names *are* their addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09jtag: presto, parport help/usage updatesDavid Brownell
Presto: add doxygen file comment. Parport: note a couple gaps in layout config. Both: use the uniform EBNF for usage, bugfix helptexts, use function name as its address not "&name". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09jtag/gw16012 usage/help updatesDavid Brownell
Use standard BNF. Improve/correct helptext for its "parport_port" command. Function address is just its name.
2010-01-09src/helper: usage/help updatesDavid Brownell
Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Don't use "&function"; a function's name is its address. Fix some whitespace glitches, shrink a few overlong lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09src/flash/nor: usage/help/doc updatesDavid Brownell
Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Don't use "&function"; a function's name is its address. Remove a couple instances of pointless whitespace; shrink a few overlong lines; fix some bad indents. Add TODO list entry re full support for NAND/NOR bank names. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-09MIPS: update arch_info access to match other targetsSpencer Oliver
- add target_to_mips32 and target_to_m4k to match test of codebase. - mips32_arch_state now shows if processer is running mips16e isa. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-09src/server: usage/help/doc updatesDavid Brownell
Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Specifically for the port commands, clarify that the number is optional, and omitting it causes the current number to be displayed. Don't use "&function"; a function's name is its address. Remove a couple instances of pointless whitespace; shrink a few overlong lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>