Task definitin ERROR!!!

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
findfrienda

Task definitin ERROR!!!

Post by findfrienda »

Hi, dear all,
I fond an error,while I try to compile the source code. The error is :
./src/code.c:79: error: [11703] syntax error before numeric constant

The source code is as follows:

Code: Select all

....
TASK(Task1)
{
    EE_hal_disableIRQ();
    for (int i = 0; i < 8; i++) {
        delay(100);
        led_off(i);
    }
    num = 0;
    EE_hal_enableIRQ();
}
...

int main() 
{
    led_init();

    /* Implement Alarms with either cmp0 or cmp1 */
    //EE_tc179x_stm_cmp0_init(STM_VECTOR, STM_TIM0.reg + 10000);

    ActivateTask(Task1);

    while(1);

    return 0;
}
So, I wan to know how to define a task in ERIKA? By the way, the codes above is the source code.

Can someone give me some instructions?

Thanks!
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Task definitin ERROR!!!

Post by paolo.gai »

Did you define the task in the OIL file?

Please start from an example which works. There are plenty with the distribution of the kernel.

PJ
findfrienda

Re: Task definitin ERROR!!!

Post by findfrienda »

Dear Paolo,
I didn't define the task by the OIL file, now, I didn't master the OIL usage. Next, I will try it.

By the way, it seems that Erika's project setting is based on Linux, however, now I used the HighTec's toolchain on Windows. So, it's not easy to configure the environment.

I try!

Thanks!
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Task definitin ERROR!!!

Post by paolo.gai »

The compilers which are supported are listed in the Wiki pages for each architecture!

PJ
findfrienda

Re: Task definitin ERROR!!!

Post by findfrienda »

Hi,Dear paolo,

Now, I met a problem when I compile the project:
This is the makefile content:

Code: Select all

    ....
   include $(EEBASE)/pkg/cfg/rules.mk 
    ...
Console output is :

Code: Select all

     cygpath: cannot create short name of `cygpath
     makefile:103: /pkg/cfg/rules.mk: No such file or directory
     C:\TriCoreTools\HIGHTEC\TRICORE\bin\make.exe: *** No rule to make target `/pkg/cfg/rules.mk'.  Stop.
Can you find info from the Console Output?
If so, where is the wrong?

Wy there is no rules.mk(/pkg/cfg/rules.mk)? Does it come from the CodeBase or generation from my project?
I was amused!!! :-[

Thanks!
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Task definitin ERROR!!!

Post by paolo.gai »

I guess EEBASE is not defined in your environment. Please check that. Either it is in the makefile, or you should define it from the command shell.

PJ
nicola.serreli

Re: Task definitin ERROR!!!

Post by nicola.serreli »

Please, note that EEBASE is intended to be used only inside erika makefiles, while ERIKA_FILES is the variable to set in the environment. (of course, this is true if you are using RT-Druid configuration with standard makefiles).

See more information at Regards,
Nicola
Locked