|
|
View previous topic :: View next topic |
Author |
Message |
mojsa2000
Joined: 18 May 2010 Posts: 78
|
strange event |
Posted: Mon Jan 03, 2011 2:30 pm |
|
|
Hi
In the variables definition, when I comment some variables or delete them, the "out of ROM" message is shown. Why?
first:
Code: | static float energy,total_energy;
static float v_out,i_out;
static float hourly_positive_power=0,hourly_negative_power=0;
static float daily_positive_power,daily_negative_power;
static float hourly_Energy=0;
float daily_Energy=0;
float time_coeff=1;
float v_buffer,i_buffer;
float v_dc,i_dc;
|
then:
Code: | static float energy,total_energy;
static float v_out,i_out;
//static float hourly_positive_power=0,hourly_negative_power=0;
//static float daily_positive_power,daily_negative_power;
static float hourly_Energy=0;
float daily_Energy=0;
float time_coeff=1;
float v_buffer,i_buffer;
float v_dc,i_dc; |
makes a "out of ROM " message. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Mon Jan 03, 2011 2:39 pm |
|
|
This usually implies that removing the definition, makes the function smaller, so the compiler tries to put it 'inline', the resulting 'lump' of code is then too large to fit in a single memory page, so 'out of ROM'.
It is slightly odd, but the result of optimisation going too far, and the compiler being a little 'dumb' regarding memory pages.
Look at what subroutines are inside this function, and try declaring some of them as 'separate', and the problem should disappear.
Best Wishes |
|
|
mojsa2000
Joined: 18 May 2010 Posts: 78
|
|
Posted: Mon Jan 03, 2011 3:23 pm |
|
|
thanks Ttelmah.
I'll do it.
best regards |
|
|
|
|
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
|