Are you sure the patch is correct?
I've tinkered with your changes and created a patch.
--
Øyvind Harboe
Embedded software and hardware consulting services
http://consulting.zylin.com
Index: C:/workspace/openocd/src/flash/avrf.c
===================================================================
--- C:/workspace/openocd/src/flash/avrf.c (revision 1547)
+++ C:/workspace/openocd/src/flash/avrf.c (working copy)
@@ -313,7 +313,7 @@
target_t *target = bank->target;
avrf_flash_bank_t *avrf_info = bank->driver_priv;
avr_common_t *avr = target->arch_info;
- avrf_type_t *avr_info;
+ avrf_type_t *avr_info = NULL;
int i;
u32 device_id;
@@ -347,7 +347,7 @@
}
}
- if (i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])))
+ if (avr_info != NULL)
{
// chip found
bank->base = 0x00000000;
@@ -394,7 +394,7 @@
{
target_t *target = bank->target;
avr_common_t *avr = target->arch_info;
- avrf_type_t *avr_info;
+ avrf_type_t *avr_info = NULL;
int i;
u32 device_id;
@@ -423,11 +423,11 @@
avr_info = &avft_chips_info[i];
LOG_INFO("target device is %s", avr_info->name);
- return ERROR_OK;
+ break;
}
}
- if (i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])))
+ if (avr_info != NULL)
{
// chip found
snprintf(buf, buf_size, "%s - Rev: 0x%X", avr_info->name,
EXTRACT_VER(device_id));
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development