Inline assembly on Beaglebone.

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: too many memory references for mov'

My gcc version is:

GCC: gcc (Debian 4.6.3-14) 4.6.3


You are trying to use ARM machine language. If you run this on a PC with
the x86 GCC you get the error you reported. You need to either use ARM
cross-compiler on the PC or compile it on the ARM platform (beaglebone).

Why are you moving R0 to R0?

its a simple nop