0

I am doing research for college and part of my job is to use Xilinx Vivado to create and transfer fpga hardware programs to a RedPitaya STEMLabs 125-14. I am currently following the instructions provided by RedPitaya here (3.2.2.3 Build FPGA Image) and here (3.2.2.4 Build RP Ecosystem).

I am not particularly familiar with Linux (aside from my working on this research project) and I am currently running Ubuntu 20.04 on a Windows 11 laptop (additional specs listed further down).

So far I have Vivado 2020.1 and the Xilinx SDK dev. environment 2019.1 properly installed to my /opt directory following this instruction set here (I know they are installed properly because I am able to use both of them standalone, just not with RedPitaya's integrated modules) and have their corresponding settings64.sh files set as source values in my .bashrc file as

source <path to Xilinx installation directory>/Xilinx/Vivado/2020.1/settings64.sh
source <path to Xilinx installation directory>/Xilinx/SDK/2019.1/settings64.sh 

(I have gathered that this allows Vivado to be run by calling "vivado" in any given directory). I also have my LC_ALL variable set to C in the same file (not sure what this does, only that it was recommended in the documentation), and an export path described by export PATH=<path to Xilinx installation directory>/Xilinx/SDK/2019.1/bin:$PATH (this is called outside the .bashrc in the main terminal).

I then have a git clone of the official RedPitaya file set found in my ~ (or /home/USER) directory. From this git clone there exists an X86 file (Makefile.x86) as well as a build script SH file (build_Z10.sh), both of which I am supposed to run. There are two situations in which these commands are used, both of which result in errors.

If I follow the 3.2.2.3 instructions, I should navigate to the cloned RedPitaya folder and run make -f Makefile.x86 devicetree to download and extract the devicetree sources. In doing this, I run into the following error: cannot stat 'build/fpga//dts': No such file or directory

RedPitaya assumes in these instructions that you are using a STEMLabs 125-10 or 125-14 board in which no MODEL flag is required. This appears to not actually be the case according to a user in the RedPitaya forums. So, after following this advice and running make -f Makefile.x86 devicetree MODEL=Z10 I received a different error: [Makefile:49: prj/logic/out/red_pitaya.bit] Error 137.

I run into similar errors when trying to build the ecosystem using the automated build scripts from the same GitHub folder after running the following:

cd ./RedPitaya/build_scripts
sudo ./build_Z10.sh

I have ran into this error many times over several fresh installations, done research to find people with similar errors, etc. But I have not been able to find anyone with Error 137 or Error 2 in their Makefile errors. By best guess is hardware limitations of my laptop forcing the parent process to be killed, which would make sense considering I receive the same error in two different situations, but I am not positive.

Again I am not familiar with Linux (especially its error codes), so any pointers at all would be helpful, thank you in advance.

Specs:

Windows 11 Home x64 Version 22H2

11th Gen Intel Core i3-1125G4 @ 2.00GHz

8.00GB RAM

Running Ubuntu 20.04.5 LTS from Microsoft Store

Note: If anyone would like my detailed work-through of the RedPitaya instructions, please feel free to ask and I can get it to you.

sslerose
  • 1
  • 2
  • Error 137 is typically caused by running out of memory. If you're using WSL2, then Linux is limited to 8GB of ram, or 50% of total memory, whichever is smaller. Which WSL version are you using? – Nick ODell Nov 26 '22 at 03:35
  • Error 2, in the context of Make, just means that some other command failed. If you can fix that command, you'll also fix the error 2. – Nick ODell Nov 26 '22 at 03:43
  • The `cannot stat cannot stat 'build/fpga//dts'` error, seems like it's being caused, in part, by the variable `FPGA_PRJ` not being set. Not sure what that should be set to, but it should definitely be set to something. See Makefile.x86 line 433 to see what I'm talking about. – Nick ODell Nov 26 '22 at 03:46
  • @Nick If I go into my PowerShell and ask for a version it gives me Name: Ubuntu and Version: 2, so I assume WSL2. I believe I installed 2 in the first place because it was recommended for Windows 11 users. As for the 'cannot stat' issue, I see what you're saying in that 'FPGA_PRJ' needs to be set. However, the most previous instance of that variable is on line 224 of Makefile.x86 where its set as 'FPGA_PRJ = logic', so I don't know why it would be having this issue. – sslerose Nov 27 '22 at 04:21
  • Actually I solved the 'cannot stat' issue by specifying my board model with the tag 'MODEL=Z10'. RedPitaya said it should work without a model flag, but it ended up requiring one. I included that error to be more of a progression into understanding where my errors are flowing from and how I fixed the previous one. But thank you, now I know how/why that works! – sslerose Nov 27 '22 at 04:31

0 Answers0