Debug Session Unexpected Halts Execution

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debug Session Unexpected Halts Execution

跳至解决方案
2,395 次查看
jimfell
Contributor III

My CodeWarrior 10.2 project unexepectly halts execution when in a debug session.  The message I see in the Debug pane states, "Thread [ID: 0x0] (Suspended: Signal 'Halt' received.  Description: User halted thread.)"  I did not halt target execution, so I don't know what it's talking about.  It doesn't give me any other meaningful information.  I'm new to CodeWarrior/Eclipse, so there's probably something obvious that I'm overlooking.  My target code is running version 4.0.2 of the Freescale USB stack, if that makes any difference.

 

I've attached a few screen captures.  It seems to randomly halt in different locations.  Any insight or suggestions would be appreciated.  Thanks.

 

2675_2675.jpgcapture.jpg

 

2676_2676.jpgcapture2.jpg

 

2677_2677.jpgcapture3.jpg

 

2678_2678.jpgcapture4.jpg

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,225 次查看
jimfell
Contributor III

I think that I've been able to resolve the problem.  It's a bit complicated, but it seems that I was doing several things incorrectly. Thanks again!

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,225 次查看
BlackNight
NXP Employee
NXP Employee

Hello,

unfortunately your screenshots have been compressed/blurred to the point that they are not really readable any more.

Looks like your CPU has been halted, and that might have multiple reasons, including an access error.

You could try to enable loggin in the connection settings:

2679_2679.png

that way you get more information.

You find that setting in your Launch/Debug Configuration, then press 'Edit' on the Connection in the 'Main' tab.

Hope this helps,

Erich

0 项奖励
回复
1,226 次查看
jimfell
Contributor III

I think that I've been able to resolve the problem.  It's a bit complicated, but it seems that I was doing several things incorrectly. Thanks again!

0 项奖励
回复
1,225 次查看
jimfell
Contributor III

I've been able to narrow this problem down a bit.  It seems that the USB stack (as CDC) fails to transmit.  I've traced the problem to the USB_DCI_Validate_Param primitive:

static uint_8 USB_DCI_Validate_Param (
    uint_8 ep_num,     /* [IN] Endpoint Number */
    uint_8 direction,  /* [IN] Endpoint direction */
    boolean odd        /* [IN] Odd or even buffer */
)
{
    /* Get bdt index mapped to endpoint number-direction and odd/even buffer */
    uint_8 bdt_index = USB_DCI_Get_BDT_Index(ep_num, direction, odd);

    if((bdt_index  != INVALID_BDT_INDEX) &&
        (g_bdt_elem[TRANSFER_INDEX(bdt_index)].len ==
        (uint_16)UNINITIALISED_VAL))
    {  
        /* Incase length in bdt_elem is uninitialised return invalid index */
        bdt_index = INVALID_BDT_INDEX;
    }
    return bdt_index;
}

It fails when checking the index length:

(g_bdt_elem[TRANSFER_INDEX(bdt_index)].len ==
        (uint_16)UNINITIALISED_VAL)

... to return INVALID_BDT_INDEX.

Any insight you can provide would be appreciated.  Thanks.

0 项奖励
回复
1,225 次查看
jimfell
Contributor III

Hi Erich.  I enabled logging, per your suggestion.  Where do I find the additional debugging information?  Thanks.

0 项奖励
回复