Hello,
I am new on programming Flowcode (wonderful tool), we are using Flowcode V3 and Flowcode V5.
At the moment I try to program a PIC12F615 (small memory) it works fine by using V3 but when
I use the more comfortable V5 the code will always be too big. For example I have writ a very small program (see attached pictures) just read out two ADC (as byte) and subtract the both values.
By using V3 the codesize is 9 bytes (14.1%), under V5 the codesize is 48 bytes (75%).
I use the boostc V6.7 compiler in V3 and the boostc V7.04 vompiler in V5.
In the C-files you can see that V5 include many unused function, I think that’s the reason for the big size.
Now my questions, is it recommended to use a other compiler which is able to remove unused functions?
Is there’re any other possibility to reduce the codesize?
Or is it recommended to use V3 for controllers with a small memory?
Codesize compared to V3
Moderator: Benj
-
- Posts: 47
- Joined: Mon Apr 16, 2018 10:28 am
- Location: Germany
- Has thanked: 1 time
- Been thanked: 9 times
- Contact:
Re: Codesize compared to V3
forgot attachmends .....
- Attachments
-
- komp5.PNG
- (6.4 KiB) Downloaded 2490 times
-
- komp3.PNG
- (8.93 KiB) Downloaded 2490 times
-
- flow3.PNG
- (7.31 KiB) Downloaded 2490 times
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Codesize compared to V3
In all versions of Flowcode, you can include your own C code and functions if code size is an important constraint.
- 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: Codesize compared to V3
Hello,
The string buffer allowing you to do things like string manipulations is maybe partially to blame (20 bytes). V5 was a while ago so I'll have to look at my install for where in the resource files this might be so you can disable it.
It's likely the other size increases are similar feature and performance improvements from v3 to v5.
The string buffer allowing you to do things like string manipulations is maybe partially to blame (20 bytes). V5 was a while ago so I'll have to look at my install for where in the resource files this might be so you can disable it.
It's likely the other size increases are similar feature and performance improvements from v3 to v5.
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
- 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: Codesize compared to V3
Ok in v5 you can do the following to reduce the amount of RAM used.
Browse to the following location on your PC "Flowcode 5\PIC\FCD"
Find the file "internals.c" and open with a text editor e.g. notepad.
Find these lines in the code.
Comment out the two inner lines and that should reduce your RAM usage by 22 bytes.
Let us know how you get on.
Browse to the following location on your PC "Flowcode 5\PIC\FCD"
Find the file "internals.c" and open with a text editor e.g. notepad.
Find these lines in the code.
Code: Select all
#ifndef MX_10F_TRIS
unsigned char FCI_TMP_STR[20];
int FCI_TMP_INT;
#endif
Code: Select all
#ifndef MX_10F_TRIS
//unsigned char FCI_TMP_STR[20];
//int FCI_TMP_INT;
#endif
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