Post Go back to editing


Category: Hardware
Product Number: adalm pluto


Can anyone please kindly describe me the details of how to run ad9361-iiostream.c example on my linux pc where ADALM pluto is connected via usb?  This is the libiio example im refering to

I tried compiling the example is using ``gcc ad9361-iiostream.c -o main liio`` with the device plugged into my PC, and i got the error: ``segmentation fault core dumped``

I have the impression that running this example remotely via PC requires modification of CMakelists.txt, or in the case of vscode it might instead require modifying include path json file or compile path json file.  All i want to do is run the code ad9361-iiostream . Can anyone kindly please provide me with the exact detailed steps?  i do have libiio installed, and have done numerous DSP experiments using pyADI .  now i want move on to writing C code for ADALM pluto for DSP applications.

Help is sincerely appreciated.



  • Hello,

    You can build the examples by adding the "-DWITH_EXAMPLES:BOOL=ON" flag to the cmake when building libiio. After that (and building them with make), if you go to the build folder there should be another folder called examples/ where all the examples of libiio are compiled. The just run the example with the URI as parameter like so ./ad9361-iiostream <your uri here>.

    If you have have any questions or encounter difficulties, please do let me know.

  • Hi, so i tried doing that exactly. i still get ```segmentation fault (core dumped)``` error. i beg your help, please tell me how to resolve this.  i even deleted libiio, and rebuilt it while adding flag ```-DWITH_EXAMPLES:BOOL=ON```.  then when i go to examples folder in libiio where ad9361-iiostream example is saved, it still threw segmentation fault error.

    i did ```./ad9361-iiostream usb:1.6.5```

    please help and assist me with instructions on what to do

  • Hello,

    The following snippet should allow you compile successfully, in case it doesn't, please provide more information such as the libiio version you are trying to install, details about your OS and the firmware version of the Pluto (make sure you are running the latest version, you can check the info.html file inside the Pluto for information on this topic). For compiling libiio try this (you can change the cmake flags based on your needs, this is just an example):

    git clone --branch v0.25

    cd libiio

    mkdir build

    cd build



    cd examples/

    ./ad9361-iiostream usb:x.x.x

  • Worked like a gem exactly as you instructed!!
    Thanks so much for the rescue and the rather helpful guide....  Is there a resource where i can learn more about the make/ cmake utility to better understand how to make custom applications??? Im good in C to the extent where now really is the time to dig into make /cmake , buildroot for pluto applications.

    much appreciation,


  • There are plenty of resources online to help you learn cmake/make. For starters, you can follow this tutorial from the cmake documentation to better grasp the concepts:

    Good luck