]> git.sur5r.net Git - openocd/commitdiff
fixed not halted error messages
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 17 Aug 2008 19:40:17 +0000 (19:40 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 17 Aug 2008 19:40:17 +0000 (19:40 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@925 b42882b7-edfa-0310-969c-e2dbd0fdcd60

12 files changed:
src/flash/at91sam7.c
src/flash/cfi.c
src/flash/flash.c
src/flash/lpc2000.c
src/flash/lpc288x.c
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/str7x.c
src/flash/str9x.c
src/flash/tms470.c
src/target/arm11.c
src/target/armv4_5.c

index 7aba6db44d638754956361893911e67095d3b6f9..8c73601cda824135cd045f2aebc1a75c3aff1199 100644 (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;
        }
 
index 5f64e1161b3bcfa78e5dd5cfc0941688bfb82faa..68f9a0adf41f056ed7febe08af8c316a12c5e222 100644 (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;
        }
 
index 5193ce9a1e7bfab77b8c90cd84e2c950eb327472..9178ff9c68a309ed371e9a4c30dca21ded4ccbd2 100644 (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;
        }
                
index 7a82a720fe29f4721baab2bdc529b1519b5d9597..f449380e04d3ffc5dca8e43e481c889b3f55ea2c 100644 (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;
        }
        
index 09f4be85881e5df6ae799920f27910e96bc8ee43..3e22dd56cbb930c664aefa25432019d3f5eb0343 100644 (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;
        }
        
index c4bc4dce53690f698433798ca91595cf80eedad7..fa9445195200d3a57be37c5a6949babacede512f 100644 (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;
        }
        
index 4b25e74cacf1ced0269f49b74ebbe273e436b89b..4a0dc4346eea741cf30bac4c633fbc784b158182 100644 (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;
        }
        
index facd873d600a23e561a994b2c951c7a1ee29b514..797fe2bc52b38a7c898831aa54d12ec5c6df9ef9 100644 (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;
        }
        
index 7468c3fb8d2a8982c887eba2eb1c7a273bd0716e..5e28d30789c904f8665ffc18766696674b50440f 100644 (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;
        }
        
index f74f3ffca0501462659dbb671d76a790d8c83c79..f9d8cd79da0f7b5776d7a3553fc02e6e2cf47081 100644 (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;
        }
 
index 7c947fc2e7ce5ce98d90f915d5fe5467905b19c3..cc584c382e294efe93a0f4ee9ba78ec692b92914 100644 (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;
index e546e404d46c0a0e9422240ac32f0f1d5e9f931f..ac73c56716a5296d79446f0d3731e7d5f20f1941 100644 (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;
        }