Post Go back to editing

plutosdr : minimal tool chain for c compiling


I’d like to use my C code with pluto to build a ‘’simple’’ stand alone receiver.

I read a lot of Q&A and your answer here:

I read your interresting presentation here :

I try to follow your example with dump1090. Make file confirm missing some libs on my linux 18,04.

For a simple C code ( without building FW image ) , do we need to install all the sw toolchain used to build the firmware image? As here:

Or could we use a lighter solution? Or compile on board?

( I’ dont have anough space to install the 30Gb vivado toolchain. I’m able to write basics SDR function in C, use matlab and Gnu radio. But im’ not a software guy. Start from scratch with a new buildroot is hard for me. RF Engenieer, I start my first numerical receiver with AD9042...Now  i’d like to use the radio of the futur. )



Parents Reply
  • Hello Travis

    Thus first step is to install arm-xilinx-linux-gnueabi-gcc. The xilinx tool   Xilinx_Vivado_SDK_Web_2018.3_1207_2324_Lin64.bin need more that 30 GB ; Other web install  : Xilinx_SDK_2018.3_1207_2324_Lin64.bin  need more than 10Gb. I found also 

    xilinx-2015.05-17-arm-xilinx-linux-gnueabi.src1.tar.bz2   only 230MB. But it I don't know to install it. Version seem to be old

    Please could you confirm the arm-xilinx-linux-gnueabi-gcc version witch is working?


  • For firmware version V.30 you need release 2018.2.

    See instructions:

    I would recommend asking Xilinx if they have a minimal install of the SDK.


  • Hello Travis. It seem difficult to found proper installation for   arm-xilinx-linux-gnueabi-gcc . Thus I prefer to uses last installation setup:  web installer for SDK and VIVADO 2018.2 , as describes in your plutosdr-fw link. After xilinx installation I see  /opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin.

    To come back to my first question, how could we use your make file ? juste replace the compiler by  gcc-arm-linux-gnueabi/bin ?



  • Hello Travis
    Thanks for your fast Answer. I follow your example: It works now with my ubuntu 18.04. and with last Pluto Fwupdate 0.30 .
     To help others I add the vivado configuration that I used.
    First I create /opt/Xilinx dir for installation:

    sudo mkdir /opt/Xilinx
    sudo chown remi /opt/Xilinx
    sudo chmod u+rwX /opt/Xilinx

    start vivado 2018.2 with :

    After vivado install don’t forget to install arm-linux-gnueabihf-gcc with
    $sudo apt-get install gcc-arm*
    After your example, I have also try the Hennerich example with dump1090: in the /tmp/lutoapp dir : git clone -q cd dump1090 export PATH=$PATH:/opt/Xilinx/SDK/2018.2/gnu/aarch32/lin

    CC=arm-linux-gnueabihf-gcc CFLAGS=--sysroot=../sysroot LDFLAGS=--sysroot=../sysroot make results: arm-linux-gnueabihf-gcc --sysroot=../sysroot -c dump1090.c arm-linux-gnueabihf-gcc --sysroot=../sysroot -c anet.c arm-linux-gnueabihf-gcc -g -o dump1090 dump1090.o anet.o --sysroot=../sysroot -liio -lpthread -lm -lad936 /tmp/plutoapp/dump1090$ file dump1090 dump1090: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 3.2.0, BuildID[sha1]=7f6f5a501e607f6c1b8fc248ee29cdba64d70b64, not stripped scp dump1090 root@ ssh on pluto and start : cd tmp ./dump1090 --net We can see flight traffic in terminal or with www server on
    Application is working on target!
    If somebody knows how to avoid 20GB of vivado could help
    Many Thanks Remi
  • Hello, Travis.

    To solve compiler error,I'd like to add more information around gcc arm setup wich is not detailed here.
    I follow your example on a new ubuntu 18.04 installation:

    tar zxvf sysroot-v0.30.tar.gz
    mv staging sysroot

    after vivado installation: source /opt/Xilinx/Vivado/2018.2/

    The issue occurs with compilation command:

    arm-linux-gnueabihf-gcc -mfloat-abi=hard --sysroot=./sysroot -I./include -Lsysroot/lib -std=gnu99 -g -o pluto_stream ad9361-iiostream.c -lpthread -liio -lm -Wall -Wextra

    error message:
    In file included from ad9361-iiostream.c:20:0:
    /opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/lib/gcc/arm-linux-gnueabihf/7.2.1/include/stdint.h:9:16: erreur fatale: stdint.h : Aucun fichier ou dossier de ce type
    # include_next <stdint.h>
    compilation terminée.

    But this file exist here /opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/lib/gcc/arm-linux-gnueabihf/7.2.1/include/stdint.h

    I have a different error message ( other include files error) with sudo command...
    I suspect a bad installation around gcc-arm.

    I know you can't solve all gcc compiler issues. May be you can gives us the minimal gcc packages and rules needed to compile properly, maybe command used aroud gcc before beginning you example.
    Many Thank's