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 support@ccsinfo.com

Out of ROM, A segment or the program is too large
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19231

View user's profile Send private message

PostPosted: Wed Jan 03, 2024 7:01 am     Reply with quote

Of course _NOT_.

Use your brain. RAM is empty when you switch the chip on. Where is it's
contents going to come from?????

Constants, and the initialisation values for RAM, have to be stored in ROM.
Now, if (for example), you have an external EEPROM, then you can add code
to initialise from this. So (for example), I have code with hundreds of strings
that are loaded from external EEPROM at boot. We store different values
in this according to the language being used.
kgng97ccs



Joined: 02 Apr 2022
Posts: 97

View user's profile Send private message

PostPosted: Wed Jan 03, 2024 7:16 am     Reply with quote

Thank you, Ttelmah. I see your point.

For a moment, I forgot that RAM is volatile memory.
Ttelmah



Joined: 11 Mar 2010
Posts: 19231

View user's profile Send private message

PostPosted: Wed Jan 03, 2024 7:40 am     Reply with quote

Very Happy

Ooops!...
Ttelmah



Joined: 11 Mar 2010
Posts: 19231

View user's profile Send private message

PostPosted: Thu Jan 04, 2024 2:49 am     Reply with quote

As a comment, the .sym file is your friend.

Open this in the IDE, and it shows where every variable is stored in RAM,
and below this where the constants an routines are in the ROM. Allows
you to see which things are particularly large and possibly then look at
them and see if there are any obvious savings.
Gives great guidance as to where to look.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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