Commit 330cf5a6 authored by oharboe's avatar oharboe
Browse files

fixed not halted error messages

git-svn-id: svn://svn.berlios.de/openocd/trunk@925 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent c1683a55
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment