Hi people, I'm using the old version of Keil compiler uVison 1. The linker is BL51 V3.70 I'm building my project from a batch file where I'm invoking the linker by the following command :
bl51 startup.obj, init.obj, rrex.obj, main.obj, uart.obj, glcd.obj, cmdp.obj, hi2c.obj, boot.obj TO TRX RS(256)
*** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?C_INITSEG *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_HI2C_SENDI2C?HI2C *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_HI2C_RECEIVEI2C?HI2C LINK/LOCATE RUN COMPLETE. 3 WARNING(S), 0 ERROR(S)
bl51 startup.obj, init.obj, rrex.obj, main.obj, uart.obj, glcd.obj, cmdp.obj, hi2c.obj, boot.obj, hrtc.obj TO TRX RS(256)
*** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?C_INITSEG *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?HRTC_INIT?HRTC *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_HRTC_SETDATE?HRTC *** WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?HRTC_READDATE?HRTC LINK/LOCATE RUN COMPLETE. 4 WARNING(S), 0 ERROR(S)
OK, I've founded my problem. The HI2C isn't displayed in the call tree of the M51 file but the HRTC module is calling it. As HTRC functions were not called, this explains why the linker doesn't refer to the HI2C uncalled segment and why the HI2C isn't refered in the call tree list. My applicative code is surely not crashing because of this. Stephane
Lesson learned: don't worry about warning messages you don't get (about your HI2C module, in this case). Not until you've resolved all the warnings you do get (those about HRTC), that is...