I have four functions that the linker gives me the warning:
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?UART_RX_ISR_STUB?ISR *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?TIMER0_ISR_STUB?ISR *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?TIMER2_ISR_STUB?ISR *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?ASDC0_ISR_STUB?ISR
The way C51 does its work, it has to know about all possible execution paths. This means that calls into the compiled code from out of the blue, which the compiler knows nothing about, are essentially forbidden. You have to tell the compiler about those functions being called from elsewhere. That's where the OVERLAY linker control enters the game. Use it.
Okay I'm now using the OVERLAY directive for this. Works well, thank you. One more question ... say for example I didn't want my project to have a main(). The reason is, the app is launched from my bootloader code which lives at 0000H. My app lives at 0C00H and doesn't need a main(). Without a main(), the project cannot be compiled because overlaying does not occur and overflow happens. Instead of specifying the OVERLAY directive for every single function in my project, can I specify the OVERLAY directive for the entire project?
What linker actually looks for, is segment ?C_C51STARTUP. Usually it is defined in startup.a51 but you can define it in your custom startup code.
Can you give me some clues as to where to look on how to do that?
View all questions in Keil forum