我是靠谱客的博主 拼搏鸵鸟,这篇文章主要介绍LWIP调试BUG 解决“tcpip_thread: invalid message“ failed at line 146 in ..\LWIP\lwip-1.4.1\src\api\tcpip.c,现在分享给大家,希望可以做个参考。

LWIP调试中BUG"tcpip_thread: invalid message" failed at line 146 in …LWIPlwip-1.4.1srcapitcpip.c

问题的根本原因是sys_arch_mbox_fetch函数的问题,请看已经测试过的代码。
这里OS_TIMEOUT必须等于-1,不然,如题的问题继续出现,你品,你细品!

u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
{ 
	u8_t ucErr;
	u32_t ucos_timeout;

	sys_mbox_t m_box=*mbox;
	
	if(msg!= NULL)
	{
		*msg =OSQPend(m_box->pQ,(u16_t)ucos_timeout,&ucErr);
	}
	else
	{
		OSQPend(m_box->pQ,(u16_t)ucos_timeout,&ucErr);
	}
	if(ucErr == (u8_t)OS_TIMEOUT)
	{
		timeout=SYS_ARCH_TIMEOUT;
	}
	else
	{
		if(*msg==(void*)&pvNullPointer)*msg = NULL;
		timeout =(ucos_timeout-ucErr)*(1000/OS_TICKS_PER_SEC);
	}
	return timeout; 
}

最后

以上就是拼搏鸵鸟最近收集整理的关于LWIP调试BUG 解决“tcpip_thread: invalid message“ failed at line 146 in ..\LWIP\lwip-1.4.1\src\api\tcpip.c的全部内容,更多相关LWIP调试BUG内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(210)

评论列表共有 0 条评论

立即
投稿
返回
顶部