diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-04 14:09:03 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-04 14:09:03 +0000 |
commit | 381dc0efab3335cadc75db2e3cbe00a36c4b644f (patch) | |
tree | 552a45bef0b913b47b3d4f8276f97482566589f2 | |
parent | 35b3c95299a97c05078f7dd662d66c89a356869d (diff) | |
download | openocd+libswd-381dc0efab3335cadc75db2e3cbe00a36c4b644f.tar.gz openocd+libswd-381dc0efab3335cadc75db2e3cbe00a36c4b644f.tar.bz2 openocd+libswd-381dc0efab3335cadc75db2e3cbe00a36c4b644f.tar.xz openocd+libswd-381dc0efab3335cadc75db2e3cbe00a36c4b644f.zip |
- the reset mode parameter is now DEPRECATED. It is implemented
as an optional parameter with default reset_init. This is to streamline
things w.r.t. the target library.
git-svn-id: svn://svn.berlios.de/openocd/trunk@540 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/target/target.c | 8 | ||||
-rw-r--r-- | src/target/target/at91eb40a.cfg | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/target/target.c b/src/target/target.c index 7673f5d2..64f6cb8d 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -784,7 +784,7 @@ int target_free_all_working_areas(struct target_s *target) int target_register_commands(struct command_context_s *cmd_ctx) { - register_command(cmd_ctx, NULL, "target", handle_target_command, COMMAND_CONFIG, NULL); + register_command(cmd_ctx, NULL, "target", handle_target_command, COMMAND_CONFIG, "target <cpu> [reset_init default - DEPRECATED] <chainpos> <endianness> <variant> [cpu type specifc args]"); register_command(cmd_ctx, NULL, "targets", handle_targets_command, COMMAND_EXEC, NULL); register_command(cmd_ctx, NULL, "daemon_startup", handle_daemon_startup_command, COMMAND_CONFIG, NULL); register_command(cmd_ctx, NULL, "target_script", handle_target_script_command, COMMAND_CONFIG, NULL); @@ -1191,6 +1191,7 @@ int handle_target_command(struct command_context_s *cmd_ctx, char *cmd, char **a } /* what to do on a target reset */ + (*last_target_p)->reset_mode = RESET_INIT; /* default */ if (strcmp(args[2], "reset_halt") == 0) (*last_target_p)->reset_mode = RESET_HALT; else if (strcmp(args[2], "reset_run") == 0) @@ -1203,8 +1204,9 @@ int handle_target_command(struct command_context_s *cmd_ctx, char *cmd, char **a (*last_target_p)->reset_mode = RESET_RUN_AND_INIT; else { - LOG_ERROR("unknown target startup mode %s", args[2]); - return ERROR_COMMAND_SYNTAX_ERROR; + /* Kludge! we want to make this reset arg optional while remaining compatible! */ + args--; + argc++; } (*last_target_p)->run_and_halt_time = 1000; /* default 1s */ diff --git a/src/target/target/at91eb40a.cfg b/src/target/target/at91eb40a.cfg index 658c6d0c..4fee88d8 100644 --- a/src/target/target/at91eb40a.cfg +++ b/src/target/target/at91eb40a.cfg @@ -14,7 +14,7 @@ reset_config srst_only srst_pulls_trst jtag_device 4 0x1 0xf 0xe #target configuration -target arm7tdmi little reset_init 0 arm7tdmi-s_r4 +target arm7tdmi little 0 arm7tdmi-s_r4 # speed up memory downloads arm7 fast_memory_access enable |