diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-08 16:27:50 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-08 16:27:50 +0000 |
commit | a4ed84817116c473f398889ed3b54851a1e25a08 (patch) | |
tree | e05f8cdb726e1a8c52825681fa5bc0192b3ef30c | |
parent | eabb49b570290f2bcda80a0c591431b7ef240d43 (diff) | |
download | openocd_libswd-a4ed84817116c473f398889ed3b54851a1e25a08.tar.gz openocd_libswd-a4ed84817116c473f398889ed3b54851a1e25a08.tar.bz2 openocd_libswd-a4ed84817116c473f398889ed3b54851a1e25a08.tar.xz openocd_libswd-a4ed84817116c473f398889ed3b54851a1e25a08.zip |
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
-rw-r--r-- | src/flash/cfi.c | 4 | ||||
-rw-r--r-- | src/flash/ecos.c | 5 | ||||
-rw-r--r-- | src/flash/flash.c | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c index 3d830709..9c1910e5 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -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; } diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 8b64b2d7..b771d694 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -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; diff --git a/src/flash/flash.c b/src/flash/flash.c index 850dcd4c..46606d2d 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -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) { |