FreeRtos一直进入SVC_Handler中断,不运行

张开发
2026/4/19 23:34:12 15 分钟阅读

分享文章

FreeRtos一直进入SVC_Handler中断,不运行
今天在GD32平台移植FreeRtos之后程序一直不运行debug一看卡在了SVC_Handler解决方法1.注释掉gd32f4xx_it.c里面的三个函数头文件声明也要注释掉/*! \brief this function handles SVC exception \param[in] none \param[out] none \retval none */ //void SVC_Handler(void) //{ // /* if SVC exception occurs, go to infinite loop */ // while(1) { // } //} /*! \brief this function handles PendSV exception \param[in] none \param[out] none \retval none */ //void PendSV_Handler(void) //{ // /* if PendSV exception occurs, go to infinite loop */ // while(1) { // } //} ///*! // \brief this function handles SysTick exception // \param[in] none // \param[out] none // \retval none //*/ //void SysTick_Handler(void) //{ //}/* this function handles SVC exception */ //void SVC_Handler(void); /* this function handles DebugMon exception */ void DebugMon_Handler(void); /* this function handles PendSV exception */ void PendSV_Handler(void); ///* this function handles SysTick exception */ //void SysTick_Handler(void);2.在FreeRtos_Config.h文件里面声明让RTOS来接管这三个时间整个系统才能运行#define vPortSVCHandler SVC_Handler #define xPortPendSVHandler PendSV_Handler #define xPortSysTickHandler SysTick_Handler

更多文章