aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-17update doxygen configuration to produce a PDFZachary T Welch
A single PDF file for the developer manual allows accessing a single index, browsing, and searching. It takes significantly more time to build this way, but this patch allows others to look at the results. Migration Tip: If you have previously built the HTML Doxygen documentatation, rename your 'doxygen' directory to 'doxygen/html' to prevent needlessly rebuilding those files.
2009-11-17update command_handler documentationZachary T Welch
Improve the developer manual and primer sections which talk about writing command handlers. Notably, it documents the new CMD_* macros.
2009-11-17remove unused variable from run_commandZachary T Welch
2009-11-17add CMD_NAME variable in command_invocationZachary T Welch
Update CMD_NAME from its migratory home in CMD_ARGV[-1] to cmd->name. Allows CMD_ARGV++ idiom to be used safely in command handlers.
2009-11-17add struct command_invocation for COMMAND_HANDLERZachary T Welch
Adds the command_invocation structure to encapsulate parameters for all COMMAND_HANDLER routines. Rather than passing several arguments to each successive subroutine, a single pointer may be passed around. Changes the CMD_* macros to reference the new fields. Updates run_command to create an instance and pass it to the handler.
2009-11-17command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17command_handler: change 'args' to CMD_ARGVZachary T Welch
This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
2009-11-17command_handler: change to 'argc' to CMD_ARGCZachary T Welch
This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
2009-11-17add more command_handler conversion macrosZachary T Welch
Add additional macros to allow command handling to be migrated easily: CMD_CTX, CMD_ARGC, and CMD_ARGV. Updates CMD_NAME to use CMD_ARGV. In addition to making the remaining patches of this series cleaner, this introduces easily sed-able symbols that could allow us to retire these once the command handler infrastructure matures (i.e. pre-1.0).
2009-11-17target: simplify register get/set opsDavid Brownell
No need to indirect from registered integers to pointers. Just stash the pointers directly in the register struct, and don't even bother registering. This is a small code shrink, speeds register access just a smidgeon, and gets rid of another rude exit() path. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-17jtag_registers: Avalon bridge flushing tweaksØyvind Harboe
The code is now much more explicit. It flushes every N writes. For now flush every time, but tinkering with the bridge FIFO size and how often we flush clearly points in the direction of the Avalon write FIFO full being the culprit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-17zy1000: revC UART forwardingØyvind Harboe
Name of serial device differs between revB/C. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-17zy1000: add version command to print FPGA version and timestampsØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-17zy1000: fix bug when running on non-arm CPUØyvind Harboe
Shifting by more than 32 is undefined for 32 bit integers according to the C standard. Robust solution is conditional code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-17zy1000: fix trivial syntax error introduced by latest refactoringsØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-17ARM9TDMI: remove now-needless "struct arm9tdmi"David Brownell
And move the rest of the vector_catch stuff into the C file; it's not part of the module interface. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-17ARM7TDMI: remove now-needless "struct arm7tdmi"David Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-17target: remove some more duplicate includesDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARMv7-A: no exit() callsDavid Brownell
Also, switch integrity check over to the correct magic number, and remove duplicate v4/v5 #define. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16Cortex-A8: no exit() calls, add missing v7-A initDavid Brownell
Eventually there should be a v7a init routine, but for now all that is inlined here. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16XScale: fewere exit() callsDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16MIPS: no exit() callsDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARMv7-M: no exit() callsDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARMv4/ARMv5: no exit() callsDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARM11: fewer exit() callsDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16Cortex-M3: don't exit()David Brownell
Get rid of undesirable and needless exit() calls from the Cortex-M3 support. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARMv7A: use standard disassemblerDavid Brownell
We no longer need v7A-specific code for this. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARM11: register (most) standard ARM commandsDavid Brownell
Have ARM11 register the "standard" ARM commands. For now, only disassembly really works. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARM: "armv4_5" command prefix becomes "arm"David Brownell
Rename the "armv4_5" command prefix to straight "arm" so it makes more sense for newer cores. Add a simple compatibility script. Make sure all the commands give the same "not an ARM" diagnostic message (and fail properly) when called against non-ARM targets. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16JTAG: fix autoprobe failure.David Brownell
Fix bug noted by Øyvind: terminate the IR length autoscan when the IR is too long, or otherwise broken. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16fileio: improve API typesZachary T Welch
Use size_t instead of uint32_t when specifying file sizes. Update all consumers up through the layers to use size_t when required. These changes should be safe, but the higher-levels will need to be updated further to receive the intended benefits (i.e. large file support). Add error checking for fileio_read and file_write. Previously, all errors were being silently ignored, so this change might cause some problems for some people in some cases. However, it gives us the chance to handle any errors that do occur at higher-levels, rather than burying our heads in the sand.
2009-11-16struct fileio: improve member typesZachary T Welch
Add const keyword to file url and cast to free(). Make size an ssize_t and chase all format strings that use it.
2009-11-16helper/log: improve API parameter typesZachary T Welch
Uses unsigned type to pass line numbers. Use uint64_t to pass sleep routines their milliseconds. Updates sleep routines to use this type and improve whitespace.
2009-11-16use Jim_CmdProc in jim_registerZachary T Welch
The jim_register command just needed to use the type defined by jim.h.
2009-11-16improve constness of open_file_from_pathZachary T Welch
2009-11-16make command line options constZachary T Welch
The getopt_long call allows a const struct option, so mark ours const too.
2009-11-16ARM: standard disassembler uses Thumb2 entryDavid Brownell
Tweak "standard" ARM disassembler diagnostics to fail if the target is not "an ARM" (vs. not "an ARMV4/5"), so it makes more sense for cores inheriting this as the "generic" disassembler. Also, to use the Thumb2 entry instead of the original Thumb entry. This makes it work better for both newer cores (which support those added instructions) and for BL and BLX instructions on older cores. (Those instructions are 32-bits, which requires curious state-aware code to go through a 16-bit decode interface...) Plus minor cleanups, notably to have fewer exit paths and to make sure they all return failure codes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16target: don't include "log.h" from "armv4_5.h"David Brownell
No point in multiple includes, and that file doesn't use its functions any more. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16ARM: move mode functions out of headerDavid Brownell
They're really too big to inline, at least for code that's not in any performance-critical loops. Also move the associated string table to the rodata section. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16JTAG: no LOG_WARNING() for taps without IDCODEDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16binarybuffer: regression fixDavid Brownell
The "improve inline binarybuffer helpers" mis-handled bytes with the high bit set; treat them as unsigned, not signed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16"types.h" doxygen fixDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16target: less implicit inclusion of "etm.h"David Brownell
Don't include it in more headers than necessary; just use it in the few files that actually need it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16move ARRAY_SIZE macro to types.hZachary T Welch
The ARRAY_SIZE macro was defined in several target files, so move it to types.h. This patch also removes two other identical macros: DIM (from jtag.h) and asizeof (from arm11.h).
2009-11-16armv7m: make core reg read/write use unsignedZachary T Welch
Eliminate redundant check that gets covered by using unsigned type. Created to eliminate noise from subsequent patches, but this kind of conversion will be beneficial in similar ways throughout the tree.
2009-11-16remove TAP_SCAN_BYTES macroZachary T Welch
Use DIV_ROUND_UP(n, 8) instead of TAP_SCAN_BYTES macro.
2009-11-16rename CEIL as DIV_ROUND_UPZachary T Welch
Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
2009-11-16move container_of to types.hZachary T Welch
The container_of macro is useful as a general solution. It belongs in types.h, rather than target.h where it was introduced. Requires the offsetof macro, which comes from <stddef.h> (moved as well).
2009-11-16nand_command_get_device_by_num: make COMMAND_HELPERZachary T Welch
Use COMMAND_HELPER macro to define nand_command_get_device_by_num. Use CALL_COMMAND_HANDLER to invoke it.
2009-11-16flash_command_get_bank_by_num: make COMMAND_HELPERZachary T Welch
Use COMMAND_HELPER macro to declare flash_command_get_bank_by_num. This is required for COMMAND_PARSE_NUMBER macro.