Antonio Borneo [Sat, 10 Apr 2010 14:25:22 +0000 (22:25 +0800)]
HELPER/LOG: review unused symbols
Remove unused functions:
- log_catch
- log_rethrow
- log_try
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 14:20:41 +0000 (22:20 +0800)]
TARGET/MIPS_EJTAG: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 14:14:34 +0000 (22:14 +0800)]
NOR/CFI: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 14:12:20 +0000 (22:12 +0800)]
TARGET/DSP563XX_ONCE: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 14:04:03 +0000 (22:04 +0800)]
OPENOCD: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 14:01:16 +0000 (22:01 +0800)]
JTAG/COMMANDS: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 13:54:37 +0000 (21:54 +0800)]
BINARYBUFFER: review scope of data and functions
Add "static" qualifier to private data and functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 13:52:33 +0000 (21:52 +0800)]
NOR/STR7X: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 13:50:15 +0000 (21:50 +0800)]
NAND/TCL: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 12:11:40 +0000 (20:11 +0800)]
MFLASH: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 12:09:59 +0000 (20:09 +0800)]
NAND/ARM_IO: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 12:08:41 +0000 (20:08 +0800)]
NAND/CORE: review scope of functions
Add "static" qualifier to private functions.
Move function's comment from core.h to core.c.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 12:03:19 +0000 (20:03 +0800)]
NAND/MX3: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:58:15 +0000 (19:58 +0800)]
NOR/ADUC702X: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:56:24 +0000 (19:56 +0800)]
NOR/AVRF: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:54:22 +0000 (19:54 +0800)]
NOR/CORE: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:38:15 +0000 (19:38 +0800)]
NOR/DRIVERS: review scope of functions
Add "static" qualifier to private functions.
Remove unused "extern" in src/ecosboard.c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:29:51 +0000 (19:29 +0800)]
STR9XPEC: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:28:13 +0000 (19:28 +0800)]
TCL: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 11:25:32 +0000 (19:25 +0800)]
TIME_SUPPORT: review unused symbols
Remove unused functions:
- timeval_add
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 09:23:06 +0000 (17:23 +0800)]
HELLO: review unused symbols
Remove unused functions:
- hello_register_commands
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 09:06:16 +0000 (17:06 +0800)]
PLD: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 09:03:02 +0000 (17:03 +0800)]
ADI_V5_JTAG: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 09:01:06 +0000 (17:01 +0800)]
ARM920T: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 08:59:50 +0000 (16:59 +0800)]
ARM_JTAG: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 08:57:49 +0000 (16:57 +0800)]
ARM_SIMULATOR: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 08:46:59 +0000 (16:46 +0800)]
ARMV4_5_MMU: review unused symbols
Remove unused data:
- armv4_5_mmu_page_type_names
Remove prototype of not existing function:
- armv4mmu_translate_va
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 08:46:01 +0000 (16:46 +0800)]
ARMV4_5: review scope of data
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Sat, 10 Apr 2010 08:44:54 +0000 (16:44 +0800)]
EMBEDDEDICE: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 9 Apr 2010 16:25:35 +0000 (00:25 +0800)]
TARGET: review unused symbols
Remove unused functions:
- target_all_handle_event
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 9 Apr 2010 16:22:46 +0000 (00:22 +0800)]
TARGET: review scope of functions
Add "static" qualifier to private functions.
Remove unused "extern" in src/ecosboard.c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 9 Apr 2010 16:07:40 +0000 (00:07 +0800)]
ARMv7M: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
David Brownell [Sun, 4 Apr 2010 08:28:50 +0000 (01:28 -0700)]
Restore deleted '!' character
I'm not sure what caused this significant character to get deleted.
it may be related to intermittent Editor or terminal flakes I've
been seeing lately (sigh). This fix is trivial.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Sun, 4 Apr 2010 07:42:05 +0000 (00:42 -0700)]
target: are we running algorithm code?
Fixing one bug can easily uncover another .... in this case,
making sure that we properly invalidate some cached NOR state when
resuming arbitrary target code turned up an issue when the code
wasn't quite arbitrary (and we couldn't know that, but some parts
of OpenOCD assumed the cache would not be invalidated.
Specifically: some flash drivers (like CFI) update that state in loops
with downloaded algorithms, thus invalidating the state as it's probed.
+ Add a new target state flag, to record whether the target is
running downloaded algorithm code.
+ Use that flag to add a special case: "trust" downloaded algorithms
not to corrupt that cached state, bypassing cache invalidation.
Also update some of the documentation to stipulate that this flavor of
trustworthiness is now *required* ... not just a fortuitous acident.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Sun, 4 Apr 2010 07:38:39 +0000 (00:38 -0700)]
simplify and unconfuse target_run_algorithm()
For some reason there are *two* schemes for interposing logic into
the run_algorithm() code path... One is a standard procedural wapper
around the target method invocation.
the other (superfluous) one hacked the method table by splicing
a second procedural wrapper into the method table. Remove it:
* Rename its slightly-more-featureful wrapper so it becomes
the standard procedural wrapper, leaving its added logic
(where it should have been in the first place.
Also add a paranoia check, to report targets that don't
support algorithms without traversing a NULL pointer, and
tweak its code structure a bit so it's easier to modify.
* Get rid of the superfluous/conusing method table hacks.
This is a net simplification, making it simpler to analyse what's
going on, and then interpose logic . ... by ensuring there's only one
natural place for it to live.
------------
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Sun, 4 Apr 2010 01:36:07 +0000 (18:36 -0700)]
buildfix
Without this, a system using gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
aborts builds after reporting:
tcl.c: In function ‘handle_irscan_command’:
tcl.c:1168: warning: passing argument 1 of ‘buf_set_u32’ discards qualifiers from pointer target type
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Mike Dunn [Sun, 28 Mar 2010 19:48:32 +0000 (15:48 -0400)]
xscale: fix trace buffer functionality when resuming from a breakpoint
Problem: halt at a breakpoint, enable trace buffer ('xscale trace_buffer enable
fill'), then resume. Wait for debug exception when trace buffer fills (if not
sooner due to another breakpoint, vector catch, etc). Instead, never halts.
When halted explicitly from OpenOCD and trace buffer dumped, it contains only
one entry; a branch to the address of the original breakpoint. If the above
steps are repeated, except that the breakpoint is removed before resuming, the
trace buffer fills and the debug exception is generated, as expected.
Cause: related to how a breakpoint is stepped over on resume. The breakpoint is
temporarily removed, and a hardware breakpoint is set on the next instruction
that will execute. xscale_debug_entry() is called when that breakpoint hits.
This function checks if the trace buffer is enabled, and if so reads the trace
buffer from the target and then disables the trace (unless multiple trace
buffers are specified by the user when trace is enabled). Thus you only trace
one instruction before it is disabled.
Solution: kind of a hack on top of a hack, but it's simple. Anything better
would involve some refactoring. This has been tested and trace now works as
intended, except that the very first instruction is not part of the trace when
resuming from a breakpoint.
TODO: still many issues with trace: doesn't work during single-stepping (trace
buffer is flushed each step), 'xscale analyze_trace' works only marginally for
a trace captured in 'fill' mode, and not at all for a trace captured in 'wrap'
mode.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
David Brownell [Sat, 27 Mar 2010 17:07:13 +0000 (10:07 -0700)]
jtag/tcl.c cleanup -- split out "adapter.c"
Clean up the jtag/tcl.c file, which was one of the biggest and
messiest ones in that directory. Do it by splitting out all the
generic adapter commands to a separate "adapter.c" file (leaving
the "tcl.c" file holding only JTAG utilities).
Also rename the little-used "jtag interface" to "adapter_name", which
should have been at least re-categorized earlier (it's not jtag-only).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Antonio Borneo [Fri, 26 Mar 2010 07:54:33 +0000 (15:54 +0800)]
NOR TCL: fix usage message
The command "flash bank" has updated syntax.
Add the mandatory parameter <target> to the usage message
that prints in case of error.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Fri, 26 Mar 2010 07:17:46 +0000 (15:17 +0800)]
TCL scripts: update to current "flash bank" syntax
While "flash bank" syntax has been changed long ago,
several tcl script are still not fully update.
Fix following cases related with "cfi" driver:
- syntax error: the mandatory <name> parameter is missing
- warning: the <target> parameter is a number, instead of
the target name
- the comment line above the command does not report
actual syntax
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Øyvind Harboe [Thu, 4 Mar 2010 18:58:42 +0000 (19:58 +0100)]
zy1000: dev tool
first cut peek/poke over tcp/ip, used for debug/research
purposes only. Long term JTAG over TCP/IP might be an
offshoot. The performance is usable for development/testing
purposes.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 25 Mar 2010 12:06:23 +0000 (13:06 +0100)]
target: fix poll off
I don't know when "poll off" broke, but "poll off" didn't
stop background polling of target. The polling status flag
simply wasn't checked in the handle_target timer callback.
All target polling(including power/reset state) is now stopped
upon "poll off".
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Daniel Bäder [Thu, 25 Mar 2010 10:24:42 +0000 (11:24 +0100)]
change %x and %d to PRIx32 and PRId32 where needed for cygwin
Øyvind Harboe [Thu, 4 Mar 2010 18:03:26 +0000 (19:03 +0100)]
zy1000: allow it to build on linux host for testing purposes
For testing and checking the build this can be useful,
it doesn't have any practical application outside development.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Antonio Borneo [Wed, 24 Mar 2010 05:45:29 +0000 (13:45 +0800)]
telnet_server: review unused symbols
Remove unused function
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Wed, 24 Mar 2010 05:44:40 +0000 (13:44 +0800)]
telnet_server: review scope of functions
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
David Brownell [Wed, 24 Mar 2010 23:04:26 +0000 (16:04 -0700)]
FT2232 Messaaging fix
The init cleanup patch overlooked a message which was
wrongly specific to the "usbjtag" layout. Fix.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Antonio Borneo [Wed, 24 Mar 2010 04:08:45 +0000 (12:08 +0800)]
server: review unused symbols
Remove unused function
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Antonio Borneo [Wed, 24 Mar 2010 04:06:45 +0000 (12:06 +0800)]
server: review scope of functions and data
Add "static" qualifier to private functions and data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Øyvind Harboe [Mon, 22 Mar 2010 07:27:03 +0000 (08:27 +0100)]
zy1000: fix optimisaion bug in dcc writes
Introduced & corrected since 0.4.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Mike Dunn [Sat, 20 Mar 2010 14:53:47 +0000 (10:53 -0400)]
fix software breakpoints on xscale
This patch fixes xscale software breakpoints by cleaning the dcache and
invalidating the icache after the bkpt instruction is inserted or removed. The
icache operation is necessary in order to flush the fetch buffers, even if the
icache is disabled (see section 4.2.7 of the xscale core developer's manual).
The dcache is presumed to be enabled; no harm done if not. The dcache is also
invalidated after cleaning in order to safeguard against a future load of
invalid data, in the event that cache_clean_address points to memory that is
valid and in use.
Also corrected a confusing typo I noticed in a comment.
TODO (or not TODO...?): the xscale's 2K "mini dcache" is not cleaned. This
cache is not used unless the 'X' bit in the page table entry is set. This is a
proprietary xscale extension to the ARM architecture. If a target's OS or
executive makes use of this for memory regions holding code, the breakpoint
problem will persist. Flushing the mini dcache requires that 2K of valid
cacheable memory (mapped with 'X' bit set) be designated by the user for this
purpose. The debug handler that gets downloaded to the target will also need to
be extended.
Øyvind Harboe [Mon, 22 Mar 2010 06:21:09 +0000 (07:21 +0100)]
bitq: fix warning now that out_value is const
This was an easy one. Just add the missing "const" to a
local variable definition.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
David Brownell [Mon, 22 Mar 2010 05:49:23 +0000 (22:49 -0700)]
ft2232 init mess cleanup
In the ft2232 driver, initialization for many layouts punts to a routine
called usbjtag_init(), instead of a routine specific to each layout.
That routine is a mess built around a "what type layout am I" core.
That's a bad design ... in this case, especially so, since it bypasses
the layout-specific dispatch which was just done, and obfuscates the
initialization which is at least somewhat generic, instead of being
specific to the "usbjtag" layout.
Split and document out the generic parts of usbjtag_init(), and make
the rest of those layouts have layout-specific init methods. Also,
rename usbjtag_reset() ... that also was not specific to the "usbjtag"
layout, and thus contributed to the previous code structure confusion.
(Eventually, all layout-specific code (and method tables) should probably
live in files specific to each layout. These changes will facilitate
those and other cleanups to this driver.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Øyvind Harboe [Sun, 21 Mar 2010 18:20:26 +0000 (19:20 +0100)]
arm breakpoints: amended fix comment
the handling of caches, should be moved into the breakpoint
specific callbacks rather than being plonked into generic
memory write fn's.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Fri, 19 Mar 2010 21:06:01 +0000 (22:06 +0100)]
jtag: make out_value const
Tightens up the jtag_add_xxx_scan() API
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Fri, 19 Mar 2010 21:04:45 +0000 (22:04 +0100)]
jtag: move towards making out_value const
These were relatively straightforward fixes which are
backwards compatible.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
David Brownell [Fri, 19 Mar 2010 17:31:44 +0000 (10:31 -0700)]
FT2232 comment tweaks
Note that the FT4232 chips have four channels not two, and
Elaborate on uses of the additional channels.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Øyvind Harboe [Fri, 19 Mar 2010 13:47:01 +0000 (14:47 +0100)]
zy1000: clean up jtag_add_xx_scan fn's
The implementation is now more straightforward as the
scan_fields have been greatly simplified over time.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Fri, 19 Mar 2010 13:27:19 +0000 (14:27 +0100)]
zy1000: fix bug in end state of DCC writes
Introduced in latest commits, found by code inspection &
GCC warning.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 18 Mar 2010 17:53:39 +0000 (18:53 +0100)]
jtag: retire jtag_get/set_end_state()
Voila! This get rids of mysteries about what what
state the TAP is in.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 18 Mar 2010 17:41:43 +0000 (18:41 +0100)]
jtag: remove jtag_get_end_state() usage
Code inspection indicated what constant end states to
use.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 18 Mar 2010 17:37:23 +0000 (18:37 +0100)]
jtag: get rid of unecessary jtag_get_end_state()
By code inspection.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 18 Mar 2010 17:34:34 +0000 (18:34 +0100)]
jtag: remove unecessary usage of jtag_get_end_state().
By code inspection.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 18 Mar 2010 17:31:58 +0000 (18:31 +0100)]
jtag: remove jtag_get_end_state()'s that should be unecessary
By a bit of code inspection it seems like all of these
instances of jtag_get_end_state() can be unambigously
replaced by constants.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Mike Dunn [Fri, 19 Mar 2010 04:34:13 +0000 (21:34 -0700)]
Fix underlying problem with xscale icache and dcache commands
Fix problem with the xscale icache and dcache commands. Both commands were
enabling or disabling the mmu, not the caches
I didn't look any further after my earlier patch fixed the trivial problem
with command argument parsing. Turns out the underlying code was broken.
The resolution is straightforward when you look at the arguments to
xscale_enable_mmu_caches() and xscale_disable_mmu_caches(). I finally
took a deeper look after dumping the cp15 control register (XSCALE_CTRL)
and seeing that the cache bits weren't changing, but the mmu bit was
(which caused all manner of grief, as you can imagine). This has been
tested and works OK now.
src/target/xscale.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 18 Mar 2010 19:32:35 +0000 (12:32 -0700)]
ADI_v5 - it's not always an "SWJ-DP"
So don't use the name "swjdp" for all DAPs; rename to
plain old "dap", which *is* always correct.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Thu, 18 Mar 2010 19:11:58 +0000 (12:11 -0700)]
Merge branch 'master' of ssh://dbrownell@openocd.git.sourceforge.net/gitroot/openocd/openocd
David Brownell [Thu, 18 Mar 2010 18:56:17 +0000 (11:56 -0700)]
remove more duplication
Not sure how the original "move code to adi_v5_swd.c" patch left
some code in the "arm_adi_v5.c" file, but a recent patch was only
a partial fix -- it didn't remove all the duplication.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Øyvind Harboe [Thu, 18 Mar 2010 11:07:41 +0000 (12:07 +0100)]
jtag: retire one instance of jtag_get_end_state() usage
Less global variables....
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Thu, 18 Mar 2010 11:06:07 +0000 (12:06 +0100)]
oops: committed and pushed two temp files....
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Spencer Oliver [Thu, 18 Mar 2010 09:18:53 +0000 (09:18 +0000)]
DOCS: update flash bank examples
- include the $_FLASHNAME in all flash bank examples.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Thu, 18 Mar 2010 09:35:45 +0000 (09:35 +0000)]
PIC32MX: add unlock cmd
'unlock' performs a full unlock/erase of the device, removing any
code protection.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Wed, 17 Mar 2010 17:24:22 +0000 (17:24 +0000)]
MIPS: remove unused arg from mips_ejtag_set_instr
This arg was never used and was just taken from the arm jtag code.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Øyvind Harboe [Tue, 16 Mar 2010 13:13:03 +0000 (14:13 +0100)]
jtag: cut down on usage of unintended modification of global end state
jtag_get/set_end_state() is now deprecated.
There were lots of places in the code where the end state was
unintentionally modified.
The big Q is whether there were any places where the intention
was to modify the end state. 0.5 is a long way off, so we'll
get a fair amount of testing.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 17 Mar 2010 20:50:23 +0000 (21:50 +0100)]
linker error: fix problem with duplicate fn
A fn was copied instead of moved to a new file. The linker
can discard exact copies of fn's without warning.
This is a C++'ism.
However on my Ubuntu 9.10 machine, it fails.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 17 Mar 2010 20:34:43 +0000 (21:34 +0100)]
mips: fix warning
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 17 Mar 2010 11:59:33 +0000 (12:59 +0100)]
gdb: long running "monitor mww" now works w/gdb
invoke keep_alive() to make sure that the default 2000ms
timeout does not trigger.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 16 Mar 2010 17:02:58 +0000 (18:02 +0100)]
target: faster mww operations
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Wed, 17 Mar 2010 11:43:47 +0000 (12:43 +0100)]
target: mdX/mwX on target were badly broken
- incorrect parsing of arguments
- mdX didn't display arguments correctly
I don't think anyone ever used that code path :-)
Did you know that "target mdw" and mdw are very different?
for {set i 0} {$i < 256} {set i [expr $i+1]} {mwb [expr 0x2000000+$i] $i}
mdw 0x2000000 0x10
0x02000000:
03020100 07060504 0b0a0908 0f0e0d0c 13121110 17161514 1b1a1918 1f1e1d1c
0x02000020:
23222120 27262524 2b2a2928 2f2e2d2c 33323130 37363534 3b3a3938 3f3e3d3c
> zy1000.cpu mdb 0x2000000 0x20
0x02000000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................
0x02000010 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................
> zy1000.cpu mdh 0x2000000 0x20
0x02000000 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e ................
0x02000010 1110 1312 1514 1716 1918 1b1a 1d1c 1f1e ................
0x02000020 2120 2322 2524 2726 2928 2b2a 2d2c 2f2e !"#$%&'()*+,-./
0x02000030 3130 3332 3534 3736 3938 3b3a 3d3c 3f3e
0123456789:;<=>?
> zy1000.cpu mdw 0x2000000 0x20
0x02000000
03020100 07060504 0b0a0908 0f0e0d0c ................
0x02000010
13121110 17161514 1b1a1918 1f1e1d1c ................
0x02000020
23222120 27262524 2b2a2928 2f2e2d2c !"#$%&'()*+,-./
0x02000030
33323130 37363534 3b3a3938 3f3e3d3c 0123456789:;<=>?
0x02000040
43424140 47464544 4b4a4948 4f4e4d4c @ABCDEFGHIJKLMNO
0x02000050
53525150 57565554 5b5a5958 5f5e5d5c PQRSTUVWXYZ[\]^_
0x02000060
63626160 67666564 6b6a6968 6f6e6d6c `abcdefghijklmno
0x02000070
73727170 77767574 7b7a7978 7f7e7d7c pqrstuvwxyz{|}~.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Spencer Oliver [Wed, 17 Mar 2010 09:57:44 +0000 (09:57 +0000)]
SCRIPT: add add_script_search_dir cmd
Add a add_script_search_dir cmd so that adding search
dir's can be added to cfg scripts.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Tue, 16 Mar 2010 12:54:08 +0000 (12:54 +0000)]
PIC32: add software reset support
The PIC32MX does not support the ejtag software reset - it is
optional in the ejtag spec.
We perform the equivalent using the microchip specific MTAP cmd's.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Tue, 16 Mar 2010 12:48:53 +0000 (12:48 +0000)]
MIPS: remove ejtag_srst variant
The mips_m4k_assert_reset has now been restructured
so the variant ejtag_srst is not required anymore.
The ejtag software reset will be used if the target does not
have srst connected.
Remove ejtag_srst from docs.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Øyvind Harboe [Tue, 16 Mar 2010 13:45:07 +0000 (14:45 +0100)]
gdb_server: improved gdb load performance
by ack'ing memory writes immediately and reporting either
at next memory write or stepi/continue time. GDB will then
send off a new packet that is ready by the time the previous
packet has been written to target memory.
On faster adapters this can be as much as 10% improvement.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 16 Mar 2010 10:40:52 +0000 (11:40 +0100)]
zy1000: tweak the DCC inner loop a tiny bit
Uses FIFO a bit more efficiently now.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Øyvind Harboe [Tue, 16 Mar 2010 09:58:21 +0000 (10:58 +0100)]
arm7/9: remove unused post_restore_context
Unused. If something should happen after context restore, then the
calling code can just do it afterwards.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
David Brownell [Tue, 16 Mar 2010 21:12:00 +0000 (14:12 -0700)]
ADIv5 transport support moves to separate files
Unclutter arm_adi_v5.c by moving most transport-specific code
to a transport-specific files adi_v5_{jtag,swd}.c ... it's not
a full cleanup, because of some issues which need to be addressed
as part of SWD support (along with implementing the DAP operations
on top of SWD transport):
- The mess where mem_ap_read_buf_u32() is currently coded to
know about JTAG scan chains, and thus needs rewriting before
it will work with SWD;
- Initialization is still JTAG-specific
Also move JTAG_{DP,ACK}_* constants from adi_v5.h to the JTAG
file; no other code should care about those values.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Øyvind Harboe [Mon, 1 Mar 2010 07:25:18 +0000 (08:25 +0100)]
bitbang: add jtag_add_tms_seq support
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Spencer Oliver [Tue, 16 Mar 2010 09:59:05 +0000 (09:59 +0000)]
PARPORT: add PARPORTADDR tcl variable
Add PARPORTADDR tcl variable making it easier to
change parallel port address in scripts.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Tue, 16 Mar 2010 09:55:20 +0000 (09:55 +0000)]
PIC32: add Microchip Explorer16 cfg
- add Microchip Explorer16 cfg using PIC32MX360F512L PIM.
- remove reset config from PIC32 target cfg.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
richard vegh [Tue, 16 Mar 2010 09:46:41 +0000 (10:46 +0100)]
lpc3180: LPC3180(LPC3250) SLC driver implemented
Until this time only basic SLC functionality exists when you want to use SLC to access external nand flash.
Basic functionality can be selected with command:
lpc3180 select 0 slc
It is anyway very slow to write/read to/from nand flash.
With the new command, SLC speed improved about 20 times, and hardware ECC info also read/written from/to nand flash OOB area:
lpc3180 select 0 slc bulk
Speed improvement achieved by using working are in SRAM of the LPC3250 chip and controlling DMA controller to interact between SRAM and SLC peripheral.
Here are the patches, and if they are ok than take them.
Tested with hitex LPC3250 usb stick.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Bradey Honsinger [Mon, 15 Mar 2010 07:43:41 +0000 (08:43 +0100)]
image loading: fix problem with offsets > 0x80000000
Fixes bug that prevented users from specifying a base address of
0x80000000 or higher in image commands (flash write_image, etm image,
xscale trace_image).
image.base_address is an offset from the start address contained in
the image file (if there is one), or from 0 (for binary files). As a
signed 32-bit int, it couldn't be greater than 0x7fffffff, which is a
problem when trying to write a binary file to flash above that
address. Changing it to a 64-bit long long keeps it as a signed
offset, but allows it to cover the entire 32-bit address space.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
David Brownell [Mon, 15 Mar 2010 15:43:16 +0000 (08:43 -0700)]
move "reset_config" out of JTAG command group
The SRST configuration options are not specific to JTAG, so this
command may be needed with non-JTAG debug sessions. Just move
the command to a different group.
(The TRST options are, however, clearly JTAG-specific, but for
compatibility, they're now left alone. The flags they control
could later be disabled in non-JTAG sessions.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Mon, 15 Mar 2010 15:42:26 +0000 (08:42 -0700)]
rename jtag_nsrst_assert_width as adapter_nsrst_assert_width
Globally rename "jtag_nsrst_assert_width" as "adapter_nsrst_assert_width",
and move it out of the "jtag" command group ... it needs to be used with
non-JTAG transports
Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break. That aid should Sunset in about a year.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Mon, 15 Mar 2010 15:41:30 +0000 (08:41 -0700)]
rename jtag_nsrst_delay as adapter_nsrst_delay
Globally rename "jtag_nsrst_delay" as "adapter_nsrst_delay", and move it
out of the "jtag" command group ... it needs to be used with non-JTAG
transports
Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break. That aid should Sunset in about a year.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Mon, 15 Mar 2010 15:37:43 +0000 (08:37 -0700)]
rename jtag_khz as adapter_khz
Globally rename "jtag_khz" as "adapter_khz", and move it out of the "jtag"
command group ... it needs to be used with non-JTAG transports
Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break. That aid should Sunset in about a year. (We may want to
update it to include a nag message too.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Spencer Oliver [Mon, 15 Mar 2010 10:06:47 +0000 (10:06 +0000)]
FT2232: bulidfix
Fix build issue with commit
c23d4596d2239bdbba080499de837f53e0c89e59
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Spencer Oliver [Mon, 15 Mar 2010 09:36:46 +0000 (09:36 +0000)]
PIC32MX: update cfg script
The default config script will now dynamically setup the BMX registers
in the reset init script.
This will also work if the user overrides the default working area.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
David Brownell [Sun, 14 Mar 2010 20:13:39 +0000 (13:13 -0700)]
rename jtag_interface_{init,quit}()
These routines apply to non-JTAG debug adapters too. To
reduce confusion, give them better (non-misleading) names.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
David Brownell [Sun, 14 Mar 2010 20:10:26 +0000 (13:10 -0700)]
FT2232: lookup and save layout just once
Streamline use of the layout: have the "ft2232_layout" command
look it up and save the result, instead of having a few different
chunks of code looking it up later, and saving just its name (which
is already part of the layout). This
- is cleaner
- reports errors sooner
- facilitates earlier adapter-specific setup
- removes unused "default to "usbjtag" logic
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Mike Dunn [Fri, 12 Mar 2010 00:53:05 +0000 (16:53 -0800)]
fix xscale icache and dcache commands
Simple patch that fixes the broken xscale icache and dcache commands.
This broke when the helper functions and macros were changed.
[ dbrownell@users.sourceforge.net: don't use strcasecmp ]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>