CCS5.3中通过Task_create创建线程
#include
#include
#include
#include
#define G_TSK_SIZE (32*1024)
#pragma DATA_ALIGN(gtskStack, 32)
#pragma DATA_SECTION(gtskStack, ".bss:taskStackSection")
UInt8 gtskStack[G_TSK_SIZE];
void main()
{
Task_Handle task;
Task_Params myParams;
//Error_Block eb;
//Error_init(&eb);
Task_Params_init(&myParams);
myParams.stack = gtskStack;
myParams.stackSize = 32*1024;
Clock_tickStart();
task = Task_create(&mainTask, &myParams, NULL/*&eb*/);
if (task == NULL)
{
printf("Task_create() failed!
");
BIOS_exit(0);
}
//===============================================
BIOS_start();
}