Compilation Error C32

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
nkigen

Compilation Error C32

Post by nkigen »

Hi,
I get the following error when I im compiling my project.
CPP eecfg.c
In file included from /opt/microchip/xc32/v1.21/bin/../lib/gcc/pic32mx/4.5.2/../../../../pic32mx/include/sys/appio.h:40:0,
from /opt/microchip/xc32/v1.21/bin/../lib/gcc/pic32mx/4.5.2/../../../../pic32mx/include/xc.h:481,
from ./frommchp/p32xxxx.h:5,
from ./ee_pic32regs.h:2,
from /home/nkigen/eclipse/plugins/com.eu.evidence.ee_2.1.0.20130515_1217/ee_files/pkg/cpu/pic32/inc/ee_cpu.h:6,
from /home/nkigen/eclipse/plugins/com.eu.evidence.ee_2.1.0.20130515_1217/ee_files/pkg/ee.h:112,
from eecfg.c:1:
/opt/microchip/xc32/v1.21/bin/../lib/gcc/pic32mx/4.5.2/../../../../pic32mx/include/stdio.h:140:58: error: expected ';', ',' or ')' before numeric constant
make: *** [obj/eecfg.o] Error 1

I am using c32 compiler ver. 1.41. and im trying to compile code for PIC32MX795F512L on an EXPLORE16 board. I am also using the latest version of ERIKA
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Compilation Error C32

Post by paolo.gai »

Hi,

This is quite strange as the error you reported seems to be in one of the internal files distributed with the c32 compiler.

Does the PIC32 examples we distribute compile as is on your machine?

PJ
nkigen

Re: Compilation Error C32

Post by nkigen »

Yes, I tried the examples and they compile and work fine.
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Compilation Error C32

Post by paolo.gai »

So it means there is something strange in the eecfg.h.

Did you use reserved keywords as names for tasks, resources, .... ? they may end up in #defines making problems in the include file later on...

PJ
nkigen

Re: Compilation Error C32

Post by nkigen »

Is count a reserved word? I had used count as the name for the Counter but I have changed it to another name and it compiles fine now.
Thanks.
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Compilation Error C32

Post by paolo.gai »

It should not be a reserved word of the C language.

but note that names in OIL are translated to #defines. if you had another "count" in one of the files then it would have been substituted with a number... then the problem...

PJ
Locked