aboutsummaryrefslogtreecommitdiff
path: root/src/target
AgeCommit message (Collapse)Author
2010-01-05ARM: add comments re DAP assumptionsDavid Brownell
I think some of these assumptions are not well-founded. Related, that swjdp_transaction_endcheck() is a bit iffy. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-05MIPS: pracc access tweaksSpencer Oliver
reorder the pracc access so we can save a few access cycles Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-05MIPS: optimize pracc accessSpencer Oliver
remove unnecessary nops when accessing ejtag pracc general fastdata patch cleanup Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-05MIPS: merge mips fast_data patch from David N. ClaffeyDavid Claffey
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-04ARMv7-M: use AP_REG_* symbolDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02ARM: ADIv5 JTAG symbol cleanupDavid Brownell
Rename DAP_IR_* as JTAG_DP_* since those symbols are specifically for JTAG-DP (or SWJ-DP in JTAG mode), and won't work with SWD. Define the JTAG ABORT and IDCODE instructions for completeness; add a comment about where to (someday) use ABORT. Fix messaging which assumes everything is an SWJ-DP; say "JTAG-DP" instead, it's at least more appropriate for all JTAG transports. Shrink the affected lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02ARM: dap info fix + tweaksDavid Brownell
Fix: don't print the BASE address except if it's a MEM-AP; that's an unlikely error, but there's no point getting it wrong. Tweaks: comments, capitalization. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02ARM: ADIv5 export cleanupDavid Brownell
Make some private functions "static". Remove their public declarations, and what is now an obviously unused function. Shrinks this object's size (about 5% on x86_64) while making the code's scope easier to understand. Shrink the affected lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02ARM: ADIv5 symbol and comment cleanupDavid Brownell
Instead of magic numbers, use their AP_REG_* constants. Rename the ROM address symbol as BASE to match ARM's documentation. Comment various other symbols in the header; add some missing ones. Remove an unused struct. Add some doxygen for stuff including the DAP structure and initialization. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02Cortex-M3: minor breakpoint cleanupDavid Brownell
Shrink some lines, add some comments, simplify some tests. During debug startup, log the core revision level too. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02streamline and document helptext mode displaysDavid Brownell
Most commands are usable only at runtime; so don't bother saying that, it's noise. Moreover, tokens like EXEC are cryptic. Be more clear: highlight only the commands which may (also) be used during the config stage, thus matching the docs more closely. There are - Configuration commands (per documentation) - And also some commands that valid at *any* time. Update the docs to note that "help" now shows this mode info. This also highlighted a few mistakes in command configuration, mostly commands listed as "valid at any time" which shouldn't have been. This just fixes ones I noted when sanity testing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-30ARM7_9: Fix segfaultsAntonio Borneo
Handlers for commands - arm7_9 semihosting <enable | disable> - $_TARGETNAME arp_reset assert 1 didn't check if target has already been examined, and could segfault when using the NULL pointer "arm7_9->eice_cache". Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-30ARM9TDMI: Fix segfault.Antonio Borneo
The handler for "arm9tdmi vector_catch ..." did not check if target has already been examined. Without this fix it segfaults when using NULL pointer "arm7_9->eice_cache". Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-28MinGW build fixesFreddie Chopin
Print "ssize_t" as "%ld" (+ cast to long) not as "%zu". Official MinGW (gcc 3.4.5) doesn't understand "z" flag. Signed-off-by: Freddie Chopin <freddie_chopin@op.pl> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-26ARM: add comment re register exportsDavid Brownell
Modern versions of GDB can understand VFP3 and iwMMXt hardware.
2009-12-21Packaging fixDavid Brownell
Don't forget to list target/arm_opcodes.h Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-20Cortex-M3: cleanupDavid Brownell
Misc: - Introduce some "struct reg" temporaries, for clarity - Shorten lines - Add some missing whitespace - Clean up comments - Add notes about some fault handling issues - Most of these errata workarounds are for *OLD* chip revisions Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-20ARM11: recognize ARM11 MPCoreDavid Brownell
And add my copyright. MPCore is untested, but it's the only other ARM11 core to care about. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-20arm7_9: Support VINITHI signalAntonio Borneo
Command "reset halt" checks if PC properly resets, issueing warning: "PC was not 0. Does this target need srst_pulls_trst?". Checking PC against 0 is not always correct. Removed PC value check, as suggested by Øyvind Harboe. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: U-PROPRIET-28D9DF\PROPRIETAIRE <PROPRIETAIRE@propriet-28d9df.(none)>
2009-12-19oocd_trace buildfixesDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19ETM: add "etm trigger_debug" commandDavid Brownell
In conjunction with manual register setup, this lets the ETM trigger cause entry to debug state. It should make it easier to test and bugfix the ETM code, by enabling non-trace usage and isolating bugs specific to thef ETM support. (One current issue being that trace data collection using the ETB doesn't yet behave.) For example, many ARM9 cores with an ETM should be able to implement four more (simple) breakpoints and two more (simple) watchpoints than the EmbeddedICE supports. Or, they should be able to support complex breakpoints, incorporating ETM sequencer, counters, and/or subroutine entry/exit criteria int criteria used to trigger debug entry. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19ETM: more ETM_CTRL bit cleanupDavid Brownell
Change handling of the CYCLE_ACCURATE, BRANCH_OUTPUT, and TRACE_* flags; also the CONTEXTID size values. - Convert to symbols matching the actual register bits, instead of some random *other* bits (and then correcting that abuse). - Get rid of a now-needless enum. - Keep those values in etm->control, and remove etm->tracemode. These values all affect the trace data that's recorded by a trace pod or in the ETB. I modified the file format used to dump ETB data; since it's fairly clear nobody can use this mechanism now, this can't cause anyone trouble. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19ETM: start cleaning up ETM_CTRL bit handlingDavid Brownell
Provide better comments for the ETM_CTRL bits; use the correct bit for half/full clock mode; and define a few more of the bits available from the earliest ETM versions. The new bit defintions use ETM_CTRL_* names to match their register (instead of ETM_PORT_* or ETMV1_*). For clarity, and better matching to docs, they are defined with bitshifting not pre-computed masks. Stop abusing typdefs for ETM_CTRL values; such values are not limited to the enumerated set of individual bit values. Rename etm->portmode to etm->control ... and start morphing it into a single generic shadow of ETM_CTRL. Eventually etm->tracemode should vanish, so we can just write etm->control to ETM_CTRL. Restore an "if" that somehow got dropped. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-19ETM trigger_percent becomes an ETB commandDavid Brownell
This command was misplaced; it's not generic to all traceport drivers, only the ETB supports this kind of configuration. So move it, and update the relevant documentation. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-18XScale: better {read,write}_phys()David Brownell
We can actually do the right thing if the MMU is off; save the error message for the phys-but-MMU-enabled path, which is what isn't yet supported. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-18dsp563xx: cygwin build fixesDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-15XScale: use all-ones for BYPASS, not five-onesDavid Brownell
PXA3xx has more than five bits in IR. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-15target: add basic dsp563xx supportmkdorg@users.sourceforge.net
2009-12-14ARM11: improved reset supportDavid Brownell
Teach ARM11 how to use: - the new "reset-assert" event - vector catch to implement "reset halt" - use SRST more like other cores do - ... including leaving post-SRST delays up to config scripts This gives OMAP2420 the ability to reset, and doesn't seem to cause new iMX31 problems. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-14ARM: disassemble STM correctlyDavid Brownell
There is no "STMMIDA" instruction. There is however "STMDAMI". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-13target files shouldn't #include <target/...h>David Brownell
Make these ".h" files adopt the same policy the ".c" files already follow: don't use <subsystem/...h> syntax for private interfaces. If we ever get reviewed/supported "public" interfaces they should come exclusively from some include/... directory; that'll be the time to switch to <...> syntax for any subsystem's own interfaces. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-13target: further shrink Jim-awarenessDavid Brownell
Don't include <helper/jim.h> from target.h ... not everything which touches targets needs to be able to talk to Jim. Plus, most files include this header by another path. Also, switch the affected files to use the classic sequence for #included files: all <framework/headers.h> first, then the "local_headers.h". This helps prevent growth of problematic layering, by minimizing entanglement. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-11ARM11: avoid pointless status returnsDavid Brownell
For some routines that only returned ERROR_OK and where the caller never checked ... don't bother. Remove some noise, and bugfix some comments. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-11ARM DPM: support updating HW breakpointsDavid Brownell
Abstract the DPM breakpoint and watchpoint data structures to have a shared core for housekeeping. Abstract the code updating the watchpoint registers so that it can be used to update breakpoint registers. Then do so, when something has set up the breakpoint state used by this code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-11ARM: disassembly fixes for LDC/STC/MRRC/MCRRDavid Brownell
Properly detect all of these, including the "2" variants; and bugfix parameter display for LDC and STC. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-11ARM11: minor cleanup, mostly ITR commentsDavid Brownell
ITR register handling seemed to be giving me problems, so I updated the comments to better say what the code is trying to do ... and to note the preconditions (one of which seems to be an issue) as listed in the ARM1136 TRM. Also removed the unused "ARM11_TAP_DEFAULT" from the ITR scan code; all the callers already specify an exit path, since this register isn't usable with such vague semantics. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-11optimisation: tiny optimisation for embedded iceØyvind Harboe
use two shift operations instead of three to set embedded ice register. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-11embedded hosts: optimize common code path for core arm operationsØyvind Harboe
avoid fn call for the if check on whether anything needs to be done. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-09ARM: update arm_opcodes.h copyrightDavid Brownell
I neglected to copy Magnus' copyright when I moved several declarations from the ARMv7-M header. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-09Comment and doxygen fixesDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-09ETM: only include oocd_trace.h when tracing enabled.Spencer Oliver
Fixes build issue on systems that do not have <termios.h>, eg native win32. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2009-12-08target: remove more exit() callsDavid Brownell
These were all basically "can't happen" cases ... like having state be corrupted by an alpha particle after the previous check for whether a value was in-range. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-08target: remove needless "extern"sDavid Brownell
Most of these happened to be in the target.h file. Some of those are associated with symbols that could be removed at some point ... e.g. NVP_ASSERT/true and its sibling NVP_DEASSERT/false. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-08target: move 'extern' decls to *.h filesDavid Brownell
The exception being declarations for drivers. Those should be split out in some clean way -- like driver add/remove calls made by initialization code -- but that's for another day. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-08ARM: cygwin complile fixesDavid Brownell
It's as if despite integers being 32-bits, GCC refuses to convert a "uint32_t" to one of them. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-08build: add build/src to include pathØyvind Harboe
This allows including generated include files. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-07ARM: cope with stupidheaded compilerDavid Brownell
Some versions of GCC don't understand that if you mask with 0x3 then have cases 0-3, it's not possible for a variable assigned in all those branches to have no value at end-of-case. Feh. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: list number of HW breakpoints/watchpointsDavid Brownell
When starting up, say how many hardware breakpoints and watchpoints are available on various targets. This makes it easier to tell GDB how many of those resources exist. Its remote protocol currently has no way to ask OpenOCD for that information, so it must configured by hand (or not at all). Update the docs to mention this; remove obsolete "don't do this" info. Presentation of GDB setup information is still a mess, but at least it calls out the three components that need setup. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07target: add debug_reason_name()David Brownell
Provide and use debug_reason_name() instead of expecting targets to call Jim_Nvp_value2name_simple(). Less dependency on Jim, and the code becomes more clear too. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: don't clone arm_arch_state() codeDavid Brownell
Have various ARM cores delegate to arm_arch_state() to display basic information, instead of duplicating that logic. This shrinks the code, makes them all report when semihosting is active, and highlights which data are specific to this core. (Like ARM720 not having separate instruction and data caches.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>