View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Wed Jan 03, 2024 7:01 am |
|
|
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
|
|
Posted: Wed Jan 03, 2024 7:16 am |
|
|
Thank you, Ttelmah. I see your point.
For a moment, I forgot that RAM is volatile memory. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Wed Jan 03, 2024 7:40 am |
|
|
Ooops!... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Thu Jan 04, 2024 2:49 am |
|
|
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. |
|
|
|