| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
By code inspection.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| | |
ssh://dbrownell@openocd.git.sourceforge.net/gitroot/openocd/openocd
|
| |
| |
| |
| |
| |
| | |
Less global variables....
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|/
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
'unlock' performs a full unlock/erase of the device, removing any
code protection.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
| |
This arg was never used and was just taken from the arm jtag code.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
invoke keep_alive() to make sure that the default 2000ms
timeout does not trigger.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Uses FIFO a bit more efficiently now.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Fix build issue with commit c23d4596d2239bdbba080499de837f53e0c89e59
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove undesirable
- backslashes at end-of-line;
- initializations of BSS data to zero/NULL;
- overlong lines (80+ characters)
- whitespace issues
- brackets around single-line statements
And other minor issues reported by the Linux "checkpatch" utility
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
This patch greatly simplifies the Versaloon driver:
- reducing the code size from more than 50K to less than 28K
- adding support for IR/DR scan with unlimited size
- using tap_get_tms_path and tap_get_tms_path_len.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
This includes a driver and matching config file. This support needs to be
enabled through the initial "configure" (use "--enable-buspirate").
Signed-off-by: Michal Demin <michaldemin@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We'll need to be able to work with debug adapter interfaces (drivers)
even when they're not used for JTAG ... for example, while there are
multi-transport drivers which support JTAG *and* several other
transports (or just one more, like SWD) there are also adapters
with more limited goals (and no JTAG support at all).
Start decoupling the two concepts ("debug adapter driver", "jtag")
by having two command groups, which initialize separately.
This will help us support OpenOCD sessions using only non-JTAG
transports, in which JTAG commands should not be registered.
Update docs to mention that the JTAG, SVF, and XSVF commands
won't work without a JTAG transport.
Note that at least commands working with SRST are still inappropriately
coupled to JTAG ... inappropriate because (a) SRST is not part of the
JTAG standard, for all that many platforms (like ARM) expect it; and also
(b) because they're used with non-JTAG debug and programming interfaces,
too. They should perhaps become generic "interface" operations at some
point. (Similarly with the clock rate to be used by a given adapter.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
- remove trailing LF's from user info messages.
- split long lines.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add flash algorithm support for the PIC32MX.
Still a few things todo but this dramatically decreases
the programing time, eg. approx programming for 2.5k test file.
- without fastload: 60secs
- with fastload: 45secs
- with fastload and algorithm: 2secs.
Add new devices to supported list.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
| |
- make algorithm array static const.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
- make algorithm array static const.
- increase algorithm buffer size to 32k.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
- make algorithm array static const.
- increase algorithm buffer size to 32k.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
| |
- make algorithm array static const.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
Cannot protect or unprotect single sector in cfi flash.
When first==last the procedure fails.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
The table of command registration functions shouldn't be
in writable memory, where stray pointers can clobber it.
Also, it shouldn't be initialized at runtime; that just
consumes needless code space.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the end I have added comments /* FIXME: to be removed */
There are 3 lines in which my simplification is not complete due to
data dependency with LOG_DEBUG() messages visible in the patch.
Such log_debug has been introduced on Jan 22, 2007 with commit
4fc97d3f2726efa147cfdb0c456eace51550e1e3 during development activity
in this file/procedure.
From my point of view, these logs can be removed, since not part of a
consistent flow of information.
Alternatively, could be borrowed in the new cfi_send_command(), but
this will increase verbosity.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
| |
How many bits to shift out before/after enabled tap not
in bypass is calculated outside the loop. This is more of
a demonstration of principle and to clarify code than
a performance optimisation as such. Follows up a bit
on the simplification work in jtag interface.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
These fn's now clearly just clock out/in bits. No mystical
fields are involved.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|