Skip to content
Snippets Groups Projects
Commit a4ed8481 authored by oharboe's avatar oharboe
Browse files

added a couple of LOG_ERROR() messages to improve logfile.

git-svn-id: svn://svn.berlios.de/openocd/trunk@548 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent eabb49b5
No related branches found
No related tags found
No related merge requests found
......@@ -354,6 +354,7 @@ int cfi_read_intel_pri_ext(flash_bank_t *bank)
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
cfi_command(bank, 0xff, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not read bank flash bank information");
return ERROR_FLASH_BANK_INVALID;
}
......@@ -407,6 +408,7 @@ int cfi_read_spansion_pri_ext(flash_bank_t *bank)
{
cfi_command(bank, 0xf0, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not read spansion bank information");
return ERROR_FLASH_BANK_INVALID;
}
......@@ -475,6 +477,7 @@ int cfi_read_atmel_pri_ext(flash_bank_t *bank)
{
cfi_command(bank, 0xf0, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not read atmel bank information");
return ERROR_FLASH_BANK_INVALID;
}
......@@ -1935,6 +1938,7 @@ int cfi_probe(struct flash_bank_s *bank)
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
cfi_command(bank, 0xff, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not probe bank");
return ERROR_FLASH_BANK_INVALID;
}
......
......@@ -195,10 +195,11 @@ int loadDriver(ecosflash_flash_bank_t *info)
image.base_address_set = 0;
image.start_address_set = 0;
target_t *target=info->target;
int retval;
if (image_open(&image, info->driverPath, NULL) != ERROR_OK)
if ((retval=image_open(&image, info->driverPath, NULL)) != ERROR_OK)
{
return ERROR_FLASH_BANK_INVALID;
return retval;
}
info->start_address=image.start_address;
......
......@@ -884,7 +884,10 @@ int flash_erase_address_range(target_t *target, u32 addr, u32 length)
return ERROR_FLASH_DST_OUT_OF_BANK; /* no corresponding bank found */
if (c->size == 0 || c->num_sectors == 0)
{
LOG_ERROR("Bank is invalid");
return ERROR_FLASH_BANK_INVALID;
}
if (length == 0)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment