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

STM32F051C8

Hello! How can i call function from asm file to the c file into one project using directive EXPORT?
Thanks.

Parents
  • That sounds complicated. If you want an assembler file to call a C function, it's a bit interesting why you want to use the keyword EXPORT. Don't you think that would be the reverse of what you need?

    If the assembler is going to call a C function, you would need to import the C function name into the assembler file "name space". Export is if you want a symbol in the assembler file to be reachable from some other file, in which case the symbol name must exist in the object file so the linker can find and match the symbol later.

    How to do that? In the same way that all the Keil assembler startup files does so the startup files can call helper functions in the CRTL and/or main().

Reply
  • That sounds complicated. If you want an assembler file to call a C function, it's a bit interesting why you want to use the keyword EXPORT. Don't you think that would be the reverse of what you need?

    If the assembler is going to call a C function, you would need to import the C function name into the assembler file "name space". Export is if you want a symbol in the assembler file to be reachable from some other file, in which case the symbol name must exist in the object file so the linker can find and match the symbol later.

    How to do that? In the same way that all the Keil assembler startup files does so the startup files can call helper functions in the CRTL and/or main().

Children
No data