Page 1 of 1
dspic variable - not exist
Posted: Fri Feb 25, 2011 4:42 pm
by saschech@gmx.de
Hello Sean
Please you can help?
Regards Wolfgang
Re: dspic variable - not exist
Posted: Mon Feb 28, 2011 7:27 am
by Steve
Hi Wolfgang,
Please post or send the program and we'll have a look.
Re: dspic variable - not exist
Posted: Mon Feb 28, 2011 8:10 am
by saschech@gmx.de
Hello Steve
The code have 3 errors
1) stopp compile to c >>>> to much warnings
2)E:\DSPIC\30F6012A_master>pic30-gcc -c -mcpu=30F6012A -funsigned-char -fno-short-double -Os -I"C:\PROGRA~1\MATRIX~1\FLOWCO~4\Tools\MX_bats\..\C_tools\support\h" -I"C:\PROGRA~1\MATRIX~1\FLOWCO~4\Tools\MX_bats\..\MX_support" -Wall -std=gnu99 "30F6012A_master".c -o "30F6012A_master".o
30F6012A_master.c:118: error: syntax error before numeric constant
3)inside macro "settime_einrichten" >>>!!!! switch : settime_einrichten.intern_extern_eeprom !!!!!
variable not exist....
Regards Wolfgang
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 2:22 pm
by saschech@gmx.de
Hello Steve
Do yuo have any news about my problems?
Regards Wolfgang
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 2:52 pm
by Benj
Hi Wolfgang,
Right we have looked into the problem and found that there is a inbuilt limit on the size of a variable name. This is set to 32 characters.
As you had a macro name and a parameter name that were both under 32 characters they were both accepted. However when you come to use the switch icon the variable name is a combination of both macro and variable which stops the variable name being within the size limitation.
One work around for this is to shorten the variable name, add the variable to the switch case and then rename the variable back to your old name. This obviously will not work if you need to be using the variable all over the place but if your only using it say once or twice and your not going to be re-editing those icons then this should work fine.
We will look into fixing this limitation for future releases.
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 4:16 pm
by saschech@gmx.de
Hello Benj
I think i understand the work around .. but if i want compile to chip ; i dont can do these because compiling stop you have for these case also a work around ?
Regards Wolfgang
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 4:28 pm
by Benj
Hi Wolfgang,
Ah ok sorry your right, I didn't try a compilation using the workaround. I see that if the variable name is too long then the definition for the variable definition seems to get missed out from the C code.
So work around for now is not to have any combination of macro name and variable name that is over 32 characters. As I say we will look into fixing this but will probably not be available until the next release.
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 4:37 pm
by saschech@gmx.de
Hallo Benj
It`s not 100% rigt because compiling to c or compiling to chip stop work also , if there are not the variable problem. (the thame as in pic18 with hi-tech-compiler...)
I think there are to mutch warnings.
Regards Wolfgang
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 4:44 pm
by Benj
Hi Wolfgang,
Yes sorry I was incorrect, please disregard my previous workaround.
The only working workaround at the moment is to reduce the size of either the macro name or the variable name or both so that the combined characters including the "." are no longer then 32 characters.
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 5:11 pm
by saschech@gmx.de
Hello Benj
Excuse me please,i dont anderstand your argument`s,inside the mplab with c30-compiler run all ok,so i think it is not a problem of my code.(the variable problem is
the same).
Regards Wolfgang
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 5:19 pm
by Benj
Hi Wolfgang,
No the code is fine, the limitation is part of Flowcode's inner workings.
Re: dspic variable - not exist
Posted: Wed Mar 02, 2011 5:33 pm
by saschech@gmx.de
Hello Benj
At last to these theme,i think the flowcode pro version are with out limitation for code-long and macro-quantity.
Thank you and
Regards Wolfgang
Re: dspic variable - not exist
Posted: Thu Mar 03, 2011 12:22 pm
by saschech@gmx.de
Hello Benj
You have please more information for the limitation?
Regards Wolfgang
Re: dspic variable - not exist
Posted: Thu Mar 03, 2011 12:38 pm
by Benj
Hello,
At last to these theme,i think the flowcode pro version are with out limitation for code-long and macro-quantity.
Flowcode Pro has no limitations on the length of your code or the number of macros.
What it does have is a bug that means you cannot use a variable name over 32 characters long. We are looking into this.