Debug Session Unexpected Halts Execution

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debug Session Unexpected Halts Execution

ソリューションへジャンプ
2,457件の閲覧回数
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,287件の閲覧回数
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,287件の閲覧回数
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,288件の閲覧回数
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,287件の閲覧回数
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,287件の閲覧回数
jimfell
Contributor III

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

0 件の賞賛
返信