Getting Error while running make command

Applications, development tools, FPGA, C, WEB
mharis
Posts: 12
Joined: Tue Mar 08, 2016 8:47 am

Getting Error while running make command

Post by mharis » Sat Mar 12, 2016 2:30 am

Hi all,
I am new to Red Pitaya, I am trying to run digital_led_blink.c program but as soon as I run make command, I am getting this error.

Code: Select all

 make digital_led_blink
gcc -g -std=gnu99 -Wall -Werror -I../../api/include -L ../../api/lib -lm -lpthread -lrp    digital_led_blink.c   -o digital_led_blink
/usr/bin/ld: cannot find -lrp
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'digital_led_blink' failed
make: *** [digital_led_blink] Error 1
Kindly help me out with this issue.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Getting Error while running make command

Post by Nils Roos » Sat Mar 12, 2016 2:55 am

Have you done "make api" previously ?

mharis
Posts: 12
Joined: Tue Mar 08, 2016 8:47 am

Re: Getting Error while running make command

Post by mharis » Sat Mar 12, 2016 3:07 am

Yes, on that too i am getting error. Even though I have followed the same instructions as mentioned on GitHub. What could be the reason?
Can you share some simplified steps to execute this program?

Best Wishes

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Getting Error while running make command

Post by Nils Roos » Sat Mar 12, 2016 3:17 am

Are you doing this on the Red Pitaya or on some other machine ? If it's another machine, you need to set it up to use the linaro toolchain (as described in the github README).

mharis
Posts: 12
Joined: Tue Mar 08, 2016 8:47 am

Re: Getting Error while running make command

Post by mharis » Sat Mar 12, 2016 3:26 am

I didn't understand your question properly. Definitely, I want to run it on Red Pitaya board. But as mentioned on GitHub firstly I have to make digital_led_blink file and then copy it to red pitaya using scp command. The issue in my case is "make" is not working neither "make api" nor "make digital_led_blink file". So what could be the issue?

P.s I have Linux Ubuntu 14.04 in my PC.

Regards

mharis
Posts: 12
Joined: Tue Mar 08, 2016 8:47 am

Re: Getting Error while running make command

Post by mharis » Sat Mar 12, 2016 3:36 am

To add further, on GitHub these steps are mentioned to install ARM Tool Chain:
TOOLCHAIN="http://releases.linaro.org/14.11/compon ... ihf.tar.xz"
curl -O $TOOLCHAIN
sudo mkdir -p /opt/linaro
sudo chown $USER:$USER /opt/linaro
tar -xpf *linaro*.tar.xz -C /opt/linaro

So in my case curl -O command has no effect,it is not working. I believe it should download this release from the given link. Also tar command is also throwing error.
As an alternative what i did is that I manually downloaded the required file and extract it to /opt/linaro folder. Is it a right approach? Because in my case these given commands are not working.

8lu3
Posts: 30
Joined: Thu Feb 25, 2016 7:05 pm

Re: Getting Error while running make command

Post by 8lu3 » Sat Mar 12, 2016 3:45 pm

I guess you have to call make CROSS_COMPILE=arm-linux-gnueabihf- or set export CROSS_COMPILE before in bash.
The curl command didnt work for me, too. I had to install in manually. Bes sure it's the hard floated version and add the bin directory (where arm-linux-gnueabihf-gcc is located) to your PATH-variable.

And of course you have to make api in RedPitaya/ directory before trying to build the examples. (again with CROSS_COMPILE)

mharis
Posts: 12
Joined: Tue Mar 08, 2016 8:47 am

Re: Getting Error while running make command

Post by mharis » Sat Mar 12, 2016 7:57 pm

Hi,
Can you share please the steps to compile and execute any ".c " file, given in Examples/C on Git-hub. It has been two days and I am unable to execute anything on RedPitaya.

Best Regards

8lu3
Posts: 30
Joined: Thu Feb 25, 2016 7:05 pm

Re: Getting Error while running make command

Post by 8lu3 » Sat Mar 12, 2016 9:28 pm

Download Vivado 2015.4 (License is "WebPack" or something like that). You can download everything or just Vivado WebPack and the SDK. There is also a vivado downloader which installs the components you want. Install to /opt/Xilinx. Add /opt/Xilinx/Vivado/2015.4/bin and /opt/Xilinx/SDK/2015.4/bin to $PATH.
run
sudo chown -R $you:$you /opt/Xilinx (maybe -r instead of -R)
sudo apt-get install libc6-dev-armel-cross
sudo apt-get install build-essential

Download arm-linux-gnueabihf 4.9 2011.4 manually
sudo mkdir -p /opt/linaro
sudo chown $you:$you /opt/linaro
unpack the downloaded arm-linux.. archive to /opt/linaro
add /opt/linaro/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin to $PATH (third directory may differ)

go to your RedPitay directory in shell
run make CROSS_COMPILE=arm-linux-gnueabihf- api
go to Examples/C in shell
run make CROSS_COMPILE=arm-linux-gnueabihf- all

Maybe you have to clone the project again. I had some trouble building the api after a failed attempt. Hope that helps
Last edited by 8lu3 on Sun Mar 13, 2016 9:58 pm, edited 1 time in total.

mharis
Posts: 12
Joined: Tue Mar 08, 2016 8:47 am

Re: Getting Error while running make command

Post by mharis » Sat Mar 12, 2016 9:50 pm

Thanks alot, I am going to try this. Will post the results here. once again thanks.

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 61 guests