- fixed a minor problem with the GDB server that could drop the first packet (non-fatal)
- fixed some small memory leaks (thanks to Spencer Oliver) - verify chip- and buswidth of cfi flash configurations - added support for ARM966E based systems (tested only with ST micro STR9, thanks to Spencer Oliver) git-svn-id: svn://svn.berlios.de/openocd/trunk@81 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -50,6 +50,7 @@ int cfi_info(struct flash_bank_s *bank, char *buf, int buf_size);
|
||||
int cfi_handle_part_id_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
|
||||
|
||||
#define CFI_MAX_BUS_WIDTH 4
|
||||
#define CFI_MAX_CHIP_WIDTH 4
|
||||
|
||||
flash_driver_t cfi_flash =
|
||||
{
|
||||
@@ -335,6 +336,13 @@ int cfi_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **
|
||||
return ERROR_FLASH_BANK_INVALID;
|
||||
}
|
||||
|
||||
if ((strtoul(args[4], NULL, 0) > CFI_MAX_CHIP_WIDTH)
|
||||
|| (strtoul(args[3], NULL, 0) > CFI_MAX_BUS_WIDTH))
|
||||
{
|
||||
ERROR("chip and bus width have to specified in byte");
|
||||
return ERROR_FLASH_BANK_INVALID;
|
||||
}
|
||||
|
||||
cfi_info = malloc(sizeof(cfi_flash_bank_t));
|
||||
bank->driver_priv = cfi_info;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user