问题:
(sem != RT_NULL) assertion failed at function:rt_sem_take, line number:333
定位:
找到rt_sem_take函数里的RT_ASSERT(sem != RT_NULL);语句
在上面加一个sem == RT_NULL判断,并在判断语句里打个断点
if(sem == RT_NULL){
rt_kprintf("qiaonima\r\n"); //此处打断点return RT_ERROR;}RT_ASSERT(sem != RT_NULL);
debug调试,然后在断点处step out就可以找到问题来源
ret = rt_sem_take(*sem, t);
就是这小子