v3 to v4 conversion problem
Posted: Sun Aug 02, 2009 10:02 pm
Steve/Ben:
I received and registered my v4 pro upgrade last week and this weekend I tried to convert one of my v3 files to v4. The v3 version runs on a 16F876 with about 400 bytes of program memory to spare. This version uses "thermometers" and a C code block for writing custom characters to the LCD RAM. I opened the v3 version in v4 and got the prompt to convert the thermometers to the new ADCs. I did that, deleted the old components, checked and corrected "Connections" and "Ext Properties" for all of the connected components (I love the new ADC conversion speed choices) and converted the custom character C code block to the new LCD macro write-to-ram format. When I tried to compile the revised flowcode to HEX (for the 16F876) I got a string of error messages and the code failed to compile.
Since I was close to the program memory limit for the original v3 code and 16F876 I changed the chip type to an 18F2525 (pin-for-pin compatible), saved and recompiled. This time the compile went OK and I noted that the amount of program memory used was 15010 bytes - about the same as (and not exceeding the program memory capacity) for the v3/16F876 version.
I've stared at the compiled files for the 18F and the C code for the 16F and I can't figure it out so I'm attaching .fcf and the .msg files for both the 16F and 18F compiles. I hope you guys can figure this out. I would have posted this to the v4 forum but I don't have posting privileges there yet.
I can't seem to get the 16F.msg file uploaded so here is the text:
========================================================================================================================================
File name: C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c
Generated by: Flowcode v4.0.0.53
Date: Sunday, August 02, 2009 12:55:01
Licence: Professional
Registered to: Jim Humphries Hanna/Humphries
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F876 "V4pumpt41ak16f4M.c"
BoostC Optimizing C Compiler Version 6.95 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 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
V4pumpt41ak16f4M.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\pp.exe" "C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c" -i "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\include" -d _PIC16F876 -la -c2 -o "C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.pp" -v -d _BOOSTC -d _PIC16
.....................................................................................................................................................................
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:12): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:12): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:12): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:12): error: failed to generate expression
.....................................................................................
V4pumpt41ak16f4M.c success
failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED
====================================================================================================================================
Regards,
Jim
[attachment=0]V4pumpt41ak18f4M.msg.txt
I received and registered my v4 pro upgrade last week and this weekend I tried to convert one of my v3 files to v4. The v3 version runs on a 16F876 with about 400 bytes of program memory to spare. This version uses "thermometers" and a C code block for writing custom characters to the LCD RAM. I opened the v3 version in v4 and got the prompt to convert the thermometers to the new ADCs. I did that, deleted the old components, checked and corrected "Connections" and "Ext Properties" for all of the connected components (I love the new ADC conversion speed choices) and converted the custom character C code block to the new LCD macro write-to-ram format. When I tried to compile the revised flowcode to HEX (for the 16F876) I got a string of error messages and the code failed to compile.
Since I was close to the program memory limit for the original v3 code and 16F876 I changed the chip type to an 18F2525 (pin-for-pin compatible), saved and recompiled. This time the compile went OK and I noted that the amount of program memory used was 15010 bytes - about the same as (and not exceeding the program memory capacity) for the v3/16F876 version.
I've stared at the compiled files for the 18F and the C code for the 16F and I can't figure it out so I'm attaching .fcf and the .msg files for both the 16F and 18F compiles. I hope you guys can figure this out. I would have posted this to the v4 forum but I don't have posting privileges there yet.
I can't seem to get the 16F.msg file uploaded so here is the text:
========================================================================================================================================
File name: C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c
Generated by: Flowcode v4.0.0.53
Date: Sunday, August 02, 2009 12:55:01
Licence: Professional
Registered to: Jim Humphries Hanna/Humphries
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F876 "V4pumpt41ak16f4M.c"
BoostC Optimizing C Compiler Version 6.95 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 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
V4pumpt41ak16f4M.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\pp.exe" "C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c" -i "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\include" -d _PIC16F876 -la -c2 -o "C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.pp" -v -d _BOOSTC -d _PIC16
.....................................................................................................................................................................
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1431:12): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1624:12): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(1817:12): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:23): error: unknown identifier 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:23): error: invalid operand 'ADCS2'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:18): error: failed to generate expression
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:18): error: invalid operand '<<'
C:\Documents and Settings\Jim Humphries\Desktop\pump current build\Pump Software\2009 files\4MHz files\Pump\v4 tests\V4pumpt41ak16f4M.c(2010:12): error: failed to generate expression
.....................................................................................
V4pumpt41ak16f4M.c success
failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED
====================================================================================================================================
Regards,
Jim
[attachment=0]V4pumpt41ak18f4M.msg.txt