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
Next revisionBoth sides next revision
resources:tools-software:no-os-software:iio [19 Mar 2021 08:21] – [BUILD PROJECT WITH IIO SUPPORT] Cristian Popresources:tools-software:no-os-software:iio [29 Apr 2021 11:13] – [SOFTWARE ARCHITECTURE] Ramona Alexandra Nechita
Line 14: Line 14:
  
 ''make TINYIIOD=y'' ''make TINYIIOD=y''
 +
 +Depending on the project and hardware used, the platform might have to be specified inside the Makefile in the project folder, or from command line:
 +
 +''make PLATFORM=desired_platform clean_all''
 +
 +''make PLATFORM=desired_platform TINYIIOD=y''
  
 For more information about building projects, go to: [[:resources:no-os:build|https://github.com/analogdevicesinc/no-OS/wiki/Building-no-OS-on-Linux]]. For more information about building projects, go to: [[:resources:no-os:build|https://github.com/analogdevicesinc/no-OS/wiki/Building-no-OS-on-Linux]].
 After build, execute command: After build, execute command:
  
 +<hidden Xilinx(Click to expand)>
 ''make run'' ''make run''
 +</hidden>
 +<hidden Linux (Click to expand)>
 +''sudo ./build/project.out''
 +<note important>Make sure IIOD is not already running! It can be stopped it with: \\
 +''sudo systemctl stop iiod''
 +</note>
 +</hidden>
  
 The binaries are loaded to the board. Next, it is possible to connect with a libiio client. The binaries are loaded to the board. Next, it is possible to connect with a libiio client.
Line 24: Line 38:
 For debugging and development execute command: For debugging and development execute command:
  
-''xsdk -workspace build'' +''make develop'' 
-===== IIO-Oscilloscope client ===== +===== Connecting to Clients ===== 
-IIO-Oscilloscope is one possible client (it has to be built with SERIAL_BACKEND option)select the corresponding serial port and set baud rate to 921600. For more information about IIO Oscilloscope go to:+After building and running a no-Os project, the data can be displayed, processed and visualized through a series of clients, such as command line tools, MATLAB® and Simulink®, IIO-Oscilloscope, etc. Find the complete list of frameworks and applications at http://analogdevicesinc.github.io/libiio/master/index.html  
 + 
 +For simply displaying or storing information regarding the devices, [[:resources:tools-software:linux-software:libiio:iio_info | iio_info]], [[:resources:tools-software:linux-software:libiio:iio_attr | iio_attr]], [[:resources:tools-software:linux-software:libiio:iio_reg | iio_reg]], [[:resources:tools-software:linux-software:libiio:iio_readdev | iio_readdev]], [[:resources:tools-software:linux-software:libiio:iio_writedev | iio_writedev]] are included in the default builds. 
 + 
 +Here is an example on how to use ''iio_info''
 +  * For serial context ''iio_info -u serial:/dev/ttyUSB0,115200'' 
 +  * For network ''iio_info -u ip:<host>'' 
 + 
 + 
 +For a graphical user interface and plots IIO-Oscilloscope is one possible client. For more information about IIO Oscilloscope go to:
 https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope
-   + 
 +Connecting to IIO-Oscilloscope with the serial context: 
 {{:resources:tools-software:no-os-software:iio:iio_osc_uart.png?direct&400|}} {{:resources:tools-software:no-os-software:iio:iio_osc_uart.png?direct&400|}}
  
-===== Python device over iio client =====+And with network:
  
-https://analogdevicesinc.github.io/pyadi-iio/devices/adi.ad936x.html+{{:resources:tools-software:no-os-software:screenshot_from_2021-04-29_02-04-15.png?400|}}
  
-https://analogdevicesinc.github.io/pyadi-iio/guides/examples.html +Once connected, two windows should pop up.
-===== Helper utilities as client =====+
  
-Helper utilities from Libiio can be used also:        
  
-''iio_readdev -u serial:/dev/ttyUSB0,921600 -400 -s 6400 cf-ad9361-lpc > sample.dat''+{{:resources:tools-software:no-os-software:screenshot_from_2021-04-29_02-04-15.png?400|}} 
 + 
 +{{:resources:tools-software:no-os-software:screenshot_from_2021-04-29_02-06-48.png?400|}} 
 + 
 +===== Python device over iio client ===== 
 + 
 +A python abstraction module for ADI hardware also exists, to make them easier to use. The supported devices can be found at 
 +https://analogdevicesinc.github.io/pyadi-iio/devices/index.html
  
-For more details about libiio helper utilities please visit following link: 
-https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_readdev 
 ====== IIO DEMO APPLICATION ====== ====== IIO DEMO APPLICATION ======
 A demo iio application can be found in the following location: A demo iio application can be found in the following location:
Line 50: Line 78:
  
 This project is independent of a physical device and should be used as reference, when creating a new iio application for a new iio device. This project is independent of a physical device and should be used as reference, when creating a new iio application for a new iio device.
 +To view information regarding the devices, one can use:
 +
 +''iio_info -u serial:/dev/ttyUSB0,115200'' \\
 +or, \\
 +''iio_info -u ip:host'' (only on Linux)
 +
 To load data into RAM, that could be seen in iio-oscilloscope application, execute the following command: To load data into RAM, that could be seen in iio-oscilloscope application, execute the following command:
  
-''cat sample_sine.dat | iio_writedev -u serial:/dev/ttyUSB0,921600 -b 400 demo_device''+''cat sample_sine.dat | iio_writedev -u serial:/dev/ttyUSB0,115200 -b 400 dac_demo''
  
-This will write 400 samples to “demo_device” from “sample_sine.dat” file.+This will write 400 samples to “dac_demo” from “sample_sine.dat” file.
  
 ====== FOLDER STRUCTURE ====== ====== FOLDER STRUCTURE ======
  
-{{:resources:tools-software:no-os-software:iio:iio_folder_structure.png?direct&200|}}+{{:resources:tools-software:no-os-software:iio_folder_structure.png?400|}}
  
 ** iio_app** – IIO application interface. Sets IIO application communication interface and executes the main application, where commands are received, parsed, and executed. This module is necessary. ** iio_app** – IIO application interface. Sets IIO application communication interface and executes the main application, where commands are received, parsed, and executed. This module is necessary.
Line 67: Line 101:
  
 ** iio_axi_dac** – This module will register a new interface into iio_interfaces element. It also creates an iio_axi_dac device instance and a struct iio_device element, that specifies it’s channels and attributes. Wrapper over axi_adc_core, it adapts the interface to iio. This module is optional. ** iio_axi_dac** – This module will register a new interface into iio_interfaces element. It also creates an iio_axi_dac device instance and a struct iio_device element, that specifies it’s channels and attributes. Wrapper over axi_adc_core, it adapts the interface to iio. This module is optional.
- 
-** iio_demo** – This module is hardware independent and should be used as reference, when creating a new new iio device. 
- 
-** iio** – Sets tinyiiod ops callbacks for communicating with the client and ops callbacks for communicating with IIO devices and contains the callbacks used by libtinyiiod. 
  
 ====== SOFTWARE ARCHITECTURE ====== ====== SOFTWARE ARCHITECTURE ======
  
-The relations between modules can be seen in the following figure. Doted lines represent function callbacks.+The relations between modules can be seen in the following figure.
  
-{{:resources:tools-software:no-os-software:iio:iio_arhitecture.png?direct&800|}}+{{:resources:tools-software:no-os-software:iio_diagram.png?400|}}
  
-An iio_app instance is always necessary, since it instantiates libtinyiiod library, the rest of iio modules (iio_demo) are optional, each one registering a new device to be checked when a command is received. 
  
 ====== LIBTINYIIOD ====== ====== LIBTINYIIOD ======
resources/tools-software/no-os-software/iio.txt · Last modified: 14 Nov 2023 15:25 by Darius B