summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* presto_t -> struct prestoZachary T Welch2009-11-131-6/+4
| | | | Remove useless typedef.
* ft2232_device_t -> struct ft2232_deviceZachary T Welch2009-11-131-6/+5
| | | | Remove misleading typedef from ft2232_device; it was barely used.
* jlink_jtag_t -> struct jlinkZachary T Welch2009-11-131-41/+40
| | | | Remove misleading typedef and redundant suffix.
* cable_t -> struct cableZachary T Welch2009-11-131-6/+5
| | | | Remove useless typedef and redundant suffix from parport struct cable.
* pending_scan_result_t -> struct pending_scan_resultZachary T Welch2009-11-133-20/+17
| | | | | Remove misleading typedef from struct struct pending_scan_result. Future patches need to remove these duplicated types and code.
* armjtagew_jtag_t -> struct armjtagewZachary T Welch2009-11-131-33/+32
| | | | Remove useless typedef and redundant suffix from struct armjtatew_jtag.
* use struct jtag_tap_event_actionZachary T Welch2009-11-132-7/+5
| | | | Remove useless typedef and redundant suffix from jtag_tap_event_action.
* jtag_event_callback_t -> struct jtag_event_callbackZachary T Welch2009-11-131-13/+19
| | | | | Remove useless typedef and redundant suffix from jtag_event_callback. Add documentation for the structure.
* jtag_interface_t -> struct jtag_interfaceZachary T Welch2009-11-1320-39/+38
| | | | Remove useless typedef and redundant suffix from struct jtag_interface.
* bitbang_interface_t -> struct bitbang_interfaceZachary T Welch2009-11-136-10/+9
| | | | Removes another useless typedef and suffix.
* bitq_interface_t -> struct biq_interfaceZachary T Welch2009-11-133-8/+6
| | | | Remove useless typedef and redundant suffix.
* encapsulate bitq_state structureZachary T Welch2009-11-132-10/+8
| | | | | | | Move the bitq_state structure from the header to source file, as it is used internally. Also removes its silly typedef.
* scan_field_t -> struct scan_fieldZachary T Welch2009-11-1331-152/+151
| | | | Remove useless structure typedef.
* jtag_tap_t -> struct jtag_tapZachary T Welch2009-11-1350-158/+151
| | | | | Search and destroy the jtag_tap_t typedef. This also cleans up a layering violation, removing the declaration from types.h.
* fileio_t -> struct fileioZachary T Welch2009-11-1311-41/+40
| | | | Remove useless structure typedef.
* log_callback_t -> struct log_callbackZachary T Welch2009-11-132-9/+8
| | | | | Removes useless and confusing typedef for log callback structure. Types with _t should be suitable for passing by-value as arguments.
* remove accidental artifactZachary T Welch2009-11-132-0/+1
| | | | | Somehow I managed to slip a temporary build file into the tree. Remove it and update the .gitignore file so it doesn't happen again.
* add documention for writing built-in commandsZachary T Welch2009-11-133-2/+163
| | | | | | | | This documentation update provides an introduction to the command handling facilities provided by command.[ch]. A primer walks the user through the elements of a pointedly pedantic module: src/hello.c. A summary of the API is provided in the OpenOCD Architecture section.
* add src/hello.c to augment new command tutorialZachary T Welch2009-11-133-1/+64
| | | | | | The hello module provides the 'hello' command, printing a greetings to the command console. It can grow to serve as pedagogical example of services that OpenOCD developers should use: a runnable style guide.
* command_handler_t: make cmd an indirect parameterZachary T Welch2009-11-132-10/+12
| | | | | This patch removes 'cmd' from the list of direct parameters, moving that pointer to args[-1] (by way of the new CMD_NAME macro).
* command_handler_t: make args parameter constZachary T Welch2009-11-132-5/+7
| | | | | This patch prevents command handlers from modifying the strings passed in the 'args' array.
* command_handler_t: make cmd parameter constZachary T Welch2009-11-131-1/+1
| | | | | Prevents the command name from being modified in command handlers. Again, this has cascading effects, but the patches are fairly minimal.
* command_handler_t: make argc unsignedZachary T Welch2009-11-137-18/+12
| | | | | | The number of command arguments will always be 0 or more, so use the right type in handlers. This has a cascading effect up through the layers, but the new COMMAND_HANDLER macros prevented total chaos.
* add CMD_NAME macro for command handlersZachary T Welch2009-11-1310-18/+24
| | | | | By introducing the CMD_NAME macro, this parameter may be integrated as args[-1] in command.[ch], without touching any other call sites.
* use CALL_COMMAND_HANDLER instead of direct callsZachary T Welch2009-11-1310-16/+20
| | | | | | By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or even removed in inherited signatures, without requiring revisiting all of the various call sites.
* add PLD_DEVICE_COMMAND_HANDLER macroZachary T Welch2009-11-132-4/+9
| | | | Update virtex module to use abstracted PLD command handling.
* nand: add NAND_DEVICE_COMMAND_HANDLER macroZachary T Welch2009-11-139-23/+14
| | | | | Abstracts the extended NAND command handling to allow the function signature to be controlled by __COMMAND_HANDLER.
* use FLASH_BANK_COMMAND_HANDLER macroZachary T Welch2009-11-1318-26/+18
| | | | Defines all flash_bank_command handlers using the new macro.
* add FLASH_BANK_COMMAND_HANDLER macroZachary T Welch2009-11-131-2/+6
| | | | | | | The FLASH_BANK_COMMAND_HANDLER provides an extended command handler using the __COMMAND_HANDLER macro, whereby changing that macro is sufficient to update flash handlers with the new signature. It also enforces uniform style and scope when implementing this handler.
* s3c24xx: use COMMAND_HANDLER with command helperZachary T Welch2009-11-137-30/+21
| | | | | Add S3C24XX_DEVICE_COMMAND macros to abstract common command handler conventions.
* arm_adi,armv7[am]: use COMMAND_HELPER for helpersZachary T Welch2009-11-134-23/+18
| | | | | Rewrites the dap_* command helpers to use the COMMAND_HELPER paradigm. Uses CALL_COMMAND_HELPER to hide inherited calling conventions.
* use COMMAND_HELPER for command helper functionsZachary T Welch2009-11-136-19/+21
| | | | | Define the numerous helpers that inherit command handler parameters using the COMMAND_HELPER macro.
* use COMMAND_HANDLER macro to define all commandsZachary T Welch2009-11-1355-327/+224
|
* add command_handler_t typeZachary T Welch2009-11-132-7/+6
| | | | | | This patch adds new typedefs for command handler callback functions. Users of this type signature were updated to use these new types. It uses the new __COMMAND_HANDLER macro to prevent duplication.
* add COMMAND_HANDLER and COMMAND_HELPER macrosZachary T Welch2009-11-131-0/+42
| | | | | | | | | | | | | | | | | The COMMAND_HANDLER and COMMAND_HELPER macros allow commands to be defined in a manner that decouples them from the exact order and type of their parameters. Once converted, incremental changes to the command handler type can be addressed in incremental patches that do not need to touch the entire tree. These macros' implementation, __COMMAND_HANDLER, is used to define the new command_handler_t type, and additional patches will use it to derive new macros to define extended command types (e.g. flash, nand, pld). The CALL_COMMAND_HANDLER provides a means of calling helpers or nested handlers from withing a command handler. This patch uses C99 varadic macro expansion. Please report compilers that cannot handle this code.
* add command_output_handler_tZachary T Welch2009-11-132-4/+10
| | | | | Add a typedef for command output handler function type, simplifying the appearance of functions that use it and eliminating duplicate code.
* Cortex-A8: fix indentDavid Brownell2009-11-131-28/+28
| | | | | | | The "remove (forward) declarations" patch goofed indentation on the "cortexa8_target" struct; fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* nand: rename device to nandZachary T Welch2009-11-1213-440/+440
| | | | | | | To be more informative (and consistent with flash and pld trees), change 'device' parameter name to 'nand' in NAND source files. This change eliminates confusing 'device->device->' instance from the code, and it simplifies the forthcoming command handler patches.
* ETM: start support for ETMv2+David Brownell2009-11-123-26/+144
| | | | | | | | | | | | | | | | | ARM11 and newer cores include updated ETM modules. Recognize their version codes and some key config differences. Sanity checked on an OMAP2, with an ETM11RV r0p1 (ETMv3.1). This still handles only scan chain 6, with at most 128 registers. Newer cores (mostly, Cortex) will need to use the DAP instead. Note that the newer ETM modules don't quite fit the quirky config model of the older ones ... having more port widths is easy, but the modes aren't the same. That still needs to change. Fix a curious bug ... how did the register cache NOT get saved?? Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* WinXP-x64: find right D2XX librariesLiam Redmond2009-11-121-2/+2
| | | | | | | This trivial patch allows the config script to find the correct FTDI2xx libraries under Windows XP x64 using msys. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* parport: add support for the jtag_khz command.Jonas Horberg2009-11-122-8/+100
| | | | | | | | | | | Add the khz and speed_div functions to the parport interface driver. Add the parport_toggling_time function that tells the parport driver how long (in nanoseconds) it takes for the hardware to toggle TCK. [dbrownell@users.sourceforge.net: tweak doc for clarity, mention multimeter, and whitespace fixes] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM: remove old mid-level ETM handleDavid Brownell2009-11-117-11/+8
| | | | | | | | | | | | | | | | | | Now that nothing uses the old ETM handle any more, remove it. Add minimal header tweaks, letting non-ARM7 and non-ARM9 cores access ETM facilities. Now ARM11 could support standard ETM (and ETB) access as soon as it derives from "struct arm" ... its scanchain 6 is used access the ETM, just like ARM7 and ARM9. The Cortex parts (both M3 and A8) will need modified access methods (via ETM init parameters), so they use the DAP. Our first A8 target (OMAP3) needs that for both ETM and ETB, but the M3 ETM isn't very useful without SWO trace support (it's painfully stripped down), so that support won't be worth adding for a while. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM: use new toplevel ETM handleDavid Brownell2009-11-111-58/+50
| | | | | | | | Make ETM itself use the new toplevel ETM handle, instead of the to-be-removed lower level one. As of this patch, nothing should be using the old ARM7/ARM9-specific handle. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM: update port driversDavid Brownell2009-11-113-42/+41
| | | | | | | | | | Make both useful ETM port drivers (etb, etm_dummy) use the new toplevel ETM handle, instead of the to-be-removed lower level one. Do the same for the "oocd-trace" prototype too; and fix its error reporting paths: return failure codes, don't exit(), etc Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM: update arm[79]tdmi_examine()David Brownell2009-11-112-8/+10
| | | | | | | Make ARM7 and ARM9 cores use the new toplevel ETM handle to trigger ETM setup, not the to-be-removed lower level one. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: start generalized base typeDavid Brownell2009-11-112-19/+34
| | | | | | | | | | | | | | | | Rename "struct armv4_5_common_s" as "struct arm". It needs a bit more work to be properly generic, and to move out of this header, but it's the best start we have on that today. Add and initialize an optional ETM pointer, since that will be the first thing that gets generalized. The intent being: all ARMs should eventually derive from this "struct arm", so they can reuse the current ETM logic. (And later, more.) Currently the ARM cores that *don't* so derive are only ARMv7-M (and thus Cortex-M3) and ARM11. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* fix 'jtag interface' behaviorZachary T Welch2009-11-111-1/+2
| | | | | Without this patch, running "openocd -c 'jtag interface'" segfaults. Now, it returns the string "undefined" when the interface is unset.
* improve command registrationZachary T Welch2009-11-111-31/+43
| | | | | | | Eliminate duplicate code for linking commands into a list. Adds a check to ensure the command does not already exist; if it does, return that one instead of creating a duplicate.
* add help regardless of callbackZachary T Welch2009-11-111-2/+2
| | | | | | | | | Add help for commands regardless of whether a handler is involved. With this, all sorts of new commands can be found in 'help' text. Hopefully, all of them have been documented.... Sadly, the lsort function appears to handle nested lists poorly, such that sub-commands do not group with their parents.
* eliminate duplicate helptext managementZachary T Welch2009-11-111-31/+30
| | | | | Add helpers to manage adding entries to the helptext list. Adds support for arbitrarily nested commands.