Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
how to call a extern function within embedded ASM ?
Jump...
Cancel
Locked
Locked
Replies
6 replies
Subscribers
118 subscribers
Views
5874 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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 ?
Sebastian Gaertner
over 12 years ago
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
Peter Harris
over 12 years ago
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.
Cancel
Vote up
0
Vote down
Cancel
Reply
Peter Harris
over 12 years ago
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.
Cancel
Vote up
0
Vote down
Cancel
Children
No data