From a582e9a8d183c56d1aa8ae18afc1c11e2cbd6d2d Mon Sep 17 00:00:00 2001 From: drath Date: Thu, 28 Sep 2006 10:41:43 +0000 Subject: - str9x flash support (Thanks to Spencer Oliver) - str75x flash support (Thanks to Spencer Oliver) - correct reporting of T-Bit in CPSR (Thanks to John Hartman for reporting this) - core-state (ARM/Thumb) can be switched by modifying CPSR - fixed bug in gdb_server register handling - register values > 32-bit should now be supported - several minor fixes and enhancements git-svn-id: svn://svn.berlios.de/openocd/trunk@100 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/flash.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/flash/flash.c') diff --git a/src/flash/flash.c b/src/flash/flash.c index 7d199cfc..736d3fca 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -51,6 +51,7 @@ extern flash_driver_t lpc2000_flash; extern flash_driver_t cfi_flash; extern flash_driver_t at91sam7_flash; extern flash_driver_t str7x_flash; +extern flash_driver_t str9x_flash; flash_driver_t *flash_drivers[] = { @@ -58,6 +59,7 @@ flash_driver_t *flash_drivers[] = &cfi_flash, &at91sam7_flash, &str7x_flash, + &str9x_flash, NULL, }; @@ -366,6 +368,10 @@ int handle_flash_erase_command(struct command_context_s *cmd_ctx, char *cmd, cha int last = strtoul(args[2], NULL, 0); int retval; flash_bank_t *p = get_flash_bank_by_num(strtoul(args[0], NULL, 0)); + struct timeval start, end, duration; + + gettimeofday(&start, NULL); + if (!p) { command_print(cmd_ctx, "flash bank '#%s' is out of bounds", args[0]); @@ -398,6 +404,13 @@ int handle_flash_erase_command(struct command_context_s *cmd_ctx, char *cmd, cha command_print(cmd_ctx, "unknown error"); } } + else + { + gettimeofday(&end, NULL); + timeval_subtract(&duration, &end, &start); + + command_print(cmd_ctx, "erased sectors %i through %i on flash bank %i in %is %ius", first, last, strtoul(args[0], 0, 0), duration.tv_sec, duration.tv_usec); + } } else { -- cgit v1.2.3-18-g5258