#16062 - DarkPhantom - Sat Feb 07, 2004 4:37 pm
I'm having trouble with getting inline assembly to work with GCC. I'm using VHAM and I think the problem is that VHAM doesn't properly configure the compiler to accomidate it. The compiler doesn't reconginize the "asm" or the "__asm" keywords. It simply rejects that token. Everything works fine if I write an assembly function in its own source file and then assemble it to link with the c code.
In addition, does anybody know how to access link script values like "__sp_usr" without using assembly? I can use an assembly function to return these values i.e.
ld r0,=__sp_usr
bx lr
but I can't figure out the C syntax for the same thing. I tired using
extern unsigned long __sp_usr;
but that only causes the compiler to generate a global varialble.
In addition, does anybody know how to access link script values like "__sp_usr" without using assembly? I can use an assembly function to return these values i.e.
ld r0,=__sp_usr
bx lr
but I can't figure out the C syntax for the same thing. I tired using
extern unsigned long __sp_usr;
but that only causes the compiler to generate a global varialble.