Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Real Time Clock example for Pinguino32 not compiling
03-11-2011, 11:07 PM,
#1
Real Time Clock example for Pinguino32 not compiling
Having successfully got a few other Examples to compile and upload I thought I would try the Real Time Clock example in examples/10.Libraries/RTCC.

Having successfully dealt with the two undeclared variables (LED1 and RTCC) by RTCC to RTCCpin as the IDE coloured RTCC blue rather than black suggesting that it did not recognise it as a variable and including the following after the declaration of Day and Month:-

Code:
int  LED1         = 13;
int  RTCCpin      =  6;


when I tried to compile the modified program I got the following output :-

Quote:Board: PIC32 Pinguino OTG
Proc: 32MX440F256H
error while linking /home/mark/Pinguino32X_linux-r208/examples/10.Libraries/RTCC/RealTimeClock.o

I am running Ubuntu 11.10, using r208 of the IDE and using a PIC32 Pinguino OTG board.

Any help with understanding the cause and a way round the above error message would be much appreciated.

Mark
Reply
04-11-2011, 10:27 AM,
#2
RE: Real Time Clock example for Pinguino32 not compiling
Hi,
LED1 and RTCC are already define in const.h which is included in main32.c
Don't need to declare it.
However, you're right, there is one mistake, replace Toggle with toggle.
Régis

(03-11-2011, 11:07 PM)mf01 Wrote: Having successfully got a few other Examples to compile and upload I thought I would try the Real Time Clock example in examples/10.Libraries/RTCC.

Having successfully dealt with the two undeclared variables (LED1 and RTCC) by RTCC to RTCCpin as the IDE coloured RTCC blue rather than black suggesting that it did not recognise it as a variable and including the following after the declaration of Day and Month:-

Code:
int  LED1         = 13;
int  RTCCpin      =  6;


when I tried to compile the modified program I got the following output :-

Quote:Board: PIC32 Pinguino OTG
Proc: 32MX440F256H
error while linking /home/mark/Pinguino32X_linux-r208/examples/10.Libraries/RTCC/RealTimeClock.o

I am running Ubuntu 11.10, using r208 of the IDE and using a PIC32 Pinguino OTG board.

Any help with understanding the cause and a way round the above error message would be much appreciated.

Mark

It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
04-11-2011, 11:15 AM, (This post was last modified: 05-11-2011, 11:55 AM by mf01.)
#3
RE: Real Time Clock example for Pinguino32 not compiling
Regis,

Thank you for the input, by also changing :-
Code:
void blink1()
{
    Toggle(LED1);

}

to
Code:
void blink1()
{
    toggle(LED1);
}

the RealTimeClock.pde program now successfully compiles.

Whilst respecting your far greater experience, your comment about not needing to declare LED1 and RTCC as they are already defined in const.h is not born out by my experience. If I remark out the two new declarations and try to compile I get the following error:-

Quote:Board: PIC32 Pinguino OTG
Proc: 32MX440F256H
/home/mark/Pinguino32X_linux-r208/source/user.c:19:9: error: 'LED1' undeclared (first use in this function)
/home/mark/Pinguino32X_linux-r208/source/user.c:33:10: error: 'LED1' undeclared (first use in this function)
/home/mark/Pinguino32X_linux-r208/source/user.c:145:23: error: 'RTCC' undeclared (first use in this function)
/home/mark/Pinguino32X_linux-r208/source/user.c:146:15: error: 'LED1' undeclared (first use in this function)
error while linking /home/mark/Pinguino32X_linux-r208/examples/10.Libraries/RTCC/RealTimeClock.o

It was because of initially getting these errors that I included the declarations of LED1 and RTCC/RTCCpin prior to my initial post.

Note that because of your comments I have reverted to using RTCC rather than RTCCpin just to make sure that this did not cause any issues. The colouring of RTCC blue rather than black just seems to be a cosmetic issue in the IDE.

Regards

Mark
Reply
09-03-2012, 01:01 PM,
#4
RE: Real Time Clock example for Pinguino32 not compiling
Hello !

Sorry to dig out this Thread but i don´t know if the "problem" was resolved.

If you have a Pinguino OTG you have to change your const.h File.

Change the Line
Code:
#elif defined(PIC32_PINGUINO)

to

Code:
#elif defined(PIC32_PINGUINO) || defined(PIC32_PINGUINO_OTG)

Regards
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)