Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
university:tools:pluto:building_the_image [05 Jun 2020 15:17] – update Robin Getzuniversity:tools:pluto:building_the_image [25 May 2023 23:21] (current) – [Prerequisites] Charles Armer
Line 8: Line 8:
  
   - Make sure to download, or upgrade your [[university:tools:pluto:obtaining_the_sources|Sources]]   - Make sure to download, or upgrade your [[university:tools:pluto:obtaining_the_sources|Sources]]
-    * Make sure you have the recommended/required Vivado versions. It's likely listed in the //archive// section of the Xilinx web site. To check out what you need, look at the following tcl file (which was checked out in the sources link above). <xterm+    * Make sure you have the recommended/required Vivado versions. It's likely listed in the //archive// section of the Xilinx web site. To check out what you need, look at the following tcl file (which was checked out in the sources link above). <code shell
-rgetz@brain:~/github/temp/plutosdr-fw$ **grep -REQUIRED_VIVADO_VERSION $(find ./ -name adi_project.tcl) | grep set** +rgetz@brain:~/github/temp/plutosdr-fw$ grep -REQUIRED_VIVADO_VERSION $(find ./ -name "adi*.tcl") | grep set 
-  set REQUIRED_VIVADO_VERSION "2018.2+  set required_vivado_version "2021.1
-</xterm+</code
-  - [[https://www.xilinx.com/support/download.html|Xilinx Vivado Design Suite]] +  - You need [[xilinx>support/download.html|Xilinx Vivado Design Suite]] to compile the Verilog into the FPGA bit file. 
-  - [[https://www.xilinx.com/support/download.html|Xilinx Vivado SDK]] +  - You need [[xilinx>support/download/index.html/content/xilinx/en/downloadNav/vitis.html|Xilinx Vivado Vitis]] to compile C code for the ARM inside the AMD Zynq. 
-    * Depending on the version of Xilinx tools, you need to make sure that you have the 32-bit libraries (the Xilinx tools are distributed as 32-bit binaries).+    * If you are using very old versions of Xilinx tools, you need to make sure that you have the 32-bit libraries (the Xilinx tools are distributed as 32-bit binaries).
 <WRAP box bggreen> <WRAP box bggreen>
 <wrap info>This specifies any shell prompt running on your Linux development host </wrap> <wrap info>This specifies any shell prompt running on your Linux development host </wrap>
 <xterm> <xterm>
 rgetz@brain:~/github/temp/plutosdr-fw$ **find /opt/Xilinx/ -name vivado -executable -type f | xargs file | grep ELF** rgetz@brain:~/github/temp/plutosdr-fw$ **find /opt/Xilinx/ -name vivado -executable -type f | xargs file | grep ELF**
-/opt/Xilinx/Vivado/2018.2/bin/unwrapped/lnx64.o/vivado: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, not stripped+/opt/Xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/vivado: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, not stripped
 </xterm> </xterm>
 If it reports as a 32-bit binary (which the above did not), and you are running on a 64-bit system, do: If it reports as a 32-bit binary (which the above did not), and you are running on a 64-bit system, do:
Line 44: Line 44:
 Starting the build process is just a matter of typing ''make'' within the firmware repository. Starting the build process is just a matter of typing ''make'' within the firmware repository.
 The Makefile requires a few environmental variables being set, and of course the ARM GCC toolchain in the PATH. The Makefile requires a few environmental variables being set, and of course the ARM GCC toolchain in the PATH.
-Some paths maybe adjusted to match your Xilinx Vivado and SDK install folders.  +Some paths maybe adjusted to match your Xilinx Vivado and Vitis install folders.  
  
 <WRAP box bggreen> <WRAP box bggreen>
Line 51: Line 51:
 michael@HAL9000:~/devel$ **cd plutosdr-fw** or **m2k-fw** michael@HAL9000:~/devel$ **cd plutosdr-fw** or **m2k-fw**
 michael@HAL9000:~/devel/plutosdr-fw$ **export CROSS_COMPILE=arm-linux-gnueabihf-** michael@HAL9000:~/devel/plutosdr-fw$ **export CROSS_COMPILE=arm-linux-gnueabihf-**
-michael@HAL9000:~/devel/plutosdr-fw$ **export PATH=$PATH:/opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin** +michael@HAL9000:~/devel/plutosdr-fw$ **export PATH=$PATH:/opt/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin** 
-michael@HAL9000:~/devel/plutosdr-fw$ **export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2018.2/settings64.sh**+michael@HAL9000:~/devel/plutosdr-fw$ **export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2021.2/settings64.sh**
 michael@HAL9000:~/devel/plutosdr-fw$ **make** michael@HAL9000:~/devel/plutosdr-fw$ **make**
 </xterm> </xterm>
Line 69: Line 69:
 before you type ''make''. before you type ''make''.
 </WRAP> </WRAP>
 +
 ==== Build Artifacts ==== ==== Build Artifacts ====
  
Line 99: Line 100:
 </xterm> </xterm>
 </WRAP> </WRAP>
-  
-==== Main targets ==== 
  
 +==== Testing on the target ====
 +
 +There is a script in the [[github>plutosdr_scripts]] repo that will quickly download a build artifact (the ''pluto.dfu'' file) to an USB attached PlutoSDR. This will load the image into RAM, and not write to flash, enabling easy testing of images. However, since it is loading into RAM, it is not a persistent update over power cycles or further reboots.
 +
 +<WRAP box bggreen>
 +<wrap info>This specifies any shell prompt running on your Linux development host </wrap>
 +<xterm>
 +rgetz@brain:~/github/plutosdr-fw$ **sudo ../plutosdr_scripts/pluto_ramboot**
 +Found Pluto SDR at IP 192.168.3.1, running kernel:
 + Linux pluto 5.4.0-00535-g9c04de11ae53 #1 SMP PREEMPT Fri Aug 20 13:01:03 CEST 2021 armv7l GNU/Linux
 +Found Pluto SDR in dfu mode and downloading ./build/pluto.dfu
 +successfully downloaded
 +Found new PlutoSDR at 192.168.3.1, running kernel:
 + Linux pluto 5.4.0-00535-g9c04de11ae53 #1 SMP PREEMPT Tue Feb 15 16:17:50 EST 2022 armv7l GNU/Linux
 +rgetz@brain:~/github/plutosdr-fw$ 
 +</xterm>
 +</WRAP>
 +
 +==== Main targets ====
    
 ^ File  ^ Comment ^ ^ File  ^ Comment ^
Line 231: Line 249:
  
 <code> <code>
-source /opt/Xilinx/Vivado/2016.2/settings64.sh+source /opt/Xilinx/Vivado/2021.2/settings64.sh
 make -C hdl/projects/pluto make -C hdl/projects/pluto
 cp hdl/projects/pluto/pluto.sdk/system_top.hdf build/system_top.hdf cp hdl/projects/pluto/pluto.sdk/system_top.hdf build/system_top.hdf
Line 243: Line 261:
  
 <code> <code>
-source /opt/Xilinx/Vivado/2016.2/settings64.sh+source /opt/Xilinx/Vivado/2021.2/settings64.sh
 xsdk -batch -source scripts/create_fsbl_project.tcl xsdk -batch -source scripts/create_fsbl_project.tcl
 cp build/sdk/hw_0/system_top.bit build/system_top.bit cp build/sdk/hw_0/system_top.bit build/system_top.bit
Line 291: Line 309:
 <code> <code>
 echo img:{[bootloader] build/sdk/fsbl/Release/fsbl.elf build/u-boot.elf } > build/boot.bif echo img:{[bootloader] build/sdk/fsbl/Release/fsbl.elf build/u-boot.elf } > build/boot.bif
-source /opt/Xilinx/Vivado/2016.2/settings64.sh+source /opt/Xilinx/Vivado/2021.2/settings64.sh
 bootgen -image build/boot.bif -w -o build/boot.bin bootgen -image build/boot.bif -w -o build/boot.bin
 </code> </code>
university/tools/pluto/building_the_image.1591363070.txt.gz · Last modified: 05 Jun 2020 15:17 by Robin Getz