EEPROM not compilling in 16F917 and others.

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

EEPROM not compilling in 16F917 and others.

Post by Polanco »

Hi, when i compile to HEX a project that includes an EEPROM module, there's an error message if the project uses a 16F917 and others 16F9XX.
Changing the PIC to a classic 16F877A, everithing goes OK.
Can you help me please?

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

Post by Steve »

Hello.

Yes, there is a problem with the code generation of the EEPROM component for the 16F9xx devices. We have fixed it here, but it has not been released yet.

For now, here is a workaround. Put the following code into the "defines" box of the "supplementary code" window:

Code: Select all

#ifndef eeadr
    #define eeadr eeadrl
#endif
#ifndef eedata
    #define eedata eedatl
#endif

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Better but not enough

Post by Polanco »

Oh, thank you very much.
ItΒ΄s not working yet. ThereΒ΄s still one error:

C:\Documents and Settings\Administrador\Escritorio\EE\Flowcode1.c(168): "#endif" outside of "#if"

What must i do then?

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Sorry, Steve. It's working.

Post by Polanco »

I confused the suplementary code with the AddDefines module. Now it's working.
By the way, in my spanish version some names are in english.
Thank you very much, I really love this software.
I can make my own midi controls and guitar switching units now, customized for myself. Very nice

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

Post by Steve »

Great - I'm glad it's working now.

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Re: EEPROM not compilling in 16F917 and others.

Post by Polanco »

Hi again.
That old problem is back in the new 3.4.7.48 version.
16f917 not compiles the EEPROM module.
And now the suplementary code you sent me doesn't work neither.

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

Re: EEPROM not compilling in 16F917 and others.

Post by Steve »

Hi,

I've just tested it here and it works fine. Remember that the code needs to go into the "defines" section of the "supplementary code" window (i.e. the top section).

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Re: EEPROM not compilling in 16F917 and others.

Post by Polanco »

Yes, Steve, IΒ΄m doing that, just like before.
IΒ΄ll send you the test project.

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Re: EEPROM not compilling in 16F917 and others.

Post by Polanco »

Here is a simple test. I can simulate it but doesn't compile eaven pasting the suplementary code.
Attachments
EEPROM TEST.fcf
A simple test.
(5.5 KiB) Downloaded 294 times

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

Re: EEPROM not compilling in 16F917 and others.

Post by Steve »

I've just downloaded this program and it compiles fine here. Can you please also post the "C" file that is generated by your copy of FLowcode - this will help track down the problem.

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Re: EEPROM not compilling in 16F917 and others.

Post by Polanco »

OK, here it goes:


File name: C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\EEPROM TEST-1.c
Generated by: Flowcode v3.4.7.48
Date: Monday, July 07, 2008 13:11:26
Licence: Professional
Registered to: Ricardo Musso


http://www.matrixmultimedia.com



Launching the compiler...

C:\Archivos de programa\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F917 "EEPROM TEST-1.c"

BoostC Optimizing C Compiler Version 6.70 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited


EEPROM TEST-1.c
Starting preprocessor: "C:\Archivos de programa\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\EEPROM TEST-1.c" -i "C:\Archivos de programa\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC16F917 -la -c2 -o "EEPROM TEST-1.pp" -v -d _BOOSTC -d _PIC16

C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\EEPROM TEST-1.c(116): EEPROM error - MX_EEDATA not set
C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\EEPROM TEST-1.c(173): EEPROM error - MX_EEDATA not set

2 errors detected
Error: preprocessing error

failure

.....................
Return code = 1

Flowcode no pudo compilar el cΓ³digo C del diagrama de flujo por los siguientes errores:


Si su diagrama de flujo contiene cΓ³digo C, revΓ­selo cuidadosamente. Si su diagrama de flujo no contiene cΓ³digo C o si ya ha revisado el cΓ³digo C, contactese con Soporte TΓ©cnico.

FINISHED

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

Re: EEPROM not compilling in 16F917 and others.

Post by Steve »

Hi Polanco,

By the C file, I meant actually attach the file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\EEPROM TEST-1.c".

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Re: EEPROM not compilling in 16F917 and others.

Post by Polanco »

Sorry Steve.
Attachments
EEPROM TEST-1.c
(10.6 KiB) Downloaded 308 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 not compilling in 16F917 and others.

Post by Benj »

Hello

Please place the attached file into your Flowcode V3/Components folder and restart Flowcode. Your EEPROM code should now compile correctly.

Default - C:\Program Files\Matrix Multimedia\Flowcode V3\Components.
Attachments
EEPROM_Code.c
(5.99 KiB) Downloaded 286 times

Polanco
Posts: 21
Joined: Wed Dec 05, 2007 12:14 am
Location: Uruguay
Contact:

Re: EEPROM not compilling in 16F917 and others.

Post by Polanco »

Eureka!
Thank you Benj and Steve. ItΒ΄s working now.

Post Reply