Page 1 of 1

About the task's running question.

Posted: Fri Feb 01, 2013 8:50 am
by findfrienda
Hi,Dear,
Now, I wrote a LED Demo based on ERIKA:A task to turn/off the LED Light.
(1)The task handle:

Code: Select all

 TASK(Task1)
 {
    while(1) {
    	int i = 0;
        for ( ; i < 8; i++) {
            if (num & (1 << i))
                led_on(i);
            else 
                led_off(i);
        }
    }
}
(2).The main function:

Code: Select all

int main() 
{
    led_init();
    ActivateTask(Task1);
    while(1);
    return 0;
}
(3).The related configuration of kernel in eecfg.h

Code: Select all

#define __RTD_CYGWIN__
#define __TRICORE1__
#define __TRICORE_GNU__
#define __TC1796__
#define __TC13__
#define __INT__
#define __TRAP__
#define __FP__
#define __MONO__
#define __FP_NO_RESOURCE__
However, when I run the code and set a breakpoint in the task handle's while statement, I found the code wasn't executed.

So,My question:
When we call ActiveTask to active a task, wy the its code wasn't executed?

Thanks!

Re: About the task's running question.

Posted: Fri Feb 01, 2013 9:10 am
by paolo.gai
There is no reason why it does not work. Just execute the ActivateTask step by step and you'll discover what is happening. It could be some kind of error reported. Maybe the Task is not specified in the OIL file?

PJ