diff options
author | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2006-07-30 11:25:43 +0000 |
---|---|---|
committer | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2006-07-30 11:25:43 +0000 |
commit | 1341eb3b0aea74b939a5d7702f696b175d032647 (patch) | |
tree | 66aec1f947ef1b464b2f1e9028e8e4846499ad31 /src/flash | |
parent | 82d2633b5f550115e9e7c7d0520babb6680aa38f (diff) | |
download | openocd+libswd-1341eb3b0aea74b939a5d7702f696b175d032647.tar.gz openocd+libswd-1341eb3b0aea74b939a5d7702f696b175d032647.tar.bz2 openocd+libswd-1341eb3b0aea74b939a5d7702f696b175d032647.tar.xz openocd+libswd-1341eb3b0aea74b939a5d7702f696b175d032647.zip |
- added configurable delays after reset lines get deasserted. useful if reset circuitry keeps lines asserted for too long.
- additional debug output when opening the parallel port
- fixed counting of available arm7/9 watchpoint units
- 'flash write' now displays elapsed time
git-svn-id: svn://svn.berlios.de/openocd/trunk@79 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/flash.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c index 0a713093..6f0523d0 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -476,7 +476,10 @@ int handle_flash_write_command(struct command_context_s *cmd_ctx, char *cmd, cha u32 buf_cnt; int retval; flash_bank_t *p; + struct timeval start, end, duration; + gettimeofday(&start, NULL); + if (argc < 3) { command_print(cmd_ctx, "usage: flash write <bank> <file> <offset>"); @@ -553,7 +556,10 @@ int handle_flash_write_command(struct command_context_s *cmd_ctx, char *cmd, cha free(buffer); fclose(binary); - command_print(cmd_ctx, "wrote file %s to flash bank %i at offset 0x%8.8x", args[1], strtoul(args[0], NULL, 0), strtoul(args[2], NULL, 0)); + gettimeofday(&end, NULL); + timeval_subtract(&duration, &end, &start); + + command_print(cmd_ctx, "wrote file %s to flash bank %i at offset 0x%8.8x in %is %ius", args[1], strtoul(args[0], NULL, 0), strtoul(args[2], NULL, 0), duration.tv_sec, duration.tv_usec); return ERROR_OK; |