Compilation Error C32

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
nkigen
Newbie
Posts: 6
Joined: Fri Oct 26, 2012 5:47 pm

Compilation Error C32

Post by nkigen » Tue Aug 06, 2013 11:57 am

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: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Compilation Error C32

Post by paolo.gai » Tue Aug 06, 2013 12:59 pm

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
Newbie
Posts: 6
Joined: Fri Oct 26, 2012 5:47 pm

Re: Compilation Error C32

Post by nkigen » Wed Aug 07, 2013 6:31 am

Yes, I tried the examples and they compile and work fine.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Compilation Error C32

Post by paolo.gai » Wed Aug 07, 2013 7:38 am

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
Newbie
Posts: 6
Joined: Fri Oct 26, 2012 5:47 pm

Re: Compilation Error C32

Post by nkigen » Thu Aug 08, 2013 11:45 am

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: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Compilation Error C32

Post by paolo.gai » Fri Aug 16, 2013 1:21 pm

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

Post Reply