Hallo i am doing my project with 877A but i dont can do more memory abaut :
ROM used: 5798 words (71%)
Largest free fragment is 2048
RAM used: 200 (54%) at main() level
316 (86%) worst case
Stack: 9 worst case (7 in main + 2 for interrupts)
if i add same new line in my code the compiler write me not enougt rom memory .... with not all memory for example 99%... but max 74% .
I dont understand why .
I must use new pic with more memory for example 452 ?
thanks ..
Ttelmah Guest
Posted: Sun Sep 17, 2006 4:04 am
Do a search on the forum for 'not enough memory'.
No, you don't need to use a larger chip. You just need to 'split up' what you are doing. The chip has a limit of how large a single 'block' of code can be, as well as on the total size. It is this second limit you are hitting.
Best Wishes
ferrarilib
Joined: 11 Jun 2005 Posts: 38
Posted: Sun Sep 17, 2006 6:00 am
thanks Ttelmah !
but i have tried same cange in my code but not cange nothing
first :
in main call i have do a partial code a functions example
main()
...............
while(1)
{
...............
..............
//code............
..................
...................
//ecc
}
with :
main ()
....................
while(1)
{
function1();
function2();
.....
}
but dont cange nothing in memory .
always:
RAM used: 200 (54%) at main() level
316 (86%) worst case
this 316 dont cange :(
thanks
Ttelmah Guest
Posted: Sun Sep 17, 2006 6:29 am
You need to declare the functions as _separate_.
If a function is only called a few times, the compiler will default to inlining them, which makes them part of the single 'main' block.
A search on the forum, will find detailed posts of how to split things up.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum