简单写一段创建进程的测试代码:
#include <freertos.h>
#include <task.h>
#include <gd32f10x.h>
//#include "stm32f10x_conf.h"
TaskHandle_t test1_hdl;
void test1(void *pvPara)
{
while (1)
{
vTaskDelay(500);
}
}
int main()
{
taskENTER_CRITICAL();
xTaskCreate(
(TaskFunction_t) test1,
"test1",
256,
(void *)NULL,
1,
&test1_hdl
);
taskEXIT_CRITICAL();
vTaskStartScheduler();
while (1);
}
|