STM32F7移植FreeRTOS在Systick中断内Hard_Fault

2019-07-20 17:06发布

STM32F7移植FreeRTOS在Systick中断内Hard_Fault
一步步溯源,发现是在task.c中
过程
[mw_shl_code=c,true]BaseType_t xTaskIncrementTick( void )[/mw_shl_code]
里面的这一条语句
[mw_shl_code=c,true]/* The delayed list is not empty, get the value of the
                                        item at the head of the delayed list.  This is the time
                                        at which the task at the head of the delayed list must
                                        be removed from the Blocked state. */
                                        pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList );[/mw_shl_code]
执行到这一条,下一步就直接HardFault了
请问大神这如何解决?我觉得好像是因为pxDelayedTaskList未定义所致,但是既然pxDelayedTaskList未定义,为什么又会执行到这里来?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
2条回答
问题找到了,不过好久不上线,现在才发。
是配置文件的问题导致Tasklist在没有初始化的情况下被调用导致内存访问越界。
我用的是STM32F7的FreeRTOS官方配置文件,可能是不通用,换了ST官方的配置文件就过了。
正点原子
2楼-- · 2019-07-20 21:20
 精彩回答 2  元偷偷看……

一周热门 更多>