do i need a coss compilation ?

Hello,

I am new to development on beagle board(beagle board xm ) . i have
developed an application which compiles and runs just fine on ubuntu
11.04 running on an i686 machine . I have compiled my code using "gcc
code.c -o code" . when i compile and run the same code on beagle board
with same compile statement , it compiles just fine but the runtime
behavior of the code is very different from what it is on i686
machine . Do i need to supply some options in compile statement or is
there a completely different way to compile code for omap kernels .
kernel i am running on beagle board is linux omap 3.0.4-x3 .

Please let me know if some more information is required to answer my
question .

Hello,

I am new to development on beagle board(beagle board xm ) . i have
developed an application which compiles and runs just fine on ubuntu
11.04 running on an i686 machine . I have compiled my code using "gcc
code.c -o code" . when i compile and run the same code on beagle board
with same compile statement , it compiles just fine but the runtime
behavior of the code is very different from what it is on i686
machine . Do i need to supply some options in compile statement or is
there a completely different way to compile code for omap kernels .
kernel i am running on beagle board is linux omap 3.0.4-x3 .

I use this "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
BTW, Cross compilation is faster but you need to setup the environment
once and it has some quirks sometimes, you can also compile natively
(gcc on the BB board), or even you can use qemu

It might help if you expand on what you mean by "runtime behavior of
the code is very different"... aka the details :wink:

Regards,

A question from a fellow learner: Are the APIs the same in the x86 and the ARM environments - so that merely compiling code on the different machines could make it ‘runable’ on the particular hardware?

Mark.

Mostly yes. That is a great thing about embedded Linux, you can do 90%
of the development work from the comfort of your host PC and then
move it over to the ARM hardware..

Cool. What’s the 10 per cent that likely has to be done on ARM? I’m guessing that the file system would be the same.

My code talks to a device through serial port and reads/writes to it .
On my host pc where i wrote the application, it works fine but when i
ported it to beagle board, sometimes device does not respond to the
commands written to it. and sometimes it sends the same data
twice,which ideally should be sent once.