aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-29create target/pxa3xx.cfgMarek Vasut
[dbrownell@users.sourceforge.net; remove pxa255 comment] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-29XScale: initial PXA3xx supportMarek Vasut
[dbrownell@users.sourceforge.net: user's guide; variant param is optional] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-29ARM11: fix warning on cygwinDavid Brownell
Previous version of JTAG_DEBUG() macro hid this bug. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-28bugfix: 'init' changes state, not main()David Brownell
Code other than main() may invoke "init". When it does so, customized handlers may need to run ... so make sure the command context state is updated before they do so. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-28fix s3c24xx device command helperlementec fabien
Returns the common structure for the s3c24xx device, which was somehow nuked during past cleaning efforts.
2009-11-28Cortex-M3: don't chain "struct arm" commandsDavid Brownell
Those commands presume support for the "classic" set of CPU modes (FIQ, supervisor, IRQ, etc) ... which aren't supported by the ARMv7-M or ARMv6-M architectures. They also presume a "struct arm" base type, which this code doesn't use. We haven't cleaned up the register handling enough to be able to share any of those "base" methods. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-28add 'nonce' nand driverZachary T Welch
The nonce NAND driver provides a no-op implementation useful for testing the system independently of any driver side-effects.
2009-11-28add more stub handlers to testee targetZachary T Welch
Prevent everything from crashing when exercising various commands.
2009-11-28explode tcl_target_func into many handlersZachary T Welch
Eliminate the monolithic tcl_target_func by registering each of its commands using the new chained command registration mechanism. Also chains the target's commands under the CPU command, though these may not work properly without some further modification.
2009-11-28split jim_target into multiple handlersZachary T Welch
The 'target' command group was implemented using its own command dispatching, which can be eliminated by using the new chained command registration mechanism. This patch splits the jim_target() function into individual handlers, which makes them to be visible to the help and usage commands. These one-trick handlers are much easier to understand.
2009-11-28split jim_newtap_cmd into piecesZachary T Welch
Moves the ID and IR-related option parsing to static helpers, removing two levels of indent.
2009-11-28improve jtag_tap_configureZachary T Welch
Splits bulk of the jtag_tap_configure into jtag_tap_configure_event, removing three or four levels of indentation in the process. The resulting code was stylistically improved in other ways, but it should be functionally identical.
2009-11-28improve jtag_tap_handle_event indentationZachary T Welch
Use 'continue' to reduce identation levels and superfluous logic.
2009-11-28begin moving JTAG jim handlers/helpersZachary T Welch
Moves the tertiary jim handlers and required static helpers to the top of tcl.c, defining them in a new registration array that is chained in both the top-level context and under the jtag command. The top-level commands can be removed at some point in the future to reduce clutter.
2009-11-28split jim_jtag_command into multiple handlersZachary T Welch
Explodes the 'jtag' into separate command handlers, which are easier to understand and extend. Makes the code much easier to understand, though further simplifications are possible. This patch tries to minimize the noise when viewed with 'git diff -w'. Gives these commands improved built-in help and usage information.
2009-11-28remove redundant 'rm' command handlerZachary T Welch
Two 'rm' commands were implemented and registered. This removes the version that would have never been called prior to refactoring the command registration.
2009-11-28add error checking in command_newZachary T Welch
Adds checks for memory allocation failures. Started to use calloc() instead of malloc()/memset(), but I got carried away. This kind of work should be done throughout the tree, but it's almost hopeless at present.
2009-11-28include mode information in help text.Zachary T Welch
Extends the help output to list the valid modes for each commands. Fixes a memory leak of the returned command_name() string.
2009-11-28refactor command mode detectionZachary T Welch
Splits the check for a command's ability to run into a helper. This also fixes a bug whereby commands that specified COMMAND_EXEC were allowed to run during the configuration stage. This allowed problematic commands to be called before 'init', defeating the intention of specifying that command mode. With this change, the run_command() helper denies access to handlers that should run only after 'init' during the configuration stage.
2009-11-28add command private data setter/accessorZachary T Welch
Presently, commands registration taks a static handler data pointer. This patch adds support for commands that require a dynamic pointer, such as those registered in a dynamic context (e.g. subcommands for a user-created 'foo.cpu' command). The command_set_handler_data will update a command (group) to use a new context pointer, while the CMD_DATA macro allows command handlers to access the value. Jim handlers should find this value in interp->cmdPrivData.
2009-11-28add 'command mode' introspective handlerZachary T Welch
Allows scripts to behave different depending on the current mode. Also allows introspection of the mode required for commands.
2009-11-28remove unknown handlerZachary T Welch
Updates command registration to provide top-level handlers for all commands, rather than falling back onto the 'unknown' command. Instead, that same handler is registered for placeholders, providing the same functionality under the root verb command name instead. This permits users to implement their own 'unknown' function, and it resolves some mind-bending breakage related to function object lookup while recursing. Changes 'ocd_bounce' to call 'ocd_command' and 'ocd_help' from the wrapper directly, rather than bouncing through their wrappers. This prevents endless recursion caused by the above changes, whereby the 'command' wrapper's type check would blow the stack to hell and gone.
2009-11-28improve command handler wrapper scriptZachary T Welch
Adds 'ocd_bouncer' in startup.tcl that is called as a helper for all command handlers, shrinking the embedded C wrapper to a mere stub. Jim handlers are called directly, simple handlers get called with the wrapper to capture and discard their output on error, and placeholders call help directly (though the unknown handler still does this too). It attempts to improve the quality of the error messages as well.
2009-11-28add 'command type' introspective handlerZachary T Welch
Adds the 'command' group handler, with the 'type' command producing a string that tells whether the given command is 'native' (for Jim-based command handlers), 'simple' (for simple built-in commands), 'group' for command group placeholders, and 'unknown' if not found in the command registration tables (e.g. core built-ins functions).
2009-11-28ARM11: fix warning on amd64David Brownell
Previous version of JTAG_DEBUG() macro hid this bug. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-28ARM11: fix dbgtap JTAG_DEBUGDavid Brownell
There is no DEBUG() macro; don't call one! Always at least *parse* debug code, to help prevent such errors. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-28target: uplevel add_{break,watch}point() error checksDavid Brownell
In target_type.h it's documented that the target must be halted for add_breakpoint() ... and with slight ambiguity, also for its add_watchpoint() sibling. So rather than verifying that constraint in the CPU drivers, do it in the target_add_{break,watch}point() routines. Add minor paranoia on the remove_*point() paths too: save the return value, and print it out in in the LOG_DEBUG message in case it's nonzero. Note that with some current cores, like all ARMv7 ones I've looked at, there's no technical issue preventing watchpoint or breakpoint add/remove operations on active cores. This model seems deeply wired into OpenOCD though. ALSO: the ARM targets were fairly "good" about enforcing that constraint themselves. The MIPS ones were relied on other code to catch such stuff, but it's not clear such code existed ... keep an eye out for new issues on MIPS. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-28target: remove unused TARGET_EVENT_OLD_* symbolsDavid Brownell
Just two *_OLD_* symbols left... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27NEWS: mention new reset-assert eventDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27omap3530.cfg: use new "reset-assert" eventDavid Brownell
Replaces previous "reset-assert-pre" workaround. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27Cortex-A8: support "reset-assert" eventDavid Brownell
Use the new "reset-assert" event; else SRST; else fail. Tested on an OMAP3, using the event. NOTE: still doesn't handle "reset halt". For some reason neither VCR nor PRCR seemed effective; they held the value that was written, but VCR didn't trigger debug entry when the reset vector fired (maybe the vector needs configuring?) and PRCR refused to hold the chip in reset until deassert() could force the core into debug state. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27target: groundwork for "reset-assert" eventDavid Brownell
This defines a "reset-assert" event and a supporting utility routine, and documents both how targets should implement it and how config scripts should use it. Core-specific updates are needed to make this work. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27ARM11: write_memory() avoids increment checkDavid Brownell
When writing to a chip's "reset yourself" register, the ARM11 code was reporting a spurious failure. Just don't bother checking for correctly incremented pointers given single-unit writes ... it's a bit faster that way too. (Reads should likely do the same thing. For that matter, such checks are usually just a waste...) Shrink an overlong parameter name, and associated lines'o'code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-27fix regression causing duplicated outputZachary T Welch
The command refactoring caused subcommand handlers to produce duplicate output when run. The problem was introduced by failing to ensure all such invocations went through a top-level "catcher" script, prefixing the command name with the 'ocd_' prefix and consuming its results. The fix is to ensure such a top-level "catcher" script gets created for each top-level command, regardless of whether it has a handler. Indeed, this patch removes all command registrations for sub-commands, which would not have worked in the new registration scheme anyway. For now, dispatch of subcommands continues to be handled by the new 'unknown' command handler, which gets fixed here to strip the 'ocd_' prefix if searching for the top-level command name fails initially. Some Jim commands may be registered with this prefix, and that situation seems to require the current fallback approach. Otherwise, that prefix could be stripped unconditionally and the logic made a little simpler. The same problem must be handled by the 'help' command handler too, so its lookup process works as intended. Overall, the command dispatching remains more complicated than desired, but this patch fixes the immediate regressions.
2009-11-27zy1000: keep up with new command registration stuffØyvind Harboe
jim and classic style commands are both supported. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-27update minidummy interface driver command handlingZachary T Welch
Changes the interface definition field reference from register_commands to commands, which allows the module to compile.
2009-11-27fix 'nand info' commandZachary T Welch
Move device argument parsing after check for number of arguments; otherwise, calling this command without any arguments would access argv[0] before checking whether it even existed.
2009-11-27zy1000: keep up with changes to log_init()Øyvind Harboe
fn's and return value for log_init() changed to void. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-27minidummy: fix compilation errorØyvind Harboe
during refactoring a search and replace error crept in Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-26ARM NAND I/O header documentation update.Dean Glazeski
Fixed the header file to properly specify the doxygen documentation for the items defined in it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-26ARM NAND I/O documentation update.Dean Glazeski
This updates the functions in the file to all have doxygen comments describing what they do. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-26ARM NAND I/O refactor code copying.Dean Glazeski
Created a function for copying code to the working area on a target. The NAND write and read functions are updated to include use of this function. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-26ARM NAND I/O read function.Dean Glazeski
Implementation of the NAND read function for ARM NAND I/O that includes running a local algorithm on a device to increase the performance of block reads. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-26NAND Flash documentation update.Dean Glazeski
Updated doxygen comments for different interface structures for the NAND interface. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-26XScale: add stub {read,write}_phys routinesDavid Brownell
Just make these fail, instead of letting them write over potentially random memory. Users should be able to work around the lack of real implementations by disbling the MMU by hand ... until someone provides a Real Fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-26update bug reporting informationUwe Hermann
The Berlios bug-tracker is disabled, bug reports go to the list. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-26fix typos in documentationUwe Hermann
Fixes some minor typos in the top-level documentation files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-26fix typos in source filesUwe Hermann
Correct some spelling errors in source comments and printed output. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-26styleguide: add some embedded style rules.Øyvind Harboe
Embedded and pthreads rely on modest and predictable stack usage. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-26fix 'flash protect' and 'flash erase_sector'Eric Wetzel
Command upgrading introduced two off-by-one bugs in the flash commands. This patch fixes the 'flash {protect,erase_sector}' commands to check that they have been passed the correct number of arguments. Ammended during commit to fix help text for 'erase_address' too.