Browse Source

fixed not halted error messages

git-svn-id: svn://svn.berlios.de/openocd/trunk@925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
tags/v0.1.0
oharboe 15 years ago
parent
commit
330cf5a6bb
12 changed files with 56 additions and 4 deletions
  1. +5
    -0
      src/flash/at91sam7.c
  2. +7
    -0
      src/flash/cfi.c
  3. +2
    -0
      src/flash/flash.c
  4. +4
    -0
      src/flash/lpc2000.c
  5. +2
    -0
      src/flash/lpc288x.c
  6. +6
    -0
      src/flash/stellaris.c
  7. +10
    -0
      src/flash/stm32x.c
  8. +5
    -0
      src/flash/str7x.c
  9. +5
    -0
      src/flash/str9x.c
  10. +5
    -0
      src/flash/tms470.c
  11. +4
    -4
      src/target/arm11.c
  12. +1
    -0
      src/target/armv4_5.c

+ 5
- 0
src/flash/at91sam7.c View File

@@ -588,6 +588,7 @@ int at91sam7_protect_check(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -636,6 +637,7 @@ int at91sam7_erase(struct flash_bank_s *bank, int first, int last)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -679,6 +681,7 @@ int at91sam7_protect(struct flash_bank_s *bank, int set, int first, int last)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -728,6 +731,7 @@ int at91sam7_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -795,6 +799,7 @@ int at91sam7_probe(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}



+ 7
- 0
src/flash/cfi.c View File

@@ -747,6 +747,7 @@ int cfi_erase(struct flash_bank_s *bank, int first, int last)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -878,6 +879,7 @@ int cfi_protect(struct flash_bank_s *bank, int set, int first, int last)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -1649,7 +1651,10 @@ int cfi_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
int retval;

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

if (offset + count > bank->size)
return ERROR_FLASH_DST_OUT_OF_BANK;
@@ -1877,6 +1882,7 @@ int cfi_probe(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -2175,6 +2181,7 @@ int cfi_protect_check(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}



+ 2
- 0
src/flash/flash.c View File

@@ -1119,6 +1119,7 @@ int default_flash_mem_blank_check(struct flash_bank_s *bank)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -1165,6 +1166,7 @@ int default_flash_blank_check(struct flash_bank_s *bank)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 4
- 0
src/flash/lpc2000.c View File

@@ -418,6 +418,7 @@ int lpc2000_erase(struct flash_bank_s *bank, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -484,6 +485,7 @@ int lpc2000_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -641,6 +643,7 @@ int lpc2000_erase_check(struct flash_bank_s *bank)
{
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -683,6 +686,7 @@ int lpc2000_handle_part_id_command(struct command_context_s *cmd_ctx, char *cmd,

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 2
- 0
src/flash/lpc288x.c View File

@@ -270,6 +270,7 @@ u32 lpc288x_system_ready(struct flash_bank_s *bank)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
return ERROR_OK;
@@ -456,6 +457,7 @@ int lpc288x_probe(struct flash_bank_s *bank)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 6
- 0
src/flash/stellaris.c View File

@@ -520,6 +520,7 @@ int stellaris_protect_check(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -549,6 +550,7 @@ int stellaris_erase(struct flash_bank_s *bank, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -619,6 +621,7 @@ int stellaris_protect(struct flash_bank_s *bank, int set, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -814,6 +817,7 @@ int stellaris_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -915,6 +919,7 @@ int stellaris_probe(struct flash_bank_s *bank)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -941,6 +946,7 @@ int stellaris_mass_erase(struct flash_bank_s *bank)
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 10
- 0
src/flash/stm32x.c View File

@@ -293,6 +293,7 @@ int stm32x_protect_check(struct flash_bank_s *bank)
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -359,6 +360,7 @@ int stm32x_erase(struct flash_bank_s *bank, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -404,6 +406,7 @@ int stm32x_protect(struct flash_bank_s *bank, int set, int first, int last)
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -596,6 +599,7 @@ int stm32x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -691,6 +695,7 @@ int stm32x_probe(struct flash_bank_s *bank)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -872,6 +877,7 @@ int stm32x_handle_lock_command(struct command_context_s *cmd_ctx, char *cmd, cha
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -920,6 +926,7 @@ int stm32x_handle_unlock_command(struct command_context_s *cmd_ctx, char *cmd, c
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -966,6 +973,7 @@ int stm32x_handle_options_read_command(struct command_context_s *cmd_ctx, char *
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -1024,6 +1032,7 @@ int stm32x_handle_options_write_command(struct command_context_s *cmd_ctx, char
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -1080,6 +1089,7 @@ int stm32x_mass_erase(struct flash_bank_s *bank)
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 5
- 0
src/flash/str7x.c View File

@@ -230,6 +230,7 @@ int str7x_protect_check(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -258,6 +259,7 @@ int str7x_erase(struct flash_bank_s *bank, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -309,6 +311,7 @@ int str7x_protect(struct flash_bank_s *bank, int set, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -481,6 +484,7 @@ int str7x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -671,6 +675,7 @@ int str7x_handle_disable_jtag_command(struct command_context_s *cmd_ctx, char *c
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 5
- 0
src/flash/str9x.c View File

@@ -192,6 +192,7 @@ int str9x_protect_check(struct flash_bank_s *bank)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -243,6 +244,7 @@ int str9x_erase(struct flash_bank_s *bank, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -308,6 +310,7 @@ int str9x_protect(struct flash_bank_s *bank, int set, int first, int last)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}
@@ -459,6 +462,7 @@ int str9x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count)
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -626,6 +630,7 @@ int str9x_handle_flash_config_command(struct command_context_s *cmd_ctx, char *c
if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


+ 5
- 0
src/flash/tms470.c View File

@@ -774,6 +774,7 @@ int tms470_erase(struct flash_bank_s *bank, int first, int last)

if (bank->target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -822,6 +823,7 @@ int tms470_protect(struct flash_bank_s *bank, int set, int first, int last)

if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -872,6 +874,7 @@ int tms470_write(struct flash_bank_s *bank, u8 * buffer, u32 offset, u32 count)

if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -992,6 +995,7 @@ int tms470_erase_check(struct flash_bank_s *bank)

if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

@@ -1081,6 +1085,7 @@ int tms470_protect_check(struct flash_bank_s *bank)

if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}



+ 4
- 4
src/target/arm11.c View File

@@ -783,10 +783,10 @@ int arm11_resume(struct target_s *target, int current, u32 address, int handle_b
LOG_DEBUG("target->state: %s", target_state_strings[target->state]);

if (target->state != TARGET_HALTED)
{
LOG_WARNING("target was not halted");
return ERROR_TARGET_NOT_HALTED;
}
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}

if (!current)
R(PC) = address;


+ 1
- 0
src/target/armv4_5.c View File

@@ -181,6 +181,7 @@ int armv4_5_get_core_reg(reg_t *reg)
if (target->state != TARGET_HALTED)
{
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
}


Loading…
Cancel
Save