Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
C headers in assembly
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
119 subscribers
Views
3094 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
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
C headers in assembly
Rohan Gandhi
over 12 years ago
Note: This was originally posted on 5th April 2011 at
http://forums.arm.com
Hello!
I am facing a problem while including a C header in the assembly.
My assembly code is as follows -
#include "header01.h"
.syntax unified
.text
.thumb
/* uint8 mycode_func(void) */
.global mycode_func
.func mycode_func, mycode_func
.type mycode_func, %function
.thumb_func
mycode_func:
mov R0, #MY_CONSTANT
.endfunc
header01.h has -
#define MY_CONSTANT 10
This code gives an error - undefined symbol MY_CONSTANT.
If I change mov R0, #MY_CONSTANT to mov R0, 10, it works well.
What do I need to do to get this to work?
Thanks in advance!!
Parents
Marcus Harnisch
over 12 years ago
Note: This was originally posted on 5th April 2011 at
http://forums.arm.com
Are you are compiling this with the GCC frontend? Works just fine here (Sourcery G++ Lite 2010.09-51).
Regards
Marcus
Cancel
Vote up
0
Vote down
Cancel
Reply
Marcus Harnisch
over 12 years ago
Note: This was originally posted on 5th April 2011 at
http://forums.arm.com
Are you are compiling this with the GCC frontend? Works just fine here (Sourcery G++ Lite 2010.09-51).
Regards
Marcus
Cancel
Vote up
0
Vote down
Cancel
Children
No data