Hello All,
i wanted to apply some modular approach in my program designing, so i decided to pre-write some common modules which are frequently used by me (like a customizable 7 segment display code, LCD code, etc.) and include (add, or whatever) the corresponding file whenever i needed it.
Say, i am working on a new project and i want 7 segments, i simply include it's assembly file into the new one (or it's library, what ever is feasible) and since the code is fully customizable i call the corresponding functions to "initialize" the pre-written 7 segment code so that it can adapt to new project.
(i am creating segments and using DS control statements so that i don't have to worry for memory allocation, overlapping, etc.)
Now the problem is:
if i use the $INCLUDE(<complete filepath>) directive, then the linker gives me an error: L5: CODE SPACE MEMORY OVERLAP From: 0000H To: 0001H But i haven't included any code in this memory segment in the base (inherited) assembly file! i am only using an interrupt code-
CSEG 001B LJMP Base_Timer1_ISR
Yes there is a code in my new file (derived file) starting at 0000 and simply jumping to a pre-defined Main label (also in the new file)
i am unable to resolve this! Please help. There are ABUNDANCE of resources on how to link assembly and c files, but nothing about this problem.
Also, would using library files be more beneficial? if yes, please refer me to some material which solves my purpose described above.
Thank You for Your time.