I have a project which include a source file sub.c. In Sub.c I wrote a lot of subroutines independently with each other. In each subroutin I define several local variables. The variables in these subroutines should be overlayable between different subroutines. But it is not like that. The linker always declares error when the summary of variables in all these subroutines is too large. It seems the variables are not overlayable. But in .lst file, the variables are overlayable. Pls analyse that for me. Thanks
Though the linker overlays local variables to maximize usage of available space, this does not give you infinite storage; you can still exceed available resources. Try relocating some of your less often-used variables to idata or xdata (if available on your target), or analyze your list and m51 files to see where you might be able to optimize your memory usage.
if the compiler is not set for optimize level 2 or higher no ovberlay takes place. Erik