Bogus error message in GDB removed
[openocd.git] / src / flash / flash.c
index 96a74cd679411e20e2f8f8805d98f1e57639b887..92ac6fd6c315c1ee918fb5a2179bec0909557611 100644 (file)
@@ -106,7 +106,7 @@ static int flash_driver_erase(struct flash_bank_s *bank, int first, int last)
        retval=bank->driver->erase(bank, first, last);
        if (retval!=ERROR_OK)
        {
-               ERROR("failed erasing banks %d to %d", first, last);
+               ERROR("failed erasing sectors %d to %d", first, last);
        }
 
        return retval;
@@ -119,7 +119,7 @@ int flash_driver_protect(struct flash_bank_s *bank, int set, int first, int last
        retval=bank->driver->protect(bank, set, first, last);
        if (retval!=ERROR_OK)
        {
-               ERROR("failed protecting banks %d to %d", first, last);
+               ERROR("failed setting protection for areas %d to %d", first, last);
        }
 
        return retval;
@@ -181,6 +181,17 @@ flash_bank_t *get_flash_bank_by_num_noprobe(int num)
        return NULL;
 }
 
+int flash_get_bank_count()
+{
+       flash_bank_t *p;
+       int i = 0;
+       for (p = flash_banks; p; p = p->next)
+       {
+               i++;
+       }
+       return i;
+}
+
 flash_bank_t *get_flash_bank_by_num(int num)
 {
        flash_bank_t *p = get_flash_bank_by_num_noprobe(num);
@@ -605,7 +616,6 @@ int handle_flash_write_image_command(struct command_context_s *cmd_ctx, char *cm
        retval = image_open(&image, args[0], (argc == 3) ? args[2] : NULL);
        if (retval != ERROR_OK)
        {
-               command_print(cmd_ctx, "image_open error: %s", image.error_str);
                return retval;
        }
 
@@ -662,14 +672,12 @@ int handle_flash_write_bank_command(struct command_context_s *cmd_ctx, char *cmd
 
        if (fileio_open(&fileio, args[1], FILEIO_READ, FILEIO_BINARY) != ERROR_OK)
        {
-               command_print(cmd_ctx, "flash write_binary error: %s", fileio.error_str);
                return ERROR_OK;
        }
 
        buffer = malloc(fileio.size);
        if (fileio_read(&fileio, fileio.size, buffer, &buf_cnt) != ERROR_OK)
        {
-               command_print(cmd_ctx, "flash write_binary error: %s", fileio.error_str);
                return ERROR_OK;
        }
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)