Executing cross compiled c on the Red Pitaya

Just about everything about Red Pitaya
Post Reply
Mark Corrigan
Posts: 9
Joined: Mon Jul 06, 2015 12:10 pm

Executing cross compiled c on the Red Pitaya

Post by Mark Corrigan » Wed Jul 08, 2015 1:36 pm

I wrote a basic hello world c program for the Red Pitaya - just as an initial proof it would work.

The program;

Code: Select all


#include <stdio.h>

main()
{
    printf("hello red pitaya\r\n");
}

Can't be much wrong with that?!

After that I compiled it with the latest arm cross compiler I could find - arm-linux-gnueabi-gcc;

Code: Select all

arm-linux-gnueabi-gcc hello_red_pitaya.c -o hello_red_pitaya
After this I'm scp-ing it across to the Red Pitaya from my Linux box;

Code: Select all

scp hello_red_pitaya root@192.168.1.100:/root


Then I ssh into the red pitaya and try to execute the compiled file;

Code: Select all

./hello_red_pitaya
However, I'm met with the error;

Code: Select all

sh ./hello_red_pitaya: not found
Does it think it's supposed to be a shell script of something?

Thanks!

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Executing cross compiled c on the Red Pitaya

Post by Arnold » Wed Jul 08, 2015 1:48 pm

does the operating system use soft-float or hard-float?

how to figure out:
http://raspberrypi.stackexchange.com/qu ... -of-debian

soft-float: arm-linux-gnueabi-gcc
hard-float: arm-linux-gnueabihf-gcc
Last edited by Arnold on Wed Jul 08, 2015 1:54 pm, edited 1 time in total.

Mark Corrigan
Posts: 9
Joined: Mon Jul 06, 2015 12:10 pm

Re: Executing cross compiled c on the Red Pitaya

Post by Mark Corrigan » Wed Jul 08, 2015 1:54 pm

That was it thank you! I was compiling for hard float - turns out it wants soft float.

Could you kindly explain the difference if you have time?


Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 3 guests