Hi all,
I'm trying to create a thread in eCos (uitron interface) but it does not
work. I'm new to eCos and uITRON, so I take a exemple and I'm try to
customize it...
Here it my program :
#include <cyg/compat/uitron/uit_func.h>
#include <stdio.h>
void task2(unsigned int a)
{
printf("In function test()\n");
}
int main()
{
ID tid = 2;
T_CTSK thread_attr;
int retval;
printf("In main\n");
thread_attr.stksz = CYGNUM_UITRON_STACK_SIZE;
thread_attr.task = (FP)&task2;
retval = cre_tsk(tid, &thread_attr);
if(retval != E_OK)
{
printf("Error %d !!!\n",retval);
}
else
{
printf(" Good! \n");
}
return 0;
}
When I'm trying to debug it, I always obtain an error. Someone can help me?
PS : Number of task is set to 4 and the number of task which start is
set to 1.
I also modify the option Static Initializers to CYG_UIT_TASK_NOEXS for
task 2,3 and 4
Thank you
Best regards.
David
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss