[beagleboard] Assembly help with beaglebone. Undefined symbol.

2015-10-20 Thread javaid . salman
I have a pretty simple program below void foo() { int r5 = 0; int a = 0; asm ( "mov r5, $4\n\t" "add r5, a" ); } void main (void) { foo(); } When I compile it, I get: /tmp/ccM76e6z.s: Assembler messages: /tmp/ccM76e6z.s:36: Error: undefined symbol a

[beagleboard] Inline assembly on Beaglebone.

2015-10-17 Thread javaid . salman
I have been trying to run inline assembly on Beaglebone black. I used example from this tutorial and my code is here void main(void) { asm("mov r0,r0"); } But when I run with gcc gcc helloworld.c -o helloworld gcc returns: Error: