EEPROM issues
Moderator: Benj
-
- Flowcode V4 User
- Posts: 288
- Joined: Wed Nov 02, 2011 11:15 pm
- Has thanked: 29 times
- Been thanked: 30 times
- Contact:
EEPROM issues
Hello
Did a program a while back on V5, I now needed to updated with some EEPROM settings. I am using 18F25K22 and it already has some EEPROM variables being used successfully.
I program the Write and Read macros exactly the same as the other ones, however no matter what I do I cant get he EEPROM to work... However it compiles every time.
So, I opened the file up in F6, and now it refuses to compile saying:
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(72): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(75): EEPROM error - MX_EEDATA not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(134): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(137): EEPROM error - MX_EEDATA not set
4 errors detected
Error: preprocessing error
failure
Completed BoostC compilation, return = 1
Anyone know of a solution?
Thanks
GRaham
Did a program a while back on V5, I now needed to updated with some EEPROM settings. I am using 18F25K22 and it already has some EEPROM variables being used successfully.
I program the Write and Read macros exactly the same as the other ones, however no matter what I do I cant get he EEPROM to work... However it compiles every time.
So, I opened the file up in F6, and now it refuses to compile saying:
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(72): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(75): EEPROM error - MX_EEDATA not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(134): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(137): EEPROM error - MX_EEDATA not set
4 errors detected
Error: preprocessing error
failure
Completed BoostC compilation, return = 1
Anyone know of a solution?
Thanks
GRaham
- 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 issues
Hello Graham,
I've just tested it here and it seems to be working. Maybe you could try my EEPROM CAL file to see if this fixes your compilation problem.
The file needs to be placed into your "Flowcode 6\CAL\PIC" directory.
Let me know how you get on.
I've just tested it here and it seems to be working. Maybe you could try my EEPROM CAL file to see if this fixes your compilation problem.
The file needs to be placed into your "Flowcode 6\CAL\PIC" directory.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 288
- Joined: Wed Nov 02, 2011 11:15 pm
- Has thanked: 29 times
- Been thanked: 30 times
- Contact:
Re: EEPROM issues
Hi Ben
No, just tried it, still gives the same error...
I have attached the V6 program, can you see if it will compile for you?
Graham
No, just tried it, still gives the same error...
I have attached the V6 program, can you see if it will compile for you?
Graham
- Attachments
-
- V6 EEPROM issues.fcfx
- (177.18 KiB) Downloaded 287 times
- 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 issues
Hi Graham,
It's compiling fine for me. Please can you confirm your using Flowcode version 6.1.3.
I've also attached the current definition file just in case this is what is causing problems.
This file lives in the "Flowcode 6/FCD/PIC" folder.
It's compiling fine for me. Please can you confirm your using Flowcode version 6.1.3.
I've also attached the current definition file just in case this is what is causing problems.
This file lives in the "Flowcode 6/FCD/PIC" folder.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 288
- Joined: Wed Nov 02, 2011 11:15 pm
- Has thanked: 29 times
- Been thanked: 30 times
- Contact:
Re: EEPROM issues
Hi Ben
I am using V 6.1.4
Here is more details on the compiler message if it helps
Launching the compiler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18f.exe -v -t PIC%(chip:u) "V6 EEPROM issues.c"
Launching BoostC...
BoostC Optimizing C Compiler Version 7.20 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited
V6 EEPROM issues.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" "V6 EEPROM issues.c" -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PICPIC -la -c2 -o "V6 EEPROM issues.pp" -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(72): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(75): EEPROM error - MX_EEDATA not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(134): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(137): EEPROM error - MX_EEDATA not set
4 errors detected
Error: preprocessing error
failure
.
Completed BoostC compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18f.exe reported error code 1
FINISHED
I am using V 6.1.4
Here is more details on the compiler message if it helps
Launching the compiler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18f.exe -v -t PIC%(chip:u) "V6 EEPROM issues.c"
Launching BoostC...
BoostC Optimizing C Compiler Version 7.20 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited
V6 EEPROM issues.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" "V6 EEPROM issues.c" -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PICPIC -la -c2 -o "V6 EEPROM issues.pp" -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(72): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(75): EEPROM error - MX_EEDATA not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(134): EEPROM error - MX_EEADR not set
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_EEPROM.c(137): EEPROM error - MX_EEDATA not set
4 errors detected
Error: preprocessing error
failure
.
Completed BoostC compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18f.exe reported error code 1
FINISHED
- 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 issues
Hello,
This bit of the command line to the compiler looks wrong.
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18f.exe -v -t PIC%(chip:u) "V6 EEPROM issues.c"
Can you click on Build -> Compiler options.
The settings for a PIC should look like this.
Compiler Location: $(appdir)compilers\pic\boostc\boostc_$(family:/12F/16F).exe
Compiler Parameters: -v -t PIC$(chip:u) "$(target).c"
Linker Location: $(appdir)compilers\pic\boostc\boostlink_picmicro.exe
Linker Parameters: -ld "$(appdir)compilers\pic\boostc\lib" libc_$(family:/12F/16F).lib rand_$(family:/12F/16F).lib float_$(family:/12F/16F).lib "$(target).obj" -t PIC$(chip:u) -d "$(outdir:~-1)" -p "$(target)" -swcs 6 2
It looks like you have a % symbol instead of the expected $ symbol.
This bit of the command line to the compiler looks wrong.
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_18f.exe -v -t PIC%(chip:u) "V6 EEPROM issues.c"
Can you click on Build -> Compiler options.
The settings for a PIC should look like this.
Compiler Location: $(appdir)compilers\pic\boostc\boostc_$(family:/12F/16F).exe
Compiler Parameters: -v -t PIC$(chip:u) "$(target).c"
Linker Location: $(appdir)compilers\pic\boostc\boostlink_picmicro.exe
Linker Parameters: -ld "$(appdir)compilers\pic\boostc\lib" libc_$(family:/12F/16F).lib rand_$(family:/12F/16F).lib float_$(family:/12F/16F).lib "$(target).obj" -t PIC$(chip:u) -d "$(outdir:~-1)" -p "$(target)" -swcs 6 2
It looks like you have a % symbol instead of the expected $ symbol.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 288
- Joined: Wed Nov 02, 2011 11:15 pm
- Has thanked: 29 times
- Been thanked: 30 times
- Contact:
Re: EEPROM issues
Hi Ben
Thanks for this, V6 will now compile however the code is no longer working on hardware. Are there some common things that typically go wrong from taking V5 code to V6 or will I need to fault find the whole code?
Thanks
Thanks for this, V6 will now compile however the code is no longer working on hardware. Are there some common things that typically go wrong from taking V5 code to V6 or will I need to fault find the whole code?
Thanks
- 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 issues
Hello,
Maybe check the configuration settings. v5 used PPP to define the configuration but v6 uses Flowcode itself so maybe things could have changed here?
A 1 second flasher test is useful to check the configuration and that the device is running at the correct speed.
https://www.matrixtsl.com/wikiv7/index. ... ED_flasher
Maybe check the configuration settings. v5 used PPP to define the configuration but v6 uses Flowcode itself so maybe things could have changed here?
A 1 second flasher test is useful to check the configuration and that the device is running at the correct speed.
https://www.matrixtsl.com/wikiv7/index. ... ED_flasher
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 288
- Joined: Wed Nov 02, 2011 11:15 pm
- Has thanked: 29 times
- Been thanked: 30 times
- Contact:
Re: EEPROM issues
Hi Ben
There were a number of configuration settings incorrect. After matching them exactly the program compiled ok, but did not work.
Put a two second loop at the start of the program to check the clock settings, this works ok.
I have attached the program, maybe you can see something obvious.
Thanks
There were a number of configuration settings incorrect. After matching them exactly the program compiled ok, but did not work.
Put a two second loop at the start of the program to check the clock settings, this works ok.
I have attached the program, maybe you can see something obvious.
Thanks
- Attachments
-
- V6 EEPROM issues.fcfx
- (176.61 KiB) Downloaded 312 times
- 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 issues
Hello,
We added EEPROM initialisers in v6, look at the EEPROM component properties.
Maybe delete the contents of the Initial values property and this will do the job of setting EEPROM locations to 255 after programming.
Other then that nothing is springing to mind.
We added EEPROM initialisers in v6, look at the EEPROM component properties.
Maybe delete the contents of the Initial values property and this will do the job of setting EEPROM locations to 255 after programming.
Other then that nothing is springing to mind.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel