8lu3 wrote: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-gnuabihf all
Maybe you have to clone the project again. I had some trouble building the api after a failed attempt. Hope that helps
Getting Error while running make command
-
- Posts: 54
- Joined: Tue Feb 02, 2016 8:42 pm
Re: Getting Error while running make command
The instructions here: https://github.com/RedPitaya/RedPitaya/ ... /README.md do NOT mention the setting of the CROSS_COMPILE environment variable. Is this an omission?
-
- Posts: 12
- Joined: Tue Mar 08, 2016 8:47 am
Re: Getting Error while running make command
Hi,
I did followed each step you have mentioned. The api is successfully complied but as soon as I run make Cross_Compile command for compiling Examples/C, it gives error. I also tried it with "make digital_led_blink" but no success. Following is the error:
Any thoughts on this?
Regards
I did followed each step you have mentioned. The api is successfully complied but as soon as I run make Cross_Compile command for compiling Examples/C, it gives error. I also tried it with "make digital_led_blink" but no success. Following is the error:
Code: Select all
haris@ubuntu:~/Downloads/RedPitaya/Examples/C$ 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
/tmp/ccD5vsgk.o: In function `main':
/home/haris/Downloads/RedPitaya/Examples/C/digital_led_blink.c:22: undefined reference to `rp_Init'
/home/haris/Downloads/RedPitaya/Examples/C/digital_led_blink.c:29: undefined reference to `rp_DpinSetState'
/home/haris/Downloads/RedPitaya/Examples/C/digital_led_blink.c:31: undefined reference to `rp_DpinSetState'
/home/haris/Downloads/RedPitaya/Examples/C/digital_led_blink.c:36: undefined reference to `rp_Release'
collect2: error: ld returned 1 exit status
make: *** [digital_led_blink] Error 1
Regards
-
- Posts: 30
- Joined: Thu Feb 25, 2016 7:05 pm
Re: Getting Error while running make command
Do you get a similar error for 'make CROSS_COMPILE=arm-linux-gnueabi- all' ? Does the librp.so file exist in RedPitaya/api/lib ?
By the way, you have to call make CROSS_COMPILE=arm-linx-gnueabi-all digital_led_blink .
By the way, you have to call make CROSS_COMPILE=arm-linx-gnueabi-all digital_led_blink .
-
- Posts: 12
- Joined: Tue Mar 08, 2016 8:47 am
Re: Getting Error while running make command
Yes I do have librp.so file inside lib folder. Regarding make CROSS_COMPILE=arm-linx-gnueabi-all digital_led_blink, I get this error when i execute it:
Even tough I have followed everything you said.
Even tough I have followed everything you said.
Code: Select all
make CROSS_COMPILE=arm-linx-gnueabi-all digital_led_blink
arm-linx-gnueabi-allgcc -g -std=gnu99 -Wall -Werror -I../../api/include -L ../../api/lib -lm -lpthread -lrp digital_led_blink.c -o digital_led_blink
make: arm-linx-gnueabi-allgcc: Command not found
make: *** [digital_led_blink] Error 127
-
- Posts: 30
- Joined: Thu Feb 25, 2016 7:05 pm
Re: Getting Error while running make command
You have to use 'make CROSS_COMPILE=arm-linux-gnueabihf- all' not 'make CROSS_COMPILE=arm-linux-gnueabi- all' . Did you use the soft floated (hard floated compiler: arm-linux-gnueabihf-gcc; soft floated compiler: arm-linux-gnueabi-gcc) version for building the api as well? Have you installed the hard floated (hf) compiler as I said previously?
Also you missed a whitespace between "-" and all in your command.
Please, run this command in RedPitaya/Example/C/program_folder . It will build the program, if you have installed arm-linux-gnueabihf-gcc (hf version) and the api was build with this hf version.
Also you missed a whitespace between "-" and all in your command.
Please, run this command
Code: Select all
arm-linx-gnueabihf-gcc -g -std=gnu99 -Wall -Werror -I../../api/include -L ../../api/lib -lm -lpthread -lrp digital_led_blink.c -o digital_led_blink
- redpitaya
- Site Admin
- Posts: 907
- Joined: Wed Mar 26, 2014 7:04 pm
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Getting Error while running make command
Sorry, I've been down with the flu over the weekend.
To recapitulate and bring all the different contributions that were made in the meantime into context:
The prerequisites listed in the README on github are incomplete if one wants to do a full build. Starting from a freshly installed Ubuntu 14.04, the following steps are neccessary:(for any target) you need to execute in the RedPitaya directory. You need to do this once each time you open a new terminal window.
To recapitulate and bring all the different contributions that were made in the meantime into context:
The prerequisites listed in the README on github are incomplete if one wants to do a full build. Starting from a freshly installed Ubuntu 14.04, the following steps are neccessary:
- fake gmake:
Code: Select all
sudo ln -s /usr/bin/make /usr/bin/gmake
- install additional packages:
Code: Select all
sudo apt-get install device-tree-compiler u-boot-tools gcc-multilib g++-multilib libncurses5-dev lib32z1 git
- prepare toolchain directories: with the prepared directories, the following two steps can be done without elevated privileges, and it is not neccessary to change the permissions afterwards
Code: Select all
sudo mkdir /opt/Xilinx /opt/linaro sudo chown $USER:$GROUP /opt/Xilinx/ /opt/linaro/
- download and unpack the linaro toolchain - downloading and unpacking manually should work just as well as using curl etc.
- download, install, and license Vivado 2015.4 (Webpack), be sure to select the SDK during setup
- clone the Red Pitaya repository:
Code: Select all
git clone https://github.com/RedPitaya/RedPitaya RedPitaya/
Code: Select all
make
Code: Select all
. ./settings.sh
-
- Posts: 11
- Joined: Fri Apr 22, 2016 9:40 pm
Re: Getting Error while running make command
Hi , the previous posts are I believe issues with cross compiling on a host linux machine? My problem is that i cannot make any of the examples on the RP board directly. I have followed "How_to_make_simple_program" on the wiki (latest instructions), including make api which completed ok.
the errors are (for compiling analog_inputs:
undefined reference to `rp_Init'
undefined reference to `rp_AIpinG
undefined reference to rp_Release'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'analog_inputs' failed
I have no idea what these errors mean, so wondered if anyone could provide the corrections to the wiki instructions?
thanks in advance,
the errors are (for compiling analog_inputs:
undefined reference to `rp_Init'
undefined reference to `rp_AIpinG
undefined reference to rp_Release'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'analog_inputs' failed
I have no idea what these errors mean, so wondered if anyone could provide the corrections to the wiki instructions?
thanks in advance,
-
- Posts: 11
- Joined: Fri Apr 22, 2016 9:40 pm
Re: Getting Error while running make command
Thought it might be useful to again ask for support on this problem, as there must be many out there who have sucessfully managed to compile the examples on the RP board. In fact I can compile them on the old 0.95 ecosystem, but not on the current 0.96-20. According to the website, in order to run the professional scope app, I have to use 0.96-20, as it no longer runs on the 0.95 release. The compilation instructions are unchanged from the 0.95 rev. so is it possible that there is some small difference in the way they should be compiled in the current version??
thanks for any help,
thanks for any help,
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Getting Error while running make command
I am currently looking into that, and I don't believe that there are many people who have successfully compiled things on the RP locally with the latest release.
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: juretrn and 93 guests