This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Included files and directieve IMPORT

I'm learning assembler language (Keil) for cortex-mX in university.
The project consists of several files.
How to make links from one file visible in another file? In order to be used in code. For example procedures from one file are visible to other files. The use of the "EXPORT procname" from one file and "IMPORT procname" to another file highly uncomfortable. I tried all of the Directive "IMPORT procname" to collect in one file that connects to every project file with the INCLUDE Directive. But appears a message like "error: A1108E: Multiply defined symbol '__main'". How to solve this issue?
Project structure similar to this:
file "Main.s"

                AREA        |.main|, CODE, READONLY, ALIGN=2

                INCLUDE    Include.inc

__main          PROC      ; in this file "multiply defined symbol '__main'"
                EXPORT      __main
                ...
                LDR R0, =sheduller
                ...
                ; any code
                ...
                B.W         __main
                ENDP
                END

file "sheduller.s"

                AREA        |.sheduller|, CODE, READONLY, ALIGN=2

                INCLUDE    Include.inc

sheduller       PROC      ; in this file "multiply defined symbol 'sheduller'"
                EXPORT      sheduller
                ...
                ; any code
                ...
                ENDP
                END

file "handlers.s"

                AREA        |.handlers|, CODE, READONLY, ALIGN=2

                INCLUDE    Include.inc

IRQhandler      PROC      ; in this file "multiply defined symbol 'IRQhandler'"
                EXPORT      IRQhandler
                ...
                ; any code
                ...
                ENDP
                END

file "Include.inc"

                AREA        |.include|, CODE, READONLY, ALIGN=2

                IMPORT __main
                IMPORT sheduller
                IMPORT IRQHandler
                ...

                END