fix BUG: keep_alive() error messages
git-svn-id: svn://svn.berlios.de/openocd/trunk@949 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "arm926ejs.h"
|
||||
#include "jtag.h"
|
||||
#include "log.h"
|
||||
#include "time_support.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -579,11 +580,12 @@ int arm926ejs_soft_reset_halt(struct target_s *target)
|
||||
arm9tdmi_common_t *arm9tdmi = arm7_9->arch_info;
|
||||
arm926ejs_common_t *arm926ejs = arm9tdmi->arch_info;
|
||||
reg_t *dbg_stat = &arm7_9->eice_cache->reg_list[EICE_DBG_STAT];
|
||||
int i;
|
||||
|
||||
target_halt(target);
|
||||
|
||||
for (i=0; i<10; i++)
|
||||
long long then=timeval_ms();
|
||||
int timeout;
|
||||
while (!(timeout=((timeval_ms()-then)>1000)))
|
||||
{
|
||||
if (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1) == 0)
|
||||
{
|
||||
@@ -593,10 +595,16 @@ int arm926ejs_soft_reset_halt(struct target_s *target)
|
||||
{
|
||||
break;
|
||||
}
|
||||
/* do not eat all CPU, time out after 1 se*/
|
||||
alive_sleep(100);
|
||||
if (debug_level>=1)
|
||||
{
|
||||
/* do not eat all CPU, time out after 1 se*/
|
||||
alive_sleep(100);
|
||||
} else
|
||||
{
|
||||
keep_alive();
|
||||
}
|
||||
}
|
||||
if (i==10)
|
||||
if (timeout)
|
||||
{
|
||||
LOG_ERROR("Failed to halt CPU after 1 sec");
|
||||
return ERROR_TARGET_TIMEOUT;
|
||||
|
||||
Reference in New Issue
Block a user