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.
解決済! 解決策の投稿を見る。
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!
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:
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
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!
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.
Hi Erich. I enabled logging, per your suggestion. Where do I find the additional debugging information? Thanks.