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
resources:fpga:no-os_make:software_setup [21 Mar 2018 12:56] – Change title to Build no-OS with GNU make Istvan Csomortaniresources:fpga:no-os_make:software_setup [11 Aug 2021 20:20] (current) – Update HDF variable def for Xilinx Travis Collins
Line 1: Line 1:
 ====== Build no-OS with GNU make ====== ====== Build no-OS with GNU make ======
  
-Be sure you are using the latest release version and you have the corresponding branches for both hdl and no-Os([[https://github.com/analogdevicesinc/hdl/releases|Release notes]]).+This guide provides some quick instructions on how to build and run the no-OS on almost all of the supported platforms
  
-We strongly recommend having a [[https://wiki.analog.com/resources/fpga/docs/git|clone]] of no-Os and hdl in the same folder:  +Be sure you are using the latest release version and you have the corresponding branches for both HDL and no-OS([[https://github.com/analogdevicesinc/hdl/releases|Release notes]]).
-  ~/github/hdl +
-  ~/github/no-Os.+
  
-The build flow is based on [[https://en.wikipedia.org/wiki/Make_(software)|make]].+==== Building the HDL ====
  
-In every project folder one can find a subfolder for each supported carrier. In each carrier folder, there is a Makefile which points to the projects hdl (system_top.hdf/project_name.sof) and other makefiles (*.mkcontaining the software dependencies.+ADI does not distribute the bit/elf files of these projects. They must be built from the sources. The [[resources:fpga:docs:hdl|HDL User Guide]] provides detailed information and steps to build the HDL project on your desired carrier. The build flow is developed around [[https://www.gnu.org/software/make/|GNU make]]You may use a Windows or Linux OS, but do NOT seek OS- specific support. The prerequisite to the building process is that you are able to run 'quartus', 'vivado' and 'make' all from a shell (Cygwin or Linux).
  
-===== Building the bare metal software ===== +Building the HDL is as simple as running make on your desired project and carrier.
-Do a +
-  make +
-in the carrier folder. +
-\\ +
-[[#troubleshooting| Troubleshooting]] +
  
 +<code>
 +hdl/projects/daq3/kcu105> make
 +hdl/projects/daq3/zc706> make
 +</code>
  
-===== Running the bare metal software =====+<note important> 
 +For Intel nios2 based processor projects you have to turn off the MMU (Memory Management Unit used for Linux  OS) when building the HDL. 
 +</note>
  
-Make sure you have the FPGA connected to your PC and then run the command: +<code> 
 +hdl/projects/daq3/a10gx> make MMU=0 
 +</code>
  
-  make run+We strongly recommend having a [[/resources/fpga/docs/git|clone]] of no-Os and HDL in the same folder:  
 + 
 +<code> 
 +  ~/github/hdl/ 
 +  ~/github/no-OS/ 
 +</code> 
 + 
 +In every project folder, you can find a separate subfolder for each supported carrier. In each carrier folder, there is a Makefile which points to the bit files and HDL deliverables (system_top.hdf/project_name.sof) and other makefiles (*.mk) containing the software dependencies. 
 + 
 + 
 +===== Building the software ===== 
 + 
 +Change your current directory to your targeted project and run make: 
 +<code> 
 +  [~] cd fmcdaq2/zc706  
 +  [~] make 
 +</code> 
 + 
 +See [[#troubleshooting| Troubleshooting]] section for guideline how to solve **make** related issues. 
 + 
 +===== Running the software ===== 
 + 
 +Make sure that the FPGA is powered on and connected to the PC and then run the command:  
 +<code> 
 +  [~] make run 
 +</code> 
 + 
 +The **make run** will downloads the bitstream on the FPGA and after that program the board with the elf file.
  
-The above command downloads the bitstream or the raw binary file on the FPGA and after that the elf file. 
-\\ 
 The software is started before the memory debugger disconnects. The software is started before the memory debugger disconnects.
      
Line 32: Line 58:
  
 After the software has been run on the FPGA, run the command: After the software has been run on the FPGA, run the command:
- +<code> 
-  make capture+  [~] make capture 
 +</code>
  
 By default, the software captures (in case of ADC based projects) the data received from the device in the RAM. By default, the software captures (in case of ADC based projects) the data received from the device in the RAM.
 +<code>
   rx_xfer.start_address = *_MEM_BASEADDR + OFFSET;   rx_xfer.start_address = *_MEM_BASEADDR + OFFSET;
   rx_xfer.no_of_samples = value;   rx_xfer.no_of_samples = value;
   dmac_start_transaction(ad_core_dma);   dmac_start_transaction(ad_core_dma);
-  +</code>
 These values differ depending on the architecture and device. These values differ depending on the architecture and device.
  
Line 49: Line 76:
   * [[https://github.com/analogdevicesinc/no-OS/blob/master/scripts/zynq_u.mk#L15-L29|zynq_u]]   * [[https://github.com/analogdevicesinc/no-OS/blob/master/scripts/zynq_u.mk#L15-L29|zynq_u]]
  
-For projects that have more than one channel or require a different number of capture samples one can specify this value in the projects common Makefile (ex: [[https://github.com/analogdevicesinc/no-OS/blob/master/fmcadc4/fmcadc4.mk#L15|fmcadc4]])+The number of samples is specified in the project'common Makefile(ex: [[https://github.com/analogdevicesinc/no-OS/blob/2019_R1/fmcadc4/fmcadc4.mk#L15|fmcadc4]])
  
 <note>The script will write a capture_chx.csv file for every channel.</note> <note>The script will write a capture_chx.csv file for every channel.</note>
Line 64: Line 91:
  
 ===== Clean the workspace ===== ===== Clean the workspace =====
- +<code> 
-  make clean +  [~] make clean 
 +</code>
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-If you get+<code>
   make: *** No rule to make target `../../../hdl/projects/daq2/vc707/daq2_vc707.sdk/system_top.hdf', needed by `hw/system_top.bit' Stop.   make: *** No rule to make target `../../../hdl/projects/daq2/vc707/daq2_vc707.sdk/system_top.hdf', needed by `hw/system_top.bit' Stop.
-   +</code>
-Your hdl in not build or the folder structure is not the one recommended at the beginning of this page, you have to build/specify hdl location.+
  
-  * [[https://wiki.analog.com/resources/fpga/docs/build|Build]]+The HDL deliverables cannot be foundMaybe the targeted HDL project is not built, or the defined path is not validMake sure, that you build the HDL before running the no-OS or specify the location of the HDL deliverables explicitly.
  
-  * Specify hdl location:+  * [[resources/fpga/docs/build|Build]] 
 + 
 +  * Specify HDL location:
  
 For Xilinx For Xilinx
-  make M_HDF_FILE=/path_to_hdf/system_top.hdf+<code> 
 +  [~] make HARDWARE=/<path_to_hdf>/system_top.hdf 
 +</code>
 For Intel For Intel
-  make M_SOPCINFO_FILE=/path_to_sopcinfo/system_bd.sopcinfo M_SOF_FILE=/path_to_sof/my_project_carrier.sof+<code> 
 +  [~] make M_SOPCINFO_FILE=/<path_to_sopcinfo>/system_bd.sopcinfo 
 +</code> 
 + 
 +===== Understanding/Modifying things ===== 
 + 
 +The best place to start in the no-OS main function in "project/project_name.c". It shows how individual components of a data path chain are initialized and programmed for the application. After you have the default setup working, feel free to add your own customization routines and/or signal processing functions to either HDL or no-OS. 
 + 
 + 
  
  
-  make run (plus the above)+{{navigation Build no-OS with GNU make#resources:fpga:xilinx:software_setup|Xilinx SDK GUI#resources:fpga:quick_validation|Quick validation#resources:fpga:uart_setup|UART setup}}
  
resources/fpga/no-os_make/software_setup.1521633408.txt.gz · Last modified: 21 Mar 2018 12:56 by Istvan Csomortani