Remove whitespace at end of lines, step 1.
[openocd.git] / src / flash / lpc2000.c
index 60a3ad660975dabad9f4dde86e4e21efc08c0f73..106c2bad32827abbeb122e8df5988508136aa0e7 100644 (file)
 /* flash programming support for Philips LPC2xxx devices
  * currently supported devices:
  * variant 1 (lpc2000_v1):
- * - 2104|5|6
- * - 2114|9
- * - 2124|9
+ * - 2104 | 5|6
+ * - 2114 | 9
+ * - 2124 | 9
  * - 2194
- * - 2212|4
- * - 2292|4
+ * - 2212 | 4
+ * - 2292 | 4
  *
  * variant 2 (lpc2000_v2):
  * - 213x
  * - 214x
- * - 2101|2|3
- * - 2364|6|8
+ * - 2101 | 2|3
+ * - 2364 | 6|8
  * - 2378
  */
 
@@ -258,7 +258,7 @@ static int lpc2000_iap_call(flash_bank_t *bank, int code, uint32_t param_table[5
                /* write IAP code to working area */
                target_buffer_set_u32(target, jump_gate, ARMV4_5_BX(12));
                target_buffer_set_u32(target, jump_gate + 4, ARMV4_5_B(0xfffffe, 0));
-               if((retval = target_write_memory(target, lpc2000_info->iap_working_area->address, 4, 2, jump_gate)) != ERROR_OK)
+               if ((retval = target_write_memory(target, lpc2000_info->iap_working_area->address, 4, 2, jump_gate)) != ERROR_OK)
                {
                        return retval;
                }
@@ -497,7 +497,7 @@ static int lpc2000_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of
 
        if (offset % dst_min_alignment)
        {
-               LOG_WARNING("offset 0x%x breaks required alignment 0x%x", offset, dst_min_alignment);
+               LOG_WARNING("offset 0x%" PRIx32 " breaks required alignment 0x%" PRIx32, offset, dst_min_alignment);
                return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
        }
 
@@ -518,17 +518,17 @@ static int lpc2000_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of
                int i = 0;
                for (i = 0; i < 8; i++)
                {
-                       LOG_DEBUG("0x%2.2x: 0x%8.8x", i * 4, buf_get_u32(buffer + (i * 4), 0, 32));
+                       LOG_DEBUG("0x%2.2x: 0x%8.8" PRIx32, i * 4, buf_get_u32(buffer + (i * 4), 0, 32));
                        if (i != 5)
                                checksum += buf_get_u32(buffer + (i * 4), 0, 32);
                }
                checksum = 0 - checksum;
-               LOG_DEBUG("checksum: 0x%8.8x", checksum);
+               LOG_DEBUG("checksum: 0x%8.8" PRIx32, checksum);
 
-               uint32_t original_value=buf_get_u32(buffer + (5 * 4), 0, 32);
-               if (original_value!=checksum)
+               uint32_t original_value = buf_get_u32(buffer + (5 * 4), 0, 32);
+               if (original_value != checksum)
                {
-                       LOG_WARNING("Verification will fail since checksum in image(0x%8.8x) written to flash was different from calculated vector checksum(0x%8.8x).",
+                       LOG_WARNING("Verification will fail since checksum in image(0x%8.8" PRIx32 ") written to flash was different from calculated vector checksum(0x%8.8" PRIx32 ").",
                                        original_value, checksum);
                        LOG_WARNING("To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.");
                }
@@ -598,7 +598,7 @@ static int lpc2000_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of
                        free(last_buffer);
                }
 
-               LOG_DEBUG("writing 0x%x bytes to address 0x%x", thisrun_bytes, bank->base + offset + bytes_written);
+               LOG_DEBUG("writing 0x%" PRIx32 " bytes to address 0x%" PRIx32 , thisrun_bytes, bank->base + offset + bytes_written);
 
                /* Write data */
                param_table[0] = bank->base + offset + bytes_written;
@@ -667,7 +667,7 @@ static int lpc2000_info(struct flash_bank_s *bank, char *buf, int buf_size)
 {
        lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
 
-       snprintf(buf, buf_size, "lpc2000 flash driver variant: %i, clk: %i", lpc2000_info->variant, lpc2000_info->cclk);
+       snprintf(buf, buf_size, "lpc2000 flash driver variant: %i, clk: %" PRIi32 , lpc2000_info->variant, lpc2000_info->cclk);
 
        return ERROR_OK;
 }
@@ -708,7 +708,7 @@ static int lpc2000_handle_part_id_command(struct command_context_s *cmd_ctx, cha
        }
        else
        {
-               command_print(cmd_ctx, "lpc2000 part id: 0x%8.8x", result_table[0]);
+               command_print(cmd_ctx, "lpc2000 part id: 0x%8.8" PRIx32 , result_table[0]);
        }
 
        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)