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

how to call a extern function within embedded ASM ?

Note: This was originally posted on 4th June 2009 at http://forums.arm.com

is it possibe to get the embedded assembly to call my function1()?
How do I write this ?

Thanks!
Parents
  • Note: This was originally posted on 4th June 2009 at http://forums.arm.com

    You need to import the symbol for the C function in to your assembler file (equivalent of "extern" in C). Assuming you are using the ARM tools the syntax for this is:

    IMPORT function_name

    Then you assembler codecan use that like any other label:

    bl function_name

    You need to make user you obey the calling convention ABI which you compiler uses.
Reply
  • Note: This was originally posted on 4th June 2009 at http://forums.arm.com

    You need to import the symbol for the C function in to your assembler file (equivalent of "extern" in C). Assuming you are using the ARM tools the syntax for this is:

    IMPORT function_name

    Then you assembler codecan use that like any other label:

    bl function_name

    You need to make user you obey the calling convention ABI which you compiler uses.
Children
No data