CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

abaut memory

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ferrarilib



Joined: 11 Jun 2005
Posts: 38

View user's profile Send private message

abaut memory
PostPosted: Sun Sep 17, 2006 3:58 am     Reply with quote

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







PostPosted: Sun Sep 17, 2006 4:04 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Sep 17, 2006 6:00 am     Reply with quote

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







PostPosted: Sun Sep 17, 2006 6:29 am     Reply with quote

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.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group