Increasing Memory Program

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Increasing Memory Program

Post by bsammour »

Hi,
i am getting the following error when programming MIAC system in flowcode v5

Memory Usage Report
===================
RAM available:2048 bytes, used:308 bytes (15.1%), free:1740 bytes (84.9%),
Heap size:1740 bytes, Heap max single alloc:127 bytes
ROM available:22528 bytes, used:23632 bytes (104.9%), free:-1104 bytes (-4.-9%)
Too much code to fit in ROM, overfilled by:1104 locations.


i understand the error code, my question is there a way to increase the programming memory, to fit my program ? like adding new MIAC Slave, or another module

thanks for any help

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: Increasing Memory Program

Post by Benj »

Hello,

Can you tell me when you purchased the MIAC unit. We upgraded the chip in the unit from a 18F4455 to a 18F4550 a while back and it might be simply a case of updating the v5 FCD to allow the additional memory to be used.

You can try this and see how you get on, the file needs to be placed into this directory "C:\Program Files (x86)\Flowcode\v5\FCD" before restarting Flowcode.
MIAC.fcd
(12.24 KiB) Downloaded 368 times
Your program should then compile but depending on the chip in the unit you have the program may or may not program and run correctly.

bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Re: Increasing Memory Program

Post by bsammour »

we purchased the MIAC unit recently. i will try to use the file and see what happen
i have flowcode v6 but i need to use v5 because i am programming Miac system and it is not supported on V6

but i was wandering, you i will not get more memory by adding another MIAC slave to my system

bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Re: Increasing Memory Program

Post by bsammour »

i noticed this update the MIAC.
does this update MIAC inside MIAC system as well ?

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: Increasing Memory Program

Post by Benj »

Hello,

No each definition file is separate, here is the mod for the MIAC system FCD.
MIAC System.fcd
(12.75 KiB) Downloaded 381 times
You could add a MIAC slave to the system but the commands to drive the slave are still stored in the main MIAC master so will likely not give you any kind of advantage.

bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Re: Increasing Memory Program

Post by bsammour »

Hi,
thanks for the help. this worked fine
RAM available:2048 bytes, used:308 bytes (15.1%), free:1740 bytes (84.9%),
Heap size:1740 bytes, Heap max single alloc:127 bytes
ROM available:30720 bytes, used:23614 bytes (76.9%), free:7106 bytes (23.1%)

one last question, now i am limited in RAM which is for variables i guess, and ROM for program.
what i needed to add additional variable and bigger program ?

another question will this definition files work on flowcode V6 ?

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: Increasing Memory Program

Post by Benj »

Hello,

Great glad that worked to help with the problem. One way to allow for more RAM is to try to use local variables where possible instead of using global variables, this way the variables only consume memory while you are inside the macro.

To reduce ROM usage try to place any code that is repeated in your program into a macro.

If you can share your program here then we can have a look and maybe suggest ways to increase efficiency.

The definition file as is will not work with Flowcode v6 however Flowcode v6 comes with a MIAC V2 FCD which does the same thing.

bsammour
Posts: 7
Joined: Mon Feb 16, 2015 8:53 am
Contact:

Re: Increasing Memory Program

Post by bsammour »

thank you

i am rewriting the program to see how much size i can reduce.

Post Reply