ucos-ii为什么无法进入任务
#define GLOBALS
#include "stdarg.h"
#include "includes.h"
#include "globals.h"
#define TASK_STK_SIZE 512
void MyTask(void *pdata);
OS_STK MyTaskStk[TASK_STK_SIZE];
OS_STK YouTaskStk[TASK_STK_SIZE];
void GPIO_Configuration(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB , ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
}
void SysTickInit(void)
{
//every msec got int
if (SysTick_Config(SystemCoreClock / OS_TICKS_PER_SEC))
{
/* Capture error */
while (1);
}
}
int main(void)
{
GPIO_Configuration();
SysTickInit();
OSInit();
OSTaskCreate(
MyTask,
(void *)0,
&MyTaskStk[TASK_STK_SIZE-1],
0);
GPIO_SetBits(GPIOB,GPIO_Pin_5);
OSStart();
}
void MyTask(void* pdata)
{
#if OS_CRITICAL_METHOD==3
OS_CPU_SR cpu_sr;
#endif
pdata=pdata;
OSStatInit();
for(;;)
{
GPIO_ResetBits(GPIOB,GPIO_Pin_5);
OSTimeDlyHMSM(0,0,1,0);
GPIO_SetBits(GPIOB,GPIO_Pin_5);
OSTimeDlyHMSM(0,0,1,0);
}
}
OSStart(); 单步执行到这个函数之后,就没办法继续单步执行了,问题出在哪里?