This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
resources:fpga:no-os_make:software_setup [13 Mar 2018 16:39] – created Andrei Grozav | resources:fpga:no-os_make:software_setup [11 Aug 2021 20:20] (current) – Update HDF variable def for Xilinx Travis Collins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | Be sure you are using the latest release version | + | 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 to have 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]]). |
- | ~/ | + | |
- | ~/ | + | |
- | The build flow is based on [[https:// | + | ==== Building the HDL ==== |
- | In every hdl based project one can find a folder with the supported carriers names. In each folder, there is a Makefile which points to the projects | + | ADI does not distribute |
- | ===== Building the bare metal software ===== | + | Building the HDL is as simple as running |
- | Do a | + | |
- | | + | |
- | in the carrier | + | |
- | \\ | + | |
+ | < | ||
+ | hdl/ | ||
+ | hdl/ | ||
+ | </ | ||
- | See [[:# | + | <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. | ||
+ | </ | ||
+ | < | ||
+ | hdl/ | ||
+ | </ | ||
- | ===== Running | + | We strongly recommend having a [[/ |
- | make run | + | < |
+ | ~/ | ||
+ | ~/ | ||
+ | </ | ||
- | The above command downloads the bitstream | + | 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/ |
- | \\ | + | |
- | The software is started before the memory debugger disconnects | + | |
+ | ===== Building the software ===== | ||
+ | |||
+ | Change your current directory to your targeted project and run make: | ||
+ | < | ||
+ | [~] cd fmcdaq2/ | ||
+ | [~] make | ||
+ | </ | ||
+ | |||
+ | See [[# | ||
+ | |||
+ | ===== Running the software ===== | ||
+ | |||
+ | Make sure that the FPGA is powered on and connected to the PC and then run the command: | ||
+ | < | ||
+ | [~] make run | ||
+ | </ | ||
+ | |||
+ | The **make run** will downloads the bitstream on the FPGA and after that program the board with the elf file. | ||
+ | |||
+ | The software is started before the memory debugger disconnects. | ||
| | ||
===== Evaluating the result ===== | ===== Evaluating the result ===== | ||
- | make capture | ||
- | By default, | + | After the software |
+ | < | ||
+ | [~] make capture | ||
+ | </ | ||
+ | By default, the software captures (in case of ADC based projects) the data received from the device in the RAM. | ||
+ | < | ||
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); | ||
- | | + | </ |
These values differ depending on the architecture and device. | These values differ depending on the architecture and device. | ||
Line 46: | Line 76: | ||
* [[https:// | * [[https:// | ||
- | For projects that have more than one channel or require a different | + | The number of samples |
< | < | ||
- | < | + | < |
- | For example | + | For example, for fmcomms2(AD9361: |
^fmcomms2 | ^fmcomms2 | ||
Line 61: | Line 91: | ||
===== Clean the workspace ===== | ===== Clean the workspace ===== | ||
+ | < | ||
+ | [~] make clean | ||
+ | </ | ||
+ | ===== Troubleshooting ===== | ||
- | make clean | + | < |
- | + | ||
- | ===== Particular cases===== | + | |
- | If you get | + | |
make: *** No rule to make target `../ | make: *** No rule to make target `../ | ||
- | + | </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:// | + | The HDL deliverables cannot be found. Maybe the targeted HDL project is not built, or the defined path is not valid. Make sure, that you build the HDL before running the no-OS or specify the location of the HDL deliverables explicitly. |
- | * Specify | + | |
+ | |||
+ | | ||
For Xilinx | For Xilinx | ||
- | | + | < |
+ | [~] make HARDWARE=/<path_to_hdf>/ | ||
+ | </ | ||
For Intel | For Intel | ||
- | | + | < |
+ | [~] make M_SOPCINFO_FILE=/<path_to_sopcinfo>/ | ||
+ | </ | ||
+ | |||
+ | ===== Understanding/ | ||
+ | |||
+ | The best place to start in the no-OS main function in " | ||
+ | |||
+ | |||
- | | + | {{navigation Build no-OS with GNU make# |