aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2009-12-04reorder build order of src directoryZachary T Welch1-1/+9
Descend into the library modules in order, from bottom-to-top.
2009-12-04remove flash.h from treeZachary T Welch18-63/+4
Remove the now vestigial <flash/flash.h> header from the tree, replacing a few references with <flash/nor/core.h>
2009-12-04split flash.h into into flash/nor/*.hZachary T Welch6-326/+358
Move the bulk of the flash.h file into flash/nor/core.h, leaving an empty husk that will be removed in the next patch. The NOR driver structure is an implementation detail, so move it into its own private header file <flash/nor/driver.h> along with helper declaration for finding them by name.
2009-12-04remove target.h from flash.hZachary T Welch21-20/+31
The flash.h header does not require the target.h header file, but its implementation source files do. Move it to flash/nor/imp.h.
2009-12-04split NOR and NAND flash headersZachary T Welch4-12/+15
Moves common flash errors to <flash/common.h> to decouple these two mostly unrelated trees of code.
2009-12-04eliminate src/flash/flash.cZachary T Welch3-221/+187
Move remaining NOR flash implemenation into flash/nor/core.c Removes flash.c from the build, leaving only its header to split.
2009-12-04add flash/nor/drivers.cZachary T Welch4-55/+79
Encapsulates access to the flash_drivers array, providing a base of operations for future dynamic driver module loading features.
2009-12-04move more nor flash implementation detailsZachary T Welch5-999/+1011
Splits the exec mode commands out of flash.c into the flash/nor/ files. The routines used by these high-level commands are moved into nor/core.c, with their internal declarations placed in nor/imp.h. Fixes distribution of <flash/nor/core.h> header.