dspic variable - not exist

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

dspic variable - not exist

Post by saschech@gmx.de »

Hello Sean

Please you can help?

Regards Wolfgang
Attachments
but i build.gif
but i build.gif (28.83 KiB) Viewed 6621 times
var not exist.gif
var not exist.gif (23.78 KiB) Viewed 6621 times

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

Re: dspic variable - not exist

Post by Steve »

Hi Wolfgang,

Please post or send the program and we'll have a look.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post 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
Attachments
30F6012A_master.fcf_pic16
(218.98 KiB) Downloaded 252 times

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post by saschech@gmx.de »

Hello Steve

Do yuo have any news about my problems?

Regards Wolfgang

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: dspic variable - not exist

Post 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.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post 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

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: dspic variable - not exist

Post 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.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post 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

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: dspic variable - not exist

Post 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.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post 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

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: dspic variable - not exist

Post by Benj »

Hi Wolfgang,

No the code is fine, the limitation is part of Flowcode's inner workings.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post 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

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: dspic variable - not exist

Post by saschech@gmx.de »

Hello Benj

You have please more information for the limitation?

Regards Wolfgang

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: dspic variable - not exist

Post 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.

Post Reply