Hello,
I have the following code:
#include <std.h>
#include <stdio.h>
#include <log.h>
#include <tsk.h>
#include "Configuration1cfg.h"
void Task1(Arg arg1);
void main()
{
TSK_Handle task;
TSK_Attrs Attr;
printf("program started\n");
Attr= TSK_ATTRS;
Attr.priority=15;
Attr.stacksize=1024;
task=TSK_create((Fxn)Task1,&Attr);
}
void Task1(Arg arg1)
{
int i;
for(i=0;i<100;i++)
{
printf("In task %d\n",i);
}
}
But it doesn't create the task dynamically. TSK_create returns a null handle and the task never calls.
What is the problem and how can I solve it? Is there any sample on how to create a task dynamically?
Please note that I create the task statically then the program works.
Best regards