Convert v4 to v5
Moderator: Benj
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Convert v4 to v5
I would have posted in the v5 forum but I do not have permissions...
I am having a problem upgrading a program from v4 to v5. Here is the output:
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\v5\Tools\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4580 "TrainerTarget_v4.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 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
TrainerTarget_v4.c
Starting preprocessor: C:\PROGRA~2\Flowcode\v5\Tools\boostc\pp.exe TrainerTarget_v4.c -i C:\PROGRA~2\Flowcode\v5\Tools\boostc\include -d _PIC18F4580 -la -c2 -o TrainerTarget_v4.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
............
TrainerTarget_v4.c(3823): error: missing right paren
TrainerTarget_v4.c(3823): error: general error
TrainerTarget_v4.c(3823): error: variable name expected
TrainerTarget_v4.c(3823): error: general error
TrainerTarget_v4.c(3823): error: failure
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
In the supplementary code I have:
#pragma DATA 0x200000,68,101,119,97,121,110,101,66
#pragma DATA _EEPROM,64,255,"Copyright - dewayne@yall.biz, 2011",255,255
The c code at line 3823 is
MX_UINT8 FCM_CheckAbutton(MX_UINT8 FCL_BUTPOW2, MX_UINT8 FCL_BUTVAL)
{
I am having a problem upgrading a program from v4 to v5. Here is the output:
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\v5\Tools\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4580 "TrainerTarget_v4.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 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
TrainerTarget_v4.c
Starting preprocessor: C:\PROGRA~2\Flowcode\v5\Tools\boostc\pp.exe TrainerTarget_v4.c -i C:\PROGRA~2\Flowcode\v5\Tools\boostc\include -d _PIC18F4580 -la -c2 -o TrainerTarget_v4.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
............
TrainerTarget_v4.c(3823): error: missing right paren
TrainerTarget_v4.c(3823): error: general error
TrainerTarget_v4.c(3823): error: variable name expected
TrainerTarget_v4.c(3823): error: general error
TrainerTarget_v4.c(3823): error: failure
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
In the supplementary code I have:
#pragma DATA 0x200000,68,101,119,97,121,110,101,66
#pragma DATA _EEPROM,64,255,"Copyright - dewayne@yall.biz, 2011",255,255
The c code at line 3823 is
MX_UINT8 FCM_CheckAbutton(MX_UINT8 FCL_BUTPOW2, MX_UINT8 FCL_BUTVAL)
{
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Convert v4 to v5
Hi
I guess it would tough to sort that without having a look at the code. If that is commercially sensitive code, you can PM me so that I can have a look what's going wrong?
Thanks,
I guess it would tough to sort that without having a look at the code. If that is commercially sensitive code, you can PM me so that I can have a look what's going wrong?
Thanks,
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: Convert v4 to v5
Indeed it is difficult to tell without seeing the code.
- Always please ensure you are running the latest version of Flowcode, 5.4 is the latest at the time of writing, Help >> Check for Updates to see whether there is an upgrade available.
- To help others diagnose your code it is good to use the new 'disable' feature on icons in v5 to try and narrow down where the problem code is occuring.
- Always please ensure you are running the latest version of Flowcode, 5.4 is the latest at the time of writing, Help >> Check for Updates to see whether there is an upgrade available.
- To help others diagnose your code it is good to use the new 'disable' feature on icons in v5 to try and narrow down where the problem code is occuring.
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Re: Convert v4 to v5
I am using the latest version of flowcode. Am I correct about the line number in the c code, i.e. this error message
TrainerTarget_v4.c(3823): error: missing right paren
is on line 3823 in the c code?
TrainerTarget_v4.c(3823): error: missing right paren
is on line 3823 in the c code?
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: Convert v4 to v5
Hello,
Yes it does refer to that line in the C-code.
More information on upgrading forum accounts can be found here: http://www.matrixmultimedia.com/mmforum ... =46&t=9958
Yes it does refer to that line in the C-code.
More information on upgrading forum accounts can be found here: http://www.matrixmultimedia.com/mmforum ... =46&t=9958
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Re: Convert v4 to v5
I duplicated the macro that appears to be causing the error, and the error changed line numbers. I have attached the macro.
.............
TrainerTarget_v4.c(4267): error: missing right paren
TrainerTarget_v4.c(4267): error: general error
TrainerTarget_v4.c(4267): error: variable name expected
TrainerTarget_v4.c(4267): error: general error
TrainerTarget_v4.c(4267): error: failure
Here is the c code starting at line 4267.
MX_UINT8 FCM_CheckAbutton(MX_UINT8 FCL_BUTPOW2, MX_UINT8 FCL_BUTVAL)
{
MX_UINT8 FCR_RETVAL;
// get button state
//Input: PORTB -> butRD
//TRISE.PSPMODE workaround
#if ('b' == 'e')
trisb = trisb | (0xFF & 0x0F);
FCV_BUTRD = portb & 0x0F;
#else
trisb = trisb | 0xFF;
FCV_BUTRD = portb;
#endif
// is button pressed?
//Decision: (butRD AND CheckAbutton.ButPow2) = CheckAbutton.ButPow2?
if ((FCV_BUTRD & FCL_BUTPOW2) == FCL_BUTPOW2)
{
// less than max?
//Decision: CheckAbutton.butVal < 255?
if (FCL_BUTVAL < 255)
{
// increment count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal + 1
FCL_BUTVAL = FCL_BUTVAL + 1;
} else {
//Comment:
//Button Pressed
// turn state on
//Calculation:
// butSTcur = butSTcur OR CheckAbutton.ButPow2
FCV_BUTSTCUR = FCV_BUTSTCUR | FCL_BUTPOW2;
}
} else {
// are we at 0?
//Decision: CheckAbutton.butVal > 0?
if (FCL_BUTVAL > 0)
{
// decrement count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal - 1
FCL_BUTVAL = FCL_BUTVAL - 1;
} else {
//Comment:
//Button Released
// turn state off
//Calculation:
// butSTcur = butSTcur AND (255 XOR CheckAbutton.ButPow2)
FCV_BUTSTCUR = FCV_BUTSTCUR & (255 ^ FCL_BUTPOW2);
}
}
.............
TrainerTarget_v4.c(4267): error: missing right paren
TrainerTarget_v4.c(4267): error: general error
TrainerTarget_v4.c(4267): error: variable name expected
TrainerTarget_v4.c(4267): error: general error
TrainerTarget_v4.c(4267): error: failure
Here is the c code starting at line 4267.
MX_UINT8 FCM_CheckAbutton(MX_UINT8 FCL_BUTPOW2, MX_UINT8 FCL_BUTVAL)
{
MX_UINT8 FCR_RETVAL;
// get button state
//Input: PORTB -> butRD
//TRISE.PSPMODE workaround
#if ('b' == 'e')
trisb = trisb | (0xFF & 0x0F);
FCV_BUTRD = portb & 0x0F;
#else
trisb = trisb | 0xFF;
FCV_BUTRD = portb;
#endif
// is button pressed?
//Decision: (butRD AND CheckAbutton.ButPow2) = CheckAbutton.ButPow2?
if ((FCV_BUTRD & FCL_BUTPOW2) == FCL_BUTPOW2)
{
// less than max?
//Decision: CheckAbutton.butVal < 255?
if (FCL_BUTVAL < 255)
{
// increment count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal + 1
FCL_BUTVAL = FCL_BUTVAL + 1;
} else {
//Comment:
//Button Pressed
// turn state on
//Calculation:
// butSTcur = butSTcur OR CheckAbutton.ButPow2
FCV_BUTSTCUR = FCV_BUTSTCUR | FCL_BUTPOW2;
}
} else {
// are we at 0?
//Decision: CheckAbutton.butVal > 0?
if (FCL_BUTVAL > 0)
{
// decrement count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal - 1
FCL_BUTVAL = FCL_BUTVAL - 1;
} else {
//Comment:
//Button Released
// turn state off
//Calculation:
// butSTcur = butSTcur AND (255 XOR CheckAbutton.ButPow2)
FCV_BUTSTCUR = FCV_BUTSTCUR & (255 ^ FCL_BUTPOW2);
}
}
- Attachments
-
- CheckAbutton.fcm
- (4.89 KiB) Downloaded 358 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: Convert v4 to v5
Hello,
The C code does seem to be missing the final '}' to terminate the macro.
Therefore this error makes sense.
The C code does seem to be missing the final '}' to terminate the macro.
Therefore this error makes sense.
I expect this is a Flowcode issue but we will investigate and let you know.TrainerTarget_v4.c(4267): error: missing right paren
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
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Re: Convert v4 to v5
Sorry. I think I did not copy the c correctly. Let me try again:
//Checks a button state
MX_UINT8 FCM_CheckAbutton(MX_UINT8 FCL_BUTPOW2, MX_UINT8 FCL_BUTVAL)
{
MX_UINT8 FCR_RETVAL;
// get button state
//Input: PORTB -> butRD
//TRISE.PSPMODE workaround
#if ('b' == 'e')
trisb = trisb | (0xFF & 0x0F);
FCV_BUTRD = portb & 0x0F;
#else
trisb = trisb | 0xFF;
FCV_BUTRD = portb;
#endif
// is button pressed?
//Decision: (butRD AND CheckAbutton.ButPow2) = CheckAbutton.ButPow2?
if ((FCV_BUTRD & FCL_BUTPOW2) == FCL_BUTPOW2)
{
// less than max?
//Decision: CheckAbutton.butVal < 255?
if (FCL_BUTVAL < 255)
{
// increment count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal + 1
FCL_BUTVAL = FCL_BUTVAL + 1;
} else {
//Comment:
//Button Pressed
// turn state on
//Calculation:
// butSTcur = butSTcur OR CheckAbutton.ButPow2
FCV_BUTSTCUR = FCV_BUTSTCUR | FCL_BUTPOW2;
}
} else {
// are we at 0?
//Decision: CheckAbutton.butVal > 0?
if (FCL_BUTVAL > 0)
{
// decrement count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal - 1
FCL_BUTVAL = FCL_BUTVAL - 1;
} else {
//Comment:
//Button Released
// turn state off
//Calculation:
// butSTcur = butSTcur AND (255 XOR CheckAbutton.ButPow2)
FCV_BUTSTCUR = FCV_BUTSTCUR & (255 ^ FCL_BUTPOW2);
}
}
// return value
//Calculation:
// CheckAbutton.Return = CheckAbutton.butVal
FCR_RETVAL = FCL_BUTVAL;
return (FCR_RETVAL);
}
//Checks a button state
MX_UINT8 FCM_CheckAbutton(MX_UINT8 FCL_BUTPOW2, MX_UINT8 FCL_BUTVAL)
{
MX_UINT8 FCR_RETVAL;
// get button state
//Input: PORTB -> butRD
//TRISE.PSPMODE workaround
#if ('b' == 'e')
trisb = trisb | (0xFF & 0x0F);
FCV_BUTRD = portb & 0x0F;
#else
trisb = trisb | 0xFF;
FCV_BUTRD = portb;
#endif
// is button pressed?
//Decision: (butRD AND CheckAbutton.ButPow2) = CheckAbutton.ButPow2?
if ((FCV_BUTRD & FCL_BUTPOW2) == FCL_BUTPOW2)
{
// less than max?
//Decision: CheckAbutton.butVal < 255?
if (FCL_BUTVAL < 255)
{
// increment count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal + 1
FCL_BUTVAL = FCL_BUTVAL + 1;
} else {
//Comment:
//Button Pressed
// turn state on
//Calculation:
// butSTcur = butSTcur OR CheckAbutton.ButPow2
FCV_BUTSTCUR = FCV_BUTSTCUR | FCL_BUTPOW2;
}
} else {
// are we at 0?
//Decision: CheckAbutton.butVal > 0?
if (FCL_BUTVAL > 0)
{
// decrement count
//Calculation:
// CheckAbutton.butVal = CheckAbutton.butVal - 1
FCL_BUTVAL = FCL_BUTVAL - 1;
} else {
//Comment:
//Button Released
// turn state off
//Calculation:
// butSTcur = butSTcur AND (255 XOR CheckAbutton.ButPow2)
FCV_BUTSTCUR = FCV_BUTSTCUR & (255 ^ FCL_BUTPOW2);
}
}
// return value
//Calculation:
// CheckAbutton.Return = CheckAbutton.butVal
FCR_RETVAL = FCL_BUTVAL;
return (FCR_RETVAL);
}
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Re: Convert v4 to v5
I am so confused. I tried disabling the supplemental code but that had no affect. When I upgraded the program all I did was make a copy of the folder it was in, then open it with FC5.
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Re: Convert v4 to v5
I made a new copy of the folder and now I am getting this:
Launching the compiler...
C:\Program Files (x86)\Flowcode\v5\Tools\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4580 "TrainerTarget_v4.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Compiler can not be started without a host program (code 120)
Return code = 120
Flowcode was unable to compile the flowchart's C code due to the following errors:
Then I went back to the original FC4 version, and opened it with FC4 and got the same error!!!!! I thought FC4 and FC5 were independent.
c:\program files (x86)\matrix multimedia\flowcode v4\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4580 "TrainerTarget_v4.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Compiler can not be started without a host program (code 120)
Launching the compiler...
C:\Program Files (x86)\Flowcode\v5\Tools\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4580 "TrainerTarget_v4.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Compiler can not be started without a host program (code 120)
Return code = 120
Flowcode was unable to compile the flowchart's C code due to the following errors:
Then I went back to the original FC4 version, and opened it with FC4 and got the same error!!!!! I thought FC4 and FC5 were independent.
c:\program files (x86)\matrix multimedia\flowcode v4\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4580 "TrainerTarget_v4.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Compiler can not be started without a host program (code 120)
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: Convert v4 to v5
Hello, v4 and v5 are seperate but there is some overlap with BoostC.
However this is not an error ive seen before...
Could you try the fix stated in this forum topic: http://www.matrixmultimedia.com/mmforum ... red#p33220
However this is not an error ive seen before...
Could you try the fix stated in this forum topic: http://www.matrixmultimedia.com/mmforum ... red#p33220
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Convert v4 to v5
I have faced this kind of issue once...restarting the machine solved my problem..Compiler can not be started without a host program (code 120)
-
- Posts: 125
- Joined: Mon Aug 15, 2011 1:54 pm
- Has thanked: 8 times
- Been thanked: 11 times
- Contact:
Re: Convert v4 to v5
Rebooting took care of the 120 error. Now I am back to the original problem. Any ideas?
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Convert v4 to v5
I am not that much expert to look through code without actual fcf file. Can you please post the problem part of the code while disabling rest of the bit? I can see what is actually going wrong.
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: Convert v4 to v5
Hello,
We would need to see the entire Flowcode file, if the program is business sensitive and you do not want to post it on a public forum then please PM me for an email address to send the program to, and we can assure you that either verbally or via an NDA if you wish, that we will diagnose the problem, then remove all trace of the program from our system.
We would need to see the entire Flowcode file, if the program is business sensitive and you do not want to post it on a public forum then please PM me for an email address to send the program to, and we can assure you that either verbally or via an NDA if you wish, that we will diagnose the problem, then remove all trace of the program from our system.