summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix 'flash protect' and 'flash erase_sector'Eric Wetzel2009-11-261-3/+3
| | | | | | | | 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.
* target: create and use target_name()David Brownell2009-11-255-24/+34
| | | | | | | | | | | | | Several of the sites now using target_type_name() really ought to be using an instance-specific name. Create a function called target_name(), accessing the instance's own (command) name. Use it in several places that really should be displaying instance-specific names. Also in several places which were already doing so, but which had no wrapper to call. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* target: target_get_name() --> target_type_name()David Brownell2009-11-257-17/+26
| | | | | | | | | | | | | There are two names that may matter on a per-target basis. One is a per-instance name (for example, "at91sam7s.cpu"). The other is the name of its type (for example, "arm7tdmi"), which is shared among multiple targets. Currently target_get_name() returns the type name, which is misleading and is rarely appropriate for target diagnostics. Rename that as target_type_name(). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: minor armv4/armv5 cleanupDavid Brownell2009-11-251-1/+12
| | | | | | Lines of 300+ characters are still bad; debug tweaks. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: comment tweaks in ADIv5David Brownell2009-11-251-2/+5
| | | | | | "OptimoDE DESS" is ARM's semicustom DSPish stuff. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM7/9: shrink run_algorithm_inner() linesDavid Brownell2009-11-251-2/+10
| | | | | | 300+ characters is unreasonable. So is half that. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* use ARRAY_SIZE macroZachary T Welch2009-11-2510-36/+36
| | | | | Search and destroy lingering cases where the ARRAY_SIZE macro should be used to convey more intrinsic meaning in the OpenOCD code.
* support OPENOCD_DEBUG_LEVEL environment settingZachary T Welch2009-11-251-0/+13
| | | | | Detect the OPENOCD_DEBUG_LEVEL setting in log_init(), allowing the very early startup phases to be debugged.
* log: improve initializationZachary T Welch2009-11-253-14/+11
| | | | | | Removes redundant assignment of start_ms from log_register_commands(). Eliminates command_context parameter and return value. Adds Doxygen comment block for this API call.
* add 'testee' target typeZachary T Welch2009-11-253-1/+52
| | | | | | | Alliteration aside, this should provide the final piece of the puzzle for developers that want to get started writing a new target type. In this way, it also seeks to complement the 'dummy' interface driver and 'faux' NOR flash driver.
* improve command handling examplesZachary T Welch2009-11-255-5/+62
| | | | | | Removes hello and foo commands from top-level registration. Instead, the dummy interface driver and faux flash driver have been augmented to register these commands as sub-commands.
* add script_command_run helperZachary T Welch2009-11-251-26/+19
| | | | | Eliminates duplicated code in script_command and handle_unknown_command. Fixes bug with duplicated help output generated by placeholder commands.
* encapsulate and re-use log capture, retval setupZachary T Welch2009-11-251-49/+43
| | | | | | | | | Factors log capture while running script commands, eliminating duplicated code between script_command and jim_capture. Factors setting a command's Jim "retval" into a new helper as well. Using these new helpers in the new unknown command handler's fixes possible regressions caused by these bits being missing.
* combine help and usage command handlersZachary T Welch2009-11-251-20/+8
| | | | Remove duplicated handler code by checking the running command name.
* improve usage and help command outputZachary T Welch2009-11-242-44/+38
| | | | | Rewrite formatting code in C, removing last remenants of TCL help code. Sinificantly improves the readability by using smarter indent and wrap.
* allow scripts to update usage informationZachary T Welch2009-11-242-7/+36
| | | | | | The add_usage_text command uses the same C handler, which was updated to support its new polymorphic role. This patch updates the two script commands that needed this support: 'find' and 'script'.
* httpd: use register_commands()Zachary T Welch2009-11-244-20/+51
| | | | | | | Updates httpd_start() to use register_commands() for 'readform' and 'writeform' commands. Adds server/httpd.h to export the new signatures for this function (and httpd_stop), which allows removing the obsoleted declarations inside openocd.c.
* add jim_handler to command_registrationZachary T Welch2009-11-246-83/+146
| | | | | | Adding jim_handler field to command_registration allows removing the register_jim helper. All command registrations now go through the register_command{,s}() functions.
* refactor command_new to use command_registrationZachary T Welch2009-11-241-12/+10
| | | | Save stack space: use a struct. Makes it easier to add new parameters.
* remove register_commands from etm_capture_driverZachary T Welch2009-11-245-31/+17
| | | | | | Converts callback to an array of command_registration records. Moves oocd_trace driver definition to end of file to eliminate useless forward declaration.
* remove target_type register_command callbackZachary T Welch2009-11-2431-149/+89
| | | | | | Uses chaining of command_registration structures to eliminate all target_type register_callback routines. Exports the command_handler registration arrays for those target types that are used by others.
* xscale: use register_commands()Zachary T Welch2009-11-241-23/+107
|
* trace: use register_commands()Zachary T Welch2009-11-241-10/+29
|
* target_request: use register_commands()Zachary T Welch2009-11-241-8/+21
|
* target: use register_commands()Zachary T Welch2009-11-241-104/+201
|
* oocd_trace: use register_commands()Zachary T Welch2009-11-241-10/+32
|
* etm_dummy: use register_commands()Zachary T Welch2009-11-241-7/+20
|
* etm: use register_commands()Zachary T Welch2009-11-241-37/+89
|
* etb: use register_commands()Zachary T Welch2009-11-241-8/+20
|
* cortex_m3: use register_commands()Zachary T Welch2009-11-241-19/+36
|
* cortex_a8: use register_commands()Zachary T Welch2009-11-241-17/+25
|
* armv7m: use register_commands()Zachary T Welch2009-11-241-28/+48
|
* armv7a: use register_commands()Zachary T Welch2009-11-241-27/+48
|
* armv4_5: use register_commands()Zachary T Welch2009-11-241-18/+34
|
* arm9tdmi: use register_commands()Zachary T Welch2009-11-241-12/+21
|
* arm966e: use register_commands()Zachary T Welch2009-11-241-12/+23
|
* arm926ejs: use register_commands()Zachary T Welch2009-11-241-14/+22
|
* arm920t: use register_commands()Zachary T Welch2009-11-241-27/+47
|
* arm7_9_common: use register_commands()Zachary T Welch2009-11-241-20/+37
|
* arm720t: use register_commands()Zachary T Welch2009-11-241-15/+23
|
* arm11: use register_commands()Zachary T Welch2009-11-241-35/+62
|
* remove nand_controller->register_callbacksZachary T Welch2009-11-2412-41/+8
| | | | | Replace flash_driver callback with pointer to command_registration. Eliminates all related routines and allows drivers to omit commands.
* remove flash_driver->register_callbacksZachary T Welch2009-11-2417-105/+25
| | | | | Replace flash_driver callback with pointer to command_registration. Eliminates all related routines and allows drivers to omit commands.
* tms470: use register_commands()Zachary T Welch2009-11-241-7/+32
|
* str9xpec: use register_commands()Zachary T Welch2009-11-241-38/+81
|
* str9x: use register_commands()Zachary T Welch2009-11-241-8/+21
|
* str7x: use register_commands()Zachary T Welch2009-11-241-8/+20
|
* stm32x: use register_commands()Zachary T Welch2009-11-241-21/+44
|
* stellaris: use register_commands()Zachary T Welch2009-11-241-7/+20
|
* pic32mx: use register_commands()Zachary T Welch2009-11-241-17/+25
|