Topic : POSSIBLE LOOP IN OVERLAY PROCESSING

Forum : 8051

Original Post
Post Information Post
April 20, 2010 - 6:00pm
Guest

Hi,

Here is a bit of background: I work with a Silicon Labs C8051F330 microcontroller using Silabs IDE and Raisonace compiler.
I have some code that compiles and builds with 2 identical warnings:
***WARNING 22 : POSSIBLE LOOP IN OVERLAY PROCESSING (USE 'NOOVERLAY' OPTION).
(NAME: _writeRegister)
After the warning I get the name of the function that might cause this.

I am using optimisation level 6. Changing to optimisation level 4 did not sort the problem out.
I looked into RC-51 reference manual and found that I can use a #pragma to change to 'NOOVERLAY'.
I have done:
#pragma NOOVERLAY
writeRegister (){
..

}

but the warnings are still there.

Any idea what I can cause this?
Many thanks,
zzippo

Replies
Post Information Post
+1
0
-1
April 22, 2010 - 10:45am
Guest

This problem occurs typically with recursive function. Is writeRegister recursive ?
If it it the case, and you know that there is no problem with the local variables, just ignore the warning. I know that the warning is output even with functions declared as reentrant. We will remove the warning in this case.

+1
0
-1
April 22, 2010 - 4:26pm
Guest

Hi Francis,
This problem occurs typically with recursive function. Is writeRegister recursive ?
No it is not.

If it it the case, and you know that there is no problem with the local variables, just ignore the warning. I know that the warning is output even with functions declared as reentrant. We will remove the warning in this case.
The function is not reentrant either. Should I ignore the warning?

Thank you for your help,
zzippo

+1
0
-1
April 29, 2010 - 2:41pm
Guest

As I said, the error message is supposed to be generated when a recursive call is found. If it is not the case, it would be nice to send us an example to analyze the situation.
On the principle, when the warning is generated, the overlay is not applied to the branch that is being analyzed. Therefore, YES, the warning can be just ignored. The warning means that the resulting overlay rules could be better, but with a potential risk. Giving up the overlay mechanism is not risky, but the overall data consumption could be higher than the optimal solution.

+1
0
-1
April 29, 2010 - 4:02pm
Guest

Hi Francis,
Thank you for your response. If you want to have a look at the code please ask Matloub to send you the project called Scenario 1 and build it to get the warning.
If you find any problems could you please send me an email? I would not like to post code here.

Kind Regards,
zzippo