Eeprom compiler error on PIC16F946

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Eeprom compiler error on PIC16F946

Post 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
eeprom error.jpg (32.24 KiB) Viewed 5556 times
eeprom 2.jpg
eeprom 2.jpg (24.4 KiB) Viewed 5555 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Eeprom compiler error on PIC16F946

Post 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

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Re: Eeprom compiler error on PIC16F946

Post 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 :lol: )

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Eeprom compiler error on PIC16F946

Post by Steve »

Right click the EEPROM component and select "customize code", then select and edit the EEPROMRead macro.

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Re: Eeprom compiler error on PIC16F946

Post by dannyvanneijenhoff »

Thanks, but i don't see it.
Attachments
Nieuw-1.jpg
Nieuw-1.jpg (129.11 KiB) Viewed 5502 times

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: Eeprom compiler error on PIC16F946

Post 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
Attachments
component........gif
(25.17 KiB) Downloaded 1175 times

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Re: Eeprom compiler error on PIC16F946

Post by dannyvanneijenhoff »

THANKS, :oops:

OK the component in the panel.

OK the compiler is working :P . Now test/edit the program

Post Reply