aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-12-09ARM: update arm_opcodes.h copyrightDavid Brownell1-0/+3
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-09stellaris: flash protection updates, minor fixesDavid Brownell2-68/+119
Bugfix the read side of flash protection: - read the right register(s)! - handle more than 64K - record the results in the right places - don't display garbage. Partially bugfix the write side: - use 2KB lock regions instead of 1KB pages (!) - validate input range - don't try to _remove_ protection (it's write-once) - #define values we'll need to commit writes. - ... still doesn't handle pages over 64KB mark, or commit writes And minor cleanup and fixes: - get rid of some forward decls - properly locate a doxygen comment - fix some bad indentation - remove superfluous #include - add a new part ID (many are still missing) - make the downloaded algorithm code be read-only Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-09Comment and doxygen fixesDavid Brownell5-30/+25
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-09ETM: only include oocd_trace.h when tracing enabled.Spencer Oliver1-0/+3
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-08Fix compilation error with gcc 4.4.1Rafael Campos Las Heras1-0/+1
Signed-off-by: Rafael Campos Las Heras <methril@gmail.com>
2009-12-08target: remove more exit() callsDavid Brownell2-9/+2
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 Brownell4-24/+8
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 Brownell5-15/+15
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 Brownell1-4/+6
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-08zy1000: some background info on the zy1000 file.Øyvind Harboe1-0/+25
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08minidriver: fix inline capability of minidriverØyvind Harboe11-48/+94
Low latency low CPU processing power systems(embedded) will benefit greatly from being able to inline certain jtag_add_xxx() fn's. The trick is that this has to be done in such a way as to allow implementing an OpenOCD API with a shared library(eventually) on a PC hosted OpenOCD. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08zy1000: remove unecessary includeØyvind Harboe1-4/+0
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08build: add build/src to include pathØyvind Harboe12-10/+25
This allows including generated include files. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-07ARM: cope with stupidheaded compilerDavid Brownell1-2/+1
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 Brownell4-7/+49
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 Brownell5-8/+19
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 Brownell4-33/+8
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>
2009-12-07User's Guide: add quickie setup notesDavid Brownell1-2/+41
Add a brief "setup with no customization" note showing the how easily things can work if standard OpenOCD config scripts already exist. We've had some new users comment that this information is needlessly hard to find, so that starting to use OpenOCD is more difficult than it should be. Plus describe a few other issues that come up when setting up an OpenOCD server. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: use <target/arm.h> not armv4_5.hDavid Brownell24-200/+231
Move most declarations in <target/armv4_5.h> to <target/arm.h> and update users. What's left in the older file is stuff that I think should be removed ... the old register cache access stuff, which makes it awkward to support microcontroller profile (Cortex-M) cores. The armv4_5_run_algorithm() declaration was moved too, even though it's not yet as generic as it probably ought to be. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: rename some generic routinesDavid Brownell15-32/+34
Rename some (mostly) generic ARM functions: armv4_5_arch_state() --> arm_arch_state() armv4_5_get_gdb_reg_list() --> arm_get_gdb_reg_list() armv4_5_init_arch_info() --> arm_init_arch_info() Cores using the microcontroller profile may want a different arch_state() routine though. (Also fix strange indentation in arm_arch_state: use tabs only! And update a call to it, removing assignment-in-conditional.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: move opcode macros to <target/arm_opcodes.h>David Brownell18-249/+281
Move the ARM opcode macros from <target/armv4_5.h>, and a few Thumb2 ones from <target/armv7m.h>, to more appropriate homes in a new <target/arm_opcodes.h> file. Removed duplicate opcodes from that v7m/Thumb2 set. Protected a few macro argument references by adding missing parentheses. Tightening up some of the line lengths turned up a curious artifact: the macros for the Thumb opcodes are all 32 bits wide, not 16 bits. There's currently no explanation for why it's done that way... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: remove mrc_opcode(), use MRC() or MCR()David Brownell3-20/+32
Get rid of mrc_opcode() in favor of ARMV4_5_MRC() or, where arm*20t should have used it, ARMV4_5_MCR() instead. Basically, *writing* coprocessor registers shouldn't have used the *read* opcode ... and both should stick to standard opcode constructors, not rearranging parameter sequence any more than already needed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: disassemble two more v6+ instructionsDavid Brownell1-12/+71
The SRS and RFE instructions speed exception entry/exit by making it easy to save and restore PC and SPSR. This handles both ARM and Thumb2 encodings. Fix minor PLD goofage; that "should never reach this point" can't happen, so remove it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM DPM: don't write low bits of watchpoint valueDavid Brownell1-1/+1
The low two bits are defined as should-be-zero-or-presereved. We'll take the zero option, it's easier to enforce. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07OMAP2420: define reset-assert eventDavid Brownell1-0/+7
Behave like OMAP3530: force global software reset. Given the patch to teach ARM11 how to use these events, and use VCR to catch the reset vector, this works better than either the current reset logic or than using SRST. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07User's Guide: mention ETM on ARM11 comes up tooDavid Brownell1-1/+1
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-06add 'flash list', rewrite 'flash banks'Zachary T Welch3-22/+36
Rename the existing 'flash banks' implementation as 'flash list', and replace the broken 'flash_banks' TCL wrapper with a new command handler. Adds documentation for the new 'flash list' command in the user guide.
2009-12-06allow 'flash_banks' command to give GDB outputZachary T Welch1-1/+1
The 'flash banks' command produces a list that needs to be formatted properly for GDB's 'mem info' to work properly. The flash_banks TCL wrapper provided this formatting, but wrappers no longer work for second-level commands as they did in the past. With this patch, the 'flash_banks' command can be used with the new command syntax and display the required information.
2009-12-06fix NOR flash regressionZachary T Welch1-0/+2
When factoring the bank setup command into flash_bank_add(), I forgot to include a call to the new helper.
2009-12-05misc code review updatesDavid Brownell4-14/+11
More updates from the code review by Steve Grubb <sgrubb@redhat.com>. The Jim float-comparision bug just gets a comment not a fix, though. Cc: Steve Grubb <sgrubb@redhat.com>. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-05NOR: add 29LV400BC flash deviceMathias Kuester1-0/+17
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM semihosting: use breakpoint on ARM7Nicolas Pitre1-7/+9
Fall back to software breakpoint when vector catch isn't available. Possible enhancements: - add extra optional command parameter to select high vectors - add extra optional command parameter to select hardware breakpoint Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM semihosting: work with both low and high vectorsNicolas Pitre1-6/+4
Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04rename nand.h to flash//nand/core.hZachary T Welch20-28/+33
Rename nand.h as flash/nand/core.h, chase consumers. The public APIs need to be sorted out with imp.h, but this allows other changes to begin improving the separation between policy and mechanism. Moves #include <target/target.h> and #include "driver.h" into the internal headers or source files, removing it from <flash/nand/core.h>.
2009-12-04move remaining nand helper filesZachary T Welch8-11/+9
Move remaining NAND implementation files into src/flash/nand/.
2009-12-04split nand.c into nand/{core,fileio,tcl}.cZachary T Welch7-872/+1005
Moves commands into nand/tcl.c and core implementation to 'nand/core.c' and 'nand/fileio.c'. Eliminates 'flash/nand.c'. Adds 'nand/imp.h' to share routines between TCL commands and core.
2009-12-04split NAND driver handling into nand/driver.[ch]Zachary T Welch5-104/+205
This work parallels the NOR directory, encapsulating the NAND drivers into a separate file. This takes an extra step by encapsulating the type of data structure used to manage the drivers, allowing it to be changed from an array to a dynamic list in the future.
2009-12-04ARM: doc updates for main headerDavid Brownell1-3/+11
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename armv4_5_build_reg_cache() as arm_*()David Brownell6-11/+10
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename armv4_5_algorithm as arm_algorithmDavid Brownell11-27/+27
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: misc generic cleanupDavid Brownell4-13/+28
Remove an undesirable use of the CPSR symbol ... it needs to vanish. Flag mode-to-number stuff as obsolete; say why ... should also vanish. Get rid of no-longer-used mode and state typedefs. Comment a few of the implicit ties to "classic ARM". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: ARMV4_5_COMMON_MAGIC --> ARM_COMMON_MAGICDavid Brownell12-19/+19
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: switch target_to_armv4_5() to target_to_arm()David Brownell8-20/+18
And remove that old symbol. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename armv4_5_state_* as arm_state_*David Brownell12-23/+23
And make arm_state_strings[] be const. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename armv4_5_mode_* AS arm_mode_*David Brownell8-39/+39
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename ARMV4_5_MODE_* as ARM_MODE_*David Brownell16-141/+141
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename ARMV4_5_STATE_* as ARM_STATE_*David Brownell18-77/+77
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM11: report watchpoint trigger insnDavid Brownell1-0/+18
As with Cortex-A8, the WFAR register holds useful information that should be recorded and, where relevant, displayed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM11: basic watchpoint supportDavid Brownell5-9/+102
Use the DPM watchpoint support; remove old incomplete stubs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM11: tweak TAP ops and debuggingDavid Brownell2-23/+61
Tweak scanchain 7 debug messaging: - show register addresses in decimal, matching ARM docs; - remove some pointless noise Avoid some needless roundtrips: - skip SCAN_N when SCREG already holds that number (speeds up polling and other common operations) - avoid zeroing vcr twice on resume Show the IR opcode as a label ("RESTART") too; and in decimal, matching ARM docs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>