Hi
I use some components like LCD, I2c, switches, RS232, Step motor. is it possible that the compiled code includes also procedures of the components that I dont use in the code? because I cant fit the file in the device (Atmega16)
is there any option to shrink it in some way?
Thanks
code got too big to fit in the device
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: code got too big to fit in the device
Hi Hazic
When you compile your flowchart, it will only include the devices you have chosen.
Looking at your description, the components you have included will need a fair amount of space, you may have no option but to use a larger processor
Had to do this myself on more than one occasion.
Is it a case of only just not fitting or a lot too big?
One way you could make a size reduction (VERY SMALL) is to use shorter variable names, ensure strings are only defined to be as long as nessesary.
i.e dont leave at the default setting.
I tried this on a fairly large program of mine and managed to get about 10 bytes reduction, so not much but it could be enough to make it fit.
When you compile your flowchart, it will only include the devices you have chosen.
Looking at your description, the components you have included will need a fair amount of space, you may have no option but to use a larger processor
Had to do this myself on more than one occasion.
Is it a case of only just not fitting or a lot too big?
One way you could make a size reduction (VERY SMALL) is to use shorter variable names, ensure strings are only defined to be as long as nessesary.
i.e dont leave at the default setting.
I tried this on a fairly large program of mine and managed to get about 10 bytes reduction, so not much but it could be enough to make it fit.
1 in 10 people understand binary, the other one doesn't !
Re: code got too big to fit in the device
its not a lot too big, it was ok but then I just added a few little changes and it didnt fit
not i'm in a position that if I add even one command it will not fit.
not i'm in a position that if I add even one command it will not fit.
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: code got too big to fit in the device
Thats a pain. If a program is well over the size limit you tend to think ah well and just use a bigger chip, but when it only just goes over its frustrating.
You will just have to look closely see if you can take anything out.
My other suggestion is if you are using floating point math, can they be changed to byte or integer.
You could try posting your code on the forum (if its not confidential).
Someone who uses that type processers may be able to suggest other ways optimise it for you.
Sorry I only have flowcode for pics.
You will just have to look closely see if you can take anything out.
My other suggestion is if you are using floating point math, can they be changed to byte or integer.
You could try posting your code on the forum (if its not confidential).
Someone who uses that type processers may be able to suggest other ways optimise it for you.
Sorry I only have flowcode for pics.
1 in 10 people understand binary, the other one doesn't !
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: code got too big to fit in the device
I agree 99% with what John has said, e.g keeping string lengths to minimum etc.JohnCrow wrote:Hi Hazic
When you compile your flowchart, it will only include the devices you have chosen.
Looking at your description, the components you have included will need a fair amount of space, you may have no option but to use a larger processor
Had to do this myself on more than one occasion.
Is it a case of only just not fitting or a lot too big?
One way you could make a size reduction (VERY SMALL) is to use shorter variable names, ensure strings are only defined to be as long as nessesary.
i.e dont leave at the default setting.
I tried this on a fairly large program of mine and managed to get about 10 bytes reduction, so not much but it could be enough to make it fit.
The only thing I believe won't make a difference is the length of variable names used.
e.g
Code: Select all
my_variable_name_I_want_to_use_byte=20
Code: Select all
Var_bte=20
Where variables are concerned, the amount of room used is due to the type of variable. E.g Byte, int, float and string length etc.
Only difference is if you use longer names, it will help to work out how your program works, if you re-open flowchart a few months down the line.
I agree with John, If you can post your flowchart, I can take a look at it for you, as I now have that version of Flowcode (V4 PRO).
What version do you have?
Martin
'
Martin
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: code got too big to fit in the device
You could attach your flowcode program so we can have a look at it and maybe optimize the code a bit.