Wednesday tutorial

Wednesday tutorial will take place at university since we need native GNU/Linux computers to run Vivado (2018.2) + Buildroot.

The room is 215B in Metrologie building (B) on the scientific campus: a 15 min. walk from ENSMM. We meet at 8:30 AM at entrance of ENSMM or 8:50 AM in front of Metrologie building to go together to the tutorial room. A map of the area is provided below (link to the PDF version : 215B.pdf

215B.png

Quick notes taken while preparing the lab session, in case you wisht to reproduce on a personal computer brought for the lab session:

1. We added a user dedicated to the lab session so the account could be cleaned easily after completion:

adduser pluto
in /etc/group : add this user to plugdev and dialout groups
apt-get install bison flex swig3.0 libxml2-dev doxygen pkg-config
in order to use GNU Radio to access the PlutoSDR, we compile manually libiio (https://github.com/analogdevicesinc/libiio), libad9361-iio (https://github.com/analogdevicesinc/libad9361-iio) and gr-iio (https://github.com/analogdevicesinc/gr-iio) in that order. Doing so requires adding in .bashrc
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages/gnuradio/iio/
Compiling the tools is achieved with

mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr ../ && make && make install

2. Generating the custom bitstreams relies on the official ADI PlutoSDR repository which must be cloned on each computer:
git clone https://github.com/analogdevicesinc/hdl
cd hdl
git checkout  401395cdd1980827fd1f7043ce1a10770f666c64
cd projects/pluto
source /opt/Xilinx/Vivado/2018.2/settings64.sh
make  # check that the original firmware builds

3. the buildroot environment will be shared between all users through an NFS server in order to save space and compile time. There should be no need to change the buildroot configuration during the lab session. In our case this step is completed on the administrator account shared via NFS (/home/jmfriedt), could be done on your personnal account for the lab session:


git clone https://github.com/oscimp/PlutoSDR
wget https://buildroot.org/downloads/buildroot-2019.02.tar.gz
tar zxvf buildroot-2019.02.tar.gz
mv buildroot-2019.02 buildroot-2019.02-pluto
export BR2_EXTERNAL=/home/jmfriedt/PlutoSDR
cd buildroot-2019.02-pluto
make zynq_pluto_defconfig
unset LD_LIBRARY_PATH
make

4. Finally we clone in the lab session user directory the OscImpDigital framework repository and maje sure that the first tutorial synthesizes

git clone --recursive https://github.com/oscimp/oscimpDigital.git
cd oscimpDigital
in settings.sh:
export BOARD_NAME=pluto
export BR_DIR=/home/jmfriedt/buildroot-2019.02-pluto
source settings.sh
cd doc/tutorials/plutosdr/1-gnuradio-audio/design
export ADI_HDL_DIR=/home/pluto/hdl
make

5. Work in progress: find a way to transfer the DFU image to the PlutoSDR

make dfu_frm

should generate dfu and frm files while

make flash_dfu_frm 

should send the PlutoSDR reboot command by ssh (assuming the network is properly configured), wait for 10 seconds and transfer the DFU file to the PlutoSDR flash memory.

Online user: 1