uint32_t ext_freq;
uint32_t bank_size;
uint32_t base_address = 0;
- char *target_name = "Unknown";
+ char *target_name_t = "Unknown";
at91sam7_info = t_bank->driver_priv;
if (arch == 0x70)
{
num_nvmbits = 2;
- target_name = "AT91SAM7S161/16";
+ target_name_t = "AT91SAM7S161/16";
}
break;
if (arch == 0x70)
{
num_nvmbits = 2;
- target_name = "AT91SAM7S321/32";
+ target_name_t = "AT91SAM7S321/32";
}
if (arch == 0x72)
{
num_nvmbits = 3;
- target_name = "AT91SAM7SE32";
+ target_name_t = "AT91SAM7SE32";
}
break;
if (arch == 0x70)
{
num_nvmbits = 2;
- target_name = "AT91SAM7S64";
+ target_name_t = "AT91SAM7S64";
}
break;
if (arch == 0x70)
{
num_nvmbits = 2;
- target_name = "AT91SAM7S128";
+ target_name_t = "AT91SAM7S128";
}
if (arch == 0x71)
{
num_nvmbits = 3;
- target_name = "AT91SAM7XC128";
+ target_name_t = "AT91SAM7XC128";
}
if (arch == 0x72)
{
num_nvmbits = 3;
- target_name = "AT91SAM7SE128";
+ target_name_t = "AT91SAM7SE128";
}
if (arch == 0x75)
{
num_nvmbits = 3;
- target_name = "AT91SAM7X128";
+ target_name_t = "AT91SAM7X128";
}
break;
if (arch == 0x60)
{
num_nvmbits = 3;
- target_name = "AT91SAM7A3";
+ target_name_t = "AT91SAM7A3";
}
if (arch == 0x70)
{
num_nvmbits = 2;
- target_name = "AT91SAM7S256";
+ target_name_t = "AT91SAM7S256";
}
if (arch == 0x71)
{
num_nvmbits = 3;
- target_name = "AT91SAM7XC256";
+ target_name_t = "AT91SAM7XC256";
}
if (arch == 0x72)
{
num_nvmbits = 3;
- target_name = "AT91SAM7SE256";
+ target_name_t = "AT91SAM7SE256";
}
if (arch == 0x75)
{
num_nvmbits = 3;
- target_name = "AT91SAM7X256";
+ target_name_t = "AT91SAM7X256";
}
break;
if (arch == 0x70)
{
num_nvmbits = 2;
- target_name = "AT91SAM7S512";
+ target_name_t = "AT91SAM7S512";
}
if (arch == 0x71)
{
num_nvmbits = 3;
- target_name = "AT91SAM7XC512";
+ target_name_t = "AT91SAM7XC512";
}
if (arch == 0x72)
{
num_nvmbits = 3;
- target_name = "AT91SAM7SE512";
+ target_name_t = "AT91SAM7SE512";
}
if (arch == 0x75)
{
num_nvmbits = 3;
- target_name = "AT91SAM7X512";
+ target_name_t = "AT91SAM7X512";
}
break;
break;
}
- if (strcmp(target_name, "Unknown") == 0)
+ if (strcmp(target_name_t, "Unknown") == 0)
{
LOG_ERROR("Target autodetection failed! Please specify target parameters in configuration file");
return ERROR_FLASH_OPERATION_FAILED;
at91sam7_info->cidr_eproc = (cidr >> 5)&0x0007;
at91sam7_info->cidr_version = cidr&0x001F;
- at91sam7_info->target_name = target_name;
+ at91sam7_info->target_name = target_name_t;
at91sam7_info->flashmode = 0;
at91sam7_info->ext_freq = ext_freq;
at91sam7_info->num_nvmbits = num_nvmbits;
uint16_t page_size;
uint16_t num_nvmbits;
- char *target_name;
+ char *target_name_t;
int bnk, sec;
return ERROR_OK;
}
- target_name = calloc(strlen(CMD_ARGV[7]) + 1, sizeof(char));
- strcpy(target_name, CMD_ARGV[7]);
+ target_name_t = calloc(strlen(CMD_ARGV[7]) + 1, sizeof(char));
+ strcpy(target_name_t, CMD_ARGV[7]);
/* calculate bank size */
bank_size = num_sectors * pages_per_sector * page_size;
at91sam7_info = t_bank->driver_priv;
- at91sam7_info->target_name = target_name;
+ at91sam7_info->target_name = target_name_t;
at91sam7_info->flashmode = 0;
at91sam7_info->ext_freq = ext_freq;
at91sam7_info->num_nvmbits = num_nvmbits;
return ERROR_OK;
}
-static int at91sam7_info(struct flash_bank *bank, char *buf, int buf_size)
+static int get_at91sam7_info(struct flash_bank *bank, char *buf, int buf_size)
{
int printed;
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
.auto_probe = at91sam7_probe,
.erase_check = at91sam7_erase_check,
.protect_check = at91sam7_protect_check,
- .info = at91sam7_info,
+ .info = get_at91sam7_info,
};