From 1341eb3b0aea74b939a5d7702f696b175d032647 Mon Sep 17 00:00:00 2001 From: drath Date: Sun, 30 Jul 2006 11:25:43 +0000 Subject: - 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 --- src/flash/flash.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/flash') diff --git a/src/flash/flash.c b/src/flash/flash.c index 0a71309..6f0523d 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 "); @@ -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; -- cgit v1.1