Page 1 of 1
Eeprom compiler error on PIC16F946
Posted: Tue Nov 23, 2010 8:18 pm
by dannyvanneijenhoff
Hello, When i use a Eeprom Component Macro i get the errors, (on 2 pc's).
C:\Users\Danny\Desktop\HT 1100 rev3 28-11-10.c(741): Illegal redefinition of symbol: MX_EEADR
C:\Users\Danny\Desktop\HT 1100 rev3 28-11-10.c(752): Illegal redefinition of symbol: MX_EEDATA
Thanks Danny

- eeprom error.jpg (32.24 KiB) Viewed 6065 times

- eeprom 2.jpg (24.4 KiB) Viewed 6064 times
Re: Eeprom compiler error on PIC16F946
Posted: Thu Nov 25, 2010 3:01 pm
by Benj
Hello,
Ok it seems that for this device both variations of the EEPROM registers exist so our detection code is failing.
If you use the custom code feature then you can remove the errors by editing the EEPROMRead function.
Code: Select all
char data = 0;
#ifdef _BOOSTC
#ifdef MX_EE
#ifndef MX_EEADR
#ifdef EEADR
#define MX_EEADR eeadr
#endif
#ifdef EEADRL
#define MX_EEADR eeadrl
#endif
#endif
#ifndef MX_EEDATA
#ifdef EEDATA
#define MX_EEDATA eedata
#endif
#ifdef EEDATAL
#define MX_EEDATA eedatal
#endif
#ifdef EEDATL
#define MX_EEDATA eedatl
#endif
#endif
The start of the read function looks like as shown above.
Change to match this.
Code: Select all
char data = 0;
#ifdef _BOOSTC
#ifdef MX_EE
#ifndef MX_EEADR
#ifdef EEADR
#define MX_EEADR eeadr
#endif
#endif
#ifndef MX_EEDATA
#ifdef EEDATA
#define MX_EEDATA eedata
#endif
#ifdef EEDATAL
#define MX_EEDATA eedatal
#endif
#endif
Re: Eeprom compiler error on PIC16F946
Posted: Sat Jan 01, 2011 8:34 pm
by dannyvanneijenhoff
Sorry i don't understand what you mean.
do i need to place a C-code block with your custom code?
And where must i place this.
I do not see, any changement in the first or second C-code (for me, it looks like the same, abadacabra

)
Re: Eeprom compiler error on PIC16F946
Posted: Mon Jan 03, 2011 9:23 am
by Steve
Right click the EEPROM component and select "customize code", then select and edit the EEPROMRead macro.
Re: Eeprom compiler error on PIC16F946
Posted: Tue Jan 04, 2011 10:48 am
by dannyvanneijenhoff
Thanks, but i don't see it.
Re: Eeprom compiler error on PIC16F946
Posted: Tue Jan 04, 2011 11:56 am
by saschech@gmx.de
hello dannyvanneijenhoff
show the picture...
select in the viewe tab > panel and > panel properties >then click on the ...(3 points) on the right!!! open the window
regards Wolfgang
Re: Eeprom compiler error on PIC16F946
Posted: Tue Jan 04, 2011 12:27 pm
by dannyvanneijenhoff
THANKS,
OK the component in the panel.
OK the compiler is working

. Now test/edit the program