Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/20/00 07:44
Read: times


 
#2268 - RE: Linker error.
> To my astonishment, there is always
> an error shown as below:

It is not an error, just warning. My coworker has such a strange programming style, that he always gets 15-20 such warnings :)


> Micro Series Universal Linker
> V4.43K/DXT

Ohh, there should be ol' good IAR compiler :)


> Warning[16]: Function memset in module
> memset ( c:icccl8051l.r03 ) is
> called from two function trees ( with
> roots main and clear_sms_message )

_Sometimes_ it means exactly that you're calling memset() from main() AND from clear_sms_message(), which in turn is called from main(), directly or NOT.

The problem is internal RAM distribution performed by this IAR development package. Function arguments and local variables have _fixed_ locations, so, if such call overlap may occur (eg, clear_sms_message() is an ISR), results will be unpredictable. I still do not understand why linker doesn't distinguish an ISR and an "standard" function there :(

So, in order to get rid of such warnings, you should avoid to call the same function with different SP. (I do not say that's always possible.)

My suggestion is to keep track of where your ISRs are called and disable interrupts such that no call overlap is actually possible. And these warnings should be just ignored.
--
Tomas

List of 3 messages in thread
TopicAuthorDate
Linker error.            01/01/70 00:00      
RE: Linker error.            01/01/70 00:00      
RE: Linker error.            01/01/70 00:00      

Back to Subject List