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:tools-software:linux-software:iio_oscilloscope [31 Jan 2023 02:18] – Replaced the obsolete Kuiper Linux page link Joyce Velascoresources:tools-software:linux-software:iio_oscilloscope [18 Oct 2023 12:01] (current) – note to use libiio-v0 when building libiio from source for osc Cristina Suteu
Line 9: Line 9:
 ===== Installation ===== ===== Installation =====
  
-======  ======+==== Windows ==== 
 {{page>:resources:eval:user-guides:ad-fmcomms2-ebz:downloads#download_iio-oscilloscope}} {{page>:resources:eval:user-guides:ad-fmcomms2-ebz:downloads#download_iio-oscilloscope}}
- 
  
 ==== Linux ==== ==== Linux ====
  
-For building on the target, we recommend using the [[:resources:tools-software:linux-software:kuiper-linux |update scripts]]. This is a tried/proven method that does everything in a quick script.+To build on an embedded target (e.g. aarch64), we recommend using the [[:resources:tools-software:linux-software:kuiper-linux:update Kuiper Linux update scripts]]. This is a tried/proven method that does everything in a quick script.
  
-To build on a hostdo not use the script, you **must**+To build on a development host (e.g. x86 laptop or desktop) do the following
-  - make sure the following libraries are installed. This list is maintained in the ''adi_update_tools.sh'' shell script, and can be copied/pasted to most Debian based distributions. For others - make sure they are installed, or the below steps will not work. If you are not sure how to do this - consult your distribution documentation. file: [[https://github.com/analogdevicesinc/linux_image_ADI-scripts/blob/master/adi_update_tools.sh|adi_update_tools.sh]] <xterm+  - On Ubuntu or Debian install the following dependencies (see [[https://github.com/analogdevicesinc/linux_image_ADI-scripts/blob/master/adi_update_tools.sh#L331|adi_update_tools.sh]] for a maintained list): <code bash
-> **apt-get -y install libglib2.0-dev libgtk2.0-dev libgtkdatabox-dev libmatio-dev libfftw3-dev libxml2 libxml2-dev bison flex libavahi-common-dev libavahi-client-dev libcurl4-openssl-dev libjansson-dev cmake libaio-dev libserialport-dev** +apt-get -y install libglib2.0-dev libgtk-3-dev libgtkdatabox-dev libmatio-dev libfftw3-dev libxml2 libxml2-dev bison flex libavahi-common-dev libavahi-client-dev libcurl4-openssl-dev libjansson-dev cmake libaio-dev libserialport-dev 
-</xterm+</code
-  - build **and install** the libiio library, by following these [[libiio#how_to_build_it|instructions]]. Make sure you do the final ''make install''+  - Install the ''libiio-dev'' package in Debian or Ubuntu or build and install the libiio library from source, by following [[libiio#how_to_build_it|these instructions]]. Make sure you do the final ''make install''. 
-  - build **and install** the libad9166-iio and libad9361-iio library, by following these [[:resources:eval:user-guides:ad-fmcomms5-ebz:multi-chip-sync#linux|instructions]]. +<note important>Users building libiio from source, please use the following branch : [[repo>libiio/tree/libiio-v0]]</note> 
-  - download the source <xterm+  - Optionally build and install the libad9166-iio and libad9361-iio libraries, by following [[:resources:eval:user-guides:ad-fmcomms5-ebz:multi-chip-sync#linux|these instructions]]. 
-> **git clone https://github.com/analogdevicesinc/iio-oscilloscope.git** +  - Download the source using git: <code bash
-> **cd iio-oscilloscope** +git clone https://github.com/analogdevicesinc/iio-oscilloscope.git 
-> **git checkout origin/master** +cd iio-oscilloscope 
-</xterm>Or, [[https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip|download a zip]], and uncompress it:<xterm+git checkout origin/master 
-rgetz@pinky:~**wget https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip** +</code> 
-rgetz@pinky:~**unzip master.zip** +  - Or, [[https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip|download a zip]], and uncompress it: <code bash
-rgetz@pinky:~/iio-oscilloscope**cd iio-oscilloscope** +$ wget https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip 
-</xterm+$ unzip master.zip 
-   - and run `make` and `make install`. If you did not do a ''make install'' of the libiio, the libiio install location needs to be set in your path ie: (PATH=/usr/lib:$PATH"or else an error "Package libiio not found.." will occur.<xterm> +$ cd iio-oscilloscope 
-rgetz@pinky:~/iio-oscilloscope$ **mkdir build && cd build** +</code
-rgetz@pinky:~/iio-oscilloscope$ **cmake ../ && make -j $(nproc)** +   Build and install: <code bash> 
-rgetz@pinky:~/iio-oscilloscope$ **sudo make install** +$ mkdir build && cd build 
-</xterm> +$ cmake ../ && make -j $(nproc) 
-   - if you don't want to do a ''make install'' (sometimes I don't), you will need to make sure that the most recently built shared libraries can be found, by setting the [[http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN77|LD_LIBRARY_PATH]] environmental variable.<xterm>rgetz@pinky:~/iio-oscilloscope$ **export LD_LIBRARY_PATH=./**</xterm>otherwise you may get an error like this:<xterm>rgetz@pinky:~/iio-oscilloscope**./osc** +$ sudo make install 
 +</code> 
 +     If you did not do a ''make install'' of the libiio, the libiio install location needs to be set in your path (i.e. ''PATH=/usr/lib:$PATH"'' or else an error ''"Package libiio not found.."'' will occur.  
 +     If you don't want to do a ''make install'', you will need to make sure that the most recently built shared libraries can be found, by setting the [[http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN77|LD_LIBRARY_PATH]] environmental variable. ''export LD_LIBRARY_PATH=./'' otherwise you may get an error like: <code> 
 +$ ./osc
 ./osc: error while loading shared libraries: libosc.so: cannot open shared object file:  ./osc: error while loading shared libraries: libosc.so: cannot open shared object file: 
 No such file or directory No such file or directory
-</xterm>Or, worse case, when you are debugging things, you will see your modified source code, but it will be running/executing the older shared shared object which was loaded (since it didn't find things in the library path). +</code> Or, worst case, when you are debugging things, you will see your modified source code, but it will be running/executing the older shared shared object which was loaded (since it didn't find things in the library path).  
 + 
 +=== Ubuntu 20 and Older === 
 + 
 +While compiling the IIO Scope for Ubuntu 20 and other older Linux distributions, you can face issues with the library gtkdatabox. To overcome this problem DON'T install the library using apt install/ other package managers.  
 +Instead download the sources from https://sourceforge.net/projects/gtkdatabox/files/gtkdatabox-1/ file gtkdatabox-1.0.0.tar.gz and compile and install it using commands below. This will ensure that gtkdatabox is compatible with GTK3 
 +<xterm> 
 +./configure 
 +make 
 +make install 
 +</xterm> 
 + 
 + 
 +Please not that in case some other gtkdatabox version is present in the system remove it using sudo apt remove. This action can solve error message  
 +GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped) 
 + 
 +=== GTK2 Based IIO-Oscilloscope === 
 + 
 +If you'd like to build the previous version of IIO-Oscilloscope, which is based on GTK2 you will need to install the following packages: <xterm> 
 +> **apt-get -y install libglib2.0-dev libgtk2.0-dev libgtkdatabox-dev libmatio-dev libfftw3-dev libxml2 libxml2-dev bison flex libavahi-common-dev libavahi-client-dev libcurl4-openssl-dev libjansson-dev cmake libaio-dev libserialport-dev** 
 +</xterm> 
 +Make sure that you have libgtkdatabox v0.9 installed, which was compiled with GTK2. 
 +In addition, you will need to clone a specific branch of the IIO-Oscilloscope repository, which still uses GTK2 widgets:  
 +<code> 
 +git clone https://github.com/analogdevicesinc/iio-oscilloscope.git --branch 2021_R2 </code> 
 + 
 +The other prerequisites and build steps are identical.  
  
 ==== macOS ==== ==== macOS ====
resources/tools-software/linux-software/iio_oscilloscope.txt · Last modified: 18 Oct 2023 12:01 by Cristina Suteu