18 files changed:
* working area available. */
static int aduc702x_write_single(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
{
* working area available. */
static int aduc702x_write_single(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
{
u8 b;
target_t *target = bank->target;
u8 b;
target_t *target = bank->target;
static int at91sam7_protect(struct flash_bank_s *bank, int set, int first, int last)
{
u32 cmd;
static int at91sam7_protect(struct flash_bank_s *bank, int set, int first, int last)
{
u32 cmd;
+ int sector;
+ u32 pagen;
at91sam7_flash_bank_t *at91sam7_info = bank->driver_priv;
at91sam7_flash_bank_t *at91sam7_info = bank->driver_priv;
};
u8 target_code[4*CFI_MAX_INTEL_CODESIZE];
const u32 *target_code_src;
};
u8 target_code[4*CFI_MAX_INTEL_CODESIZE];
const u32 *target_code_src;
bufferwsize/=(bank->bus_width / bank->chip_width);
/* fall back to memory writes */
bufferwsize/=(bank->bus_width / bank->chip_width);
/* fall back to memory writes */
- while (count >= bank->bus_width)
+ while (count >= (u32)bank->bus_width)
{
int fallback;
if ((write_p & 0xff) == 0)
{
int fallback;
if ((write_p & 0xff) == 0)
LOG_DEBUG("size: 0x%x, interface desc: %i, max buffer write size: %x", 1 << cfi_info->dev_size, cfi_info->interface_desc, (1 << cfi_info->max_buf_write_size));
LOG_DEBUG("size: 0x%x, interface desc: %i, max buffer write size: %x", 1 << cfi_info->dev_size, cfi_info->interface_desc, (1 << cfi_info->max_buf_write_size));
- if (((1 << cfi_info->dev_size) * bank->bus_width / bank->chip_width) != bank->size)
+ if ((u32)((1 << cfi_info->dev_size) * bank->bus_width / bank->chip_width) != bank->size)
{
LOG_WARNING("configuration specifies 0x%x size, but a 0x%x size flash was found", bank->size, 1 << cfi_info->dev_size);
}
{
LOG_WARNING("configuration specifies 0x%x size, but a 0x%x size flash was found", bank->size, 1 << cfi_info->dev_size);
}
for (i = 0; i < cfi_info->num_erase_regions; i++)
{
for (i = 0; i < cfi_info->num_erase_regions; i++)
{
for (j = 0; j < (cfi_info->erase_region_info[i] & 0xffff) + 1; j++)
{
bank->sectors[sector].offset = offset;
for (j = 0; j < (cfi_info->erase_region_info[i] & 0xffff) + 1; j++)
{
bank->sectors[sector].offset = offset;
for (i=0; i<len; i+=chunk)
{
int t=len-i;
for (i=0; i<len; i+=chunk)
{
int t=len-i;
static int handle_flash_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
flash_bank_t *p;
static int handle_flash_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
flash_bank_t *p;
u8 chunk[1024];
u32 wrote = 0;
u32 cur_size = 0;
u8 chunk[1024];
u32 wrote = 0;
u32 cur_size = 0;
char *duration_text;
duration_t duration;
target_t *target = get_current_target(cmd_ctx);
u32 i;
char *duration_text;
duration_t duration;
target_t *target = get_current_target(cmd_ctx);
u32 i;
u8 buffer[1024];
int buffer_size = sizeof(buffer);
int i;
u8 buffer[1024];
int buffer_size = sizeof(buffer);
int i;
if (bank->target->state != TARGET_HALTED)
{
if (bank->target->state != TARGET_HALTED)
{
for (i = 0; i < bank->num_sectors; i++)
{
for (i = 0; i < bank->num_sectors; i++)
{
bank->sectors[i].is_erased = 1;
for (j = 0; j < bank->sectors[i].size; j += buffer_size)
{
bank->sectors[i].is_erased = 1;
for (j = 0; j < bank->sectors[i].size; j += buffer_size)
{
int retval;
chunk = buffer_size;
if (chunk > (j - bank->sectors[i].size))
int retval;
chunk = buffer_size;
if (chunk > (j - bank->sectors[i].size))
else
{
u8 *last_buffer = malloc(thisrun_bytes);
else
{
u8 *last_buffer = malloc(thisrun_bytes);
memcpy(last_buffer, buffer + bytes_written, bytes_remaining);
for (i = bytes_remaining; i < thisrun_bytes; i++)
last_buffer[i] = 0xff;
memcpy(last_buffer, buffer + bytes_written, bytes_remaining);
for (i = bytes_remaining; i < thisrun_bytes; i++)
last_buffer[i] = 0xff;
int cmd51_can_256b;
int cmd51_can_8192b;
int calc_checksum;
int cmd51_can_256b;
int cmd51_can_8192b;
int calc_checksum;
} lpc2000_flash_bank_t;
enum lpc2000_status_codes
} lpc2000_flash_bank_t;
enum lpc2000_status_codes
static int lpc288x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
{
u8 page_buffer[FLASH_PAGE_SIZE];
static int lpc288x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
{
u8 page_buffer[FLASH_PAGE_SIZE];
- u32 i, status, source_offset,dest_offset;
+ u32 status, source_offset,dest_offset;
target_t *target = bank->target;
u32 bytes_remaining = count;
u32 first_sector, last_sector, sector, page;
target_t *target = bank->target;
u32 bytes_remaining = count;
u32 first_sector, last_sector, sector, page;
/* probed? halted? */
status = lpc288x_system_ready(bank);
/* probed? halted? */
status = lpc288x_system_ready(bank);
return ERROR_NAND_OPERATION_NOT_SUPPORTED;
}
return ERROR_NAND_OPERATION_NOT_SUPPORTED;
}
- if (data_size > device->page_size)
+ if (data_size > (u32)device->page_size)
{
LOG_ERROR("data size exceeds page size");
return ERROR_NAND_OPERATION_NOT_SUPPORTED;
{
LOG_ERROR("data size exceeds page size");
return ERROR_NAND_OPERATION_NOT_SUPPORTED;
- if (data_size > device->page_size)
+ if (data_size > (u32)device->page_size)
{
LOG_ERROR("data size exceeds page size");
return ERROR_NAND_OPERATION_NOT_SUPPORTED;
{
LOG_ERROR("data size exceeds page size");
return ERROR_NAND_OPERATION_NOT_SUPPORTED;
target_write_u32(target, 0x200b8000, NAND_CMD_READSTART);
}
target_write_u32(target, 0x200b8000, NAND_CMD_READSTART);
}
- while (page_bytes_done < device->page_size)
+ while (page_bytes_done < (u32)device->page_size)
{
/* MLC_ECC_AUTO_DEC_REG = dummy */
target_write_u32(target, 0x200b8014, 0xaa55aa55);
{
/* MLC_ECC_AUTO_DEC_REG = dummy */
target_write_u32(target, 0x200b8014, 0xaa55aa55);
int nand_read_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size)
{
int nand_read_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size)
{
if (!device->device)
return ERROR_NAND_DEVICE_NOT_PROBED;
if (!device->device)
return ERROR_NAND_DEVICE_NOT_PROBED;
int nand_write_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size)
{
int nand_write_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size)
{
if (oob_format & NAND_OOB_SW_ECC)
{
if (oob_format & NAND_OOB_SW_ECC)
{
u8 ecc[3];
memset(oob, 0xff, oob_size);
for (i = 0, j = 0; i < page_size; i += 256) {
u8 ecc[3];
memset(oob, 0xff, oob_size);
for (i = 0, j = 0; i < page_size; i += 256) {
typedef struct ocl_priv_s
{
arm_jtag_t *jtag_info;
typedef struct ocl_priv_s
{
arm_jtag_t *jtag_info;
- int buflen;
- int bufalign;
+ unsigned int buflen;
+ unsigned int bufalign;
} ocl_priv_t;
static int ocl_register_commands(struct command_context_s *cmd_ctx)
} ocl_priv_t;
static int ocl_register_commands(struct command_context_s *cmd_ctx)
u32 address = bank->base + offset;
u32 bytes_written = 0;
u32 status;
u32 address = bank->base + offset;
u32 bytes_written = 0;
u32 status;
if (bank->target->state != TARGET_HALTED)
{
if (bank->target->state != TARGET_HALTED)
{
return ERROR_FLASH_OPERATION_FAILED;
}
return ERROR_FLASH_OPERATION_FAILED;
}
- if ((first < 0) || (last < first) || (last >= stellaris_info->num_pages))
+ if ((first < 0) || (last < first) || (last >= (int)stellaris_info->num_pages))
{
return ERROR_FLASH_SECTOR_INVALID;
}
{
return ERROR_FLASH_SECTOR_INVALID;
}
- if ((first == 0) && (last == (stellaris_info->num_pages-1)))
+ if ((first == 0) && (last == ((int)stellaris_info->num_pages-1)))
{
return stellaris_mass_erase(bank);
}
{
return stellaris_mass_erase(bank);
}
u32 words_remaining = (count / 4);
u32 bytes_remaining = (count & 0x00000003);
u32 bytes_written = 0;
u32 words_remaining = (count / 4);
u32 bytes_remaining = (count & 0x00000003);
u32 bytes_written = 0;
if (bank->target->state != TARGET_HALTED)
{
if (bank->target->state != TARGET_HALTED)
{
u32 address = bank->base + offset;
u32 bytes_written = 0;
u8 status;
u32 address = bank->base + offset;
u32 bytes_written = 0;
u8 status;
if (bank->target->state != TARGET_HALTED)
{
if (bank->target->state != TARGET_HALTED)
{
u32 address = bank->base + offset;
u32 bytes_written = 0;
u32 cmd;
u32 address = bank->base + offset;
u32 bytes_written = 0;
u32 cmd;
u32 check_address = offset;
int i;
u32 check_address = offset;
int i;
u32 address = bank->base + offset;
u32 bytes_written = 0;
u8 status;
u32 address = bank->base + offset;
u32 bytes_written = 0;
u8 status;
u32 check_address = offset;
u32 bank_adr;
int i;
u32 check_address = offset;
u32 bank_adr;
int i;
scan_field_t field;
u8 *scanbuf;
int i;
scan_field_t field;
u8 *scanbuf;
int i;
- u32 first_sector = 0;
- u32 last_sector = 0;
+ int first_sector = 0;
+ int last_sector = 0;
tap = str9xpec_info->tap;
tap = str9xpec_info->tap;
{
target_t *target = bank->target;
u32 glbctrl, fmbac2, orig_fmregopt, fmbsea, fmbseb, fmmaxpp, fmmstat;
{
target_t *target = bank->target;
u32 glbctrl, fmbac2, orig_fmregopt, fmbsea, fmbseb, fmmaxpp, fmmstat;
- int i, result = ERROR_OK;
+ int result = ERROR_OK;
+ u32 i;
if (target->state != TARGET_HALTED)
{
if (target->state != TARGET_HALTED)
{
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)