flash/nor: use target_addr_t for flash bank base
[openocd.git] / src / flash / nor / fespi.c
index a07972edd525265ab98ac3fab864eeec9611aaa6..ea47afd23162735260cb5fb23824118625a4414e 100644 (file)
@@ -162,7 +162,7 @@ FLASH_BANK_COMMAND_HANDLER(fespi_flash_bank_command)
                int temp;
                COMMAND_PARSE_NUMBER(int, CMD_ARGV[6], temp);
                fespi_info->ctrl_base = (uint32_t) temp;
-               LOG_DEBUG("ASSUMING FESPI device at ctrl_base = 0x%" TARGET_PRIxADDR,
+               LOG_DEBUG("ASSUMING FESPI device at ctrl_base = " TARGET_ADDR_FMT,
                                fespi_info->ctrl_base);
        }
 
@@ -176,7 +176,7 @@ static int fespi_read_reg(struct flash_bank *bank, uint32_t *value, target_addr_
 
        int result = target_read_u32(target, fespi_info->ctrl_base + address, value);
        if (result != ERROR_OK) {
-               LOG_ERROR("fespi_read_reg() error at 0x%" TARGET_PRIxADDR,
+               LOG_ERROR("fespi_read_reg() error at " TARGET_ADDR_FMT,
                                fespi_info->ctrl_base + address);
                return result;
        }
@@ -190,7 +190,7 @@ static int fespi_write_reg(struct flash_bank *bank, target_addr_t address, uint3
 
        int result = target_write_u32(target, fespi_info->ctrl_base + address, value);
        if (result != ERROR_OK) {
-               LOG_ERROR("fespi_write_reg() error writing 0x%x to 0x%" TARGET_PRIxADDR,
+               LOG_ERROR("fespi_write_reg() error writing 0x%x to " TARGET_ADDR_FMT,
                                value, fespi_info->ctrl_base + address);
                return result;
        }
@@ -709,7 +709,7 @@ static int steps_execute(struct algorithm_steps *as,
                                data_buf);
                free(data_buf);
                if (retval != ERROR_OK) {
-                       LOG_ERROR("Failed to write data to 0x%" TARGET_PRIxADDR ": %d",
+                       LOG_ERROR("Failed to write data to " TARGET_ADDR_FMT ": %d",
                                        data_wa->address, retval);
                        goto exit;
                }
@@ -718,7 +718,7 @@ static int steps_execute(struct algorithm_steps *as,
                                algorithm_wa->address, algorithm_wa->address + 4,
                                10000, NULL);
                if (retval != ERROR_OK) {
-                       LOG_ERROR("Failed to execute algorithm at 0x%" TARGET_PRIxADDR ": %d",
+                       LOG_ERROR("Failed to execute algorithm at " TARGET_ADDR_FMT ": %d",
                                        algorithm_wa->address, retval);
                        goto exit;
                }
@@ -775,7 +775,7 @@ static int fespi_write(struct flash_bank *bank, const uint8_t *buffer,
                retval = target_write_buffer(target, algorithm_wa->address,
                                sizeof(algorithm_bin), algorithm_bin);
                if (retval != ERROR_OK) {
-                       LOG_ERROR("Failed to write code to 0x%" TARGET_PRIxADDR ": %d",
+                       LOG_ERROR("Failed to write code to " TARGET_ADDR_FMT ": %d",
                                        algorithm_wa->address, retval);
                        target_free_working_area(target, algorithm_wa);
                        algorithm_wa = NULL;
@@ -935,12 +935,13 @@ static int fespi_probe(struct flash_bank *bank)
 
                fespi_info->ctrl_base = target_device->ctrl_base;
 
-               LOG_DEBUG("Valid FESPI on device %s at address 0x%" PRIx32,
+               LOG_DEBUG("Valid FESPI on device %s at address " TARGET_ADDR_FMT,
                                target_device->name, bank->base);
 
        } else {
-         LOG_DEBUG("Assuming FESPI as specified at address 0x%" TARGET_PRIxADDR
-                         " with ctrl at 0x%x", fespi_info->ctrl_base, bank->base);
+         LOG_DEBUG("Assuming FESPI as specified at address " TARGET_ADDR_FMT
+                         " with ctrl at " TARGET_ADDR_FMT, fespi_info->ctrl_base,
+                         bank->base);
        }
 
        /* read and decode flash ID; returns in SW mode */

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)