I just migrated a project from Keil 3 to Keil 5 (C51 = V9.56.0.0 & LX51 4.66.66.0
I get the following (new) warnings:
*** WARNING L48: IGNORED RECURSIVE CALL CALLED: _SMBUS_SET_PACKET_DATA/SMBUS CALLER: SMBUS *** WARNING L48: IGNORED RECURSIVE CALL CALLED: SMBUS CALLER: _SMBUS_SET_PACKET_DATA/SMBUS
puzzle is that while there is a routine called smbus_set_packet_data there is no routine called smbus. In fact the routine is reproduced below:
static void smbus_set_packet_data(uint8_t pos, uint8_t val,uint8_t info) { smbus_packet[pos] = val; smbus_packet_info[pos] = info; }
What does the above warning indicate?
What exactly did the linker ignore? (Any calling sequence not included in the final binary?
thanks for the clarifications.
The manuals say it's to do with function pointers:
http://www.keil.com/support/man/docs/bl51/bl51_l48.htm
http://www.keil.com/support/man/docs/lx51/lx51_l48.htm
So is "smbus" the name of a function pointer ... ?
Or a Module (source file), rather than a "routine" ... ?
it is a module ie source file. i believe it has to do with a "static array" access within this source file. (Multiple patterns).
i have resolved the issue but i would think it is a linker bug.
thanks anyhow.
No, it's not.
As already noted, there are very specific restrictions on the use of function pointers due to the nature of the underlying 8051 hardware architecture.
You have to be very careful indeed about using function pointers in C51. It requires quite a detailed understanding of the Linker operation. There's a couple of app notes that you really need to study thoroughly.
Do a forum search for "function pointer" ...
www.catb.org/.../smart-questions.html
there are no function pointers involved in this case.
Hey. I have the same bug. How did you fix it4.
In my case the offending function was very small. Ended up removing the function and inserted the instructions. (Cost - about 12 bytes.) YMMV
if you are interested, please email me privately (rsrinivasan at abiomed com) i can share some snippets.
Oh.
Do you have (a) funtion(s) being called from both interrupt and "mainline" code ?
yes.
So you do have a function (or functions) called from both "mainline" and interrupt code?
That, then, is probably what the warning referred to as a "recursive" call.
That is a Bad Thing for C51 - because of the way the Overlaying works.
Your approach of "inlining" the code - instead of calling it - is a safe solution.
You can also look at tur oningverlay linker opt. Ion of fon th elin ker.
View all questions in Keil forum