Skip to content

Build and Run on Target

Félix Roy edited this page Nov 26, 2019 · 4 revisions

Introduction

This wiki page explains how to build and run the Steno application direcly on the target.

Prerequisites

The target must have the NVIDIA Jetpack SDK installed. See wiki page.

Procedure

Depedencies

Here are the dependencies to install.

sudo apt-get install libssl-dev ffmpeg libpulse-dev libfftw3-dev cmake build-essential libconfig-dev libasound2-dev '.*libxcb.*' libxrender-dev libxi-dev libfontconfig1-dev libudev-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libglu1-mesa-dev libinput* mtdev* mesa-utils mesa-utils-extra libgles2-mesa-dev

SSL : libssl-dev
FFmpeg : ffmpeg
Pulse Audio : libpulse-dev
ODAS : cmake build-essential libfftw3-dev libconfig-dev libasound2-dev
Qt : qtcreator '.libxcb.' libxrender-dev libxi-dev libfontconfig1-dev libudev-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libglu1-mesa-dev libinput* mtdev* mesa-utils mesa-utils-extra libgles2-mesa-dev

Git Repository

Clone the git repository.

git clone https://github.com/introlab/rendezvous.git $HOME/rendezvous

NOTE - For the rest of the procedure, it will be assume that the git repository location is $HOME/rendezvous

Overclock

  1. Launch script to automate the overclock at boot time

    cd $HOME/rendezvous
    sudo ./scripts/overclock-jetson/deploy-overclock-jetson.sh
    
  2. Start and test the service

    sudo systemctl start overclock-jetson.service
    sudo systemctl status overclock-jetson.service
    
  3. Reboot and make sure the service is running afterwards

    sudo systemctl status overclock-jetson.service
    

ODAS

Launch the setup script

cd $HOME/rendezvous
./scripts/odas_setup.sh

Yolov3

Launch the setup script

cd $HOME/rendezvous
./scripts/yolo_setup.sh

V4l2loopback

  1. Launch the setup script

    cd $HOME/rendezvous
    sudo ./scripts/v4l2_loopback_setup.sh
    
  2. Reboot and make sure the service is running afterwards

    service stenocam status
    

NOTE - To remove a v4l2loopback device : sudo rmmod v4l2loopback

Pulse Audio

cd $HOME/rendezvous
sudo ./scripts/StenoMics/automation.sh

Qt Library

  1. Prepare the directory that will contain the Qt library.

    sudo mkdir /usr/local/qt5
    sudo chown nvidia /usr/local/qt5
    
  2. Download qt-everywhere

    wget -P /tmp "https://download.qt.io/archive/qt/5.12/5.12.6/single/qt-everywhere-src-5.12.6.tar.xz"
    
  3. Unpack the archive

    tar -xvf /tmp/qt-everywhere-src-5.12.6.tar.xz -C /tmp
    
  4. Go to qt-everywhere folder

    cd  /tmp/qt-everywhere-src-5.12.6
    
  5. Configure the build

    ./configure -shared -c++std c++14 -v \
    -opensource -release --confirm-license \
    -nomake examples -nomake tests \
    -prefix /usr/local/qt5 \
    -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -skip qtwebengine
    
  6. Build and install

    make -j$(nproc)
    make install
    

Build and Run in QtCreator

  1. Open QtCreator

  2. Open Options window via Tools/Options... then go to Kits options

  3. In Qt Versions tab press Add... and find qmake executable from Qt library compilation

  4. In Compilers tab press Add/GCC/C and find GCC compiler in /usr/bin/

  5. In Compilers tab press Add/GCC/C++ and find G++ compiler in /usr/bin/

  6. In Debuggers tab press Add and set Path to GDB debugger in /usr/bin/

  7. Press Apply to save changes

  8. In Kits tab press Add to create a new kit. Make sure to specify C/C++ Compiler, Debugger and Qt version.

  9. Select Apply to save changes then Ok

  10. Open $HOME/rendezvous/steno/steno.pro project file.

  11. In the Configure Project window select newly created kit and press Configure Project

  12. In Projects make sure Shadow build is disable and that build configuration is Release

  13. To build right click on the root folder and select Rebuild

  14. To run left click on the green play button