This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: QT5 binary

Part Number: SK-AM62


Hello,

  I need a link for the procedure to download/install & run the QT5 console application for linux, which can run a simple c program & display in GUI.

Thanks in advance.

Regards

Anu Jayan

  • Hello Anu,

    Please refer to the following link: https://dev.ti.com/tirex/content/linux-academy-AM62X-8.6.0.42.v1/ch-develop/dev-gpu-porting-guide.html. It's a good starting point for compiling qt5 application and running on AM62 SK EVM.

    Regards,
    Krunal

  • Hi,

          I am not able to QT5 build the source code, which was given to me to be flashed on AM62x board. Kindly help me to resolve the issue. Thanks in advance.

    1) I followed the below links to install QT5 and set the cross-compilation path for AM62x.

    https://vitux.com/compiling-your-first-qt-program-in-ubuntu/

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Examples_and_Demos_Sub-system_Demos.html#hands-on-with-qt

    2) Then I followed the steps mentioned in the link to create a sample helloworld program.

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications> cd helloworld/

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/helloworld> make
    aarch64-none-linux-gnu-g++ --sysroot=/home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux -c -pipe  --sysroot=/home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux --sysroot=/home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../linux-devkit/sysroots/aarch64-linux/usr/include -I../../linux-devkit/sysroots/aarch64-linux/usr/include/QtWidgets -I../../linux-devkit/sysroots/aarch64-linux/usr/include/QtGui -I../../linux-devkit/sysroots/aarch64-linux/usr/include/QtCore -I. -I../../linux-devkit/sysroots/aarch64-linux/usr/lib/mkspecs/linux-oe-g++ -o helloworld.o helloworld.cpp
    aarch64-none-linux-gnu-g++ --sysroot=/home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux --sysroot=/home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux --sysroot=/home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux -Wl,-O1 -o helloworld helloworld.o   /home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux/usr/lib/libQt5Widgets.so /home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux/usr/lib/libQt5Gui.so /home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux/usr/lib/libQt5Core.so -lGLESv2 -lpthread 


    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/helloworld> ls
    helloworld  helloworld.cpp  helloworld.o  helloworld.pro  Makefile

    3) I was successfully able to create the executable file helloworld which can be run on the AM62x EVM board.

    4) Now I did the following steps to build my source code, which needs to be cross-compiled for AM62x board.

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/Peristaltic> ls
    build  buildSoundCount.txt  data  lib  platfrm  src  toric.ui
    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/Peristaltic> cd src

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/Peristaltic/src> ls
    browser.cpp          footswitchangle.ui    mainwindow.cpp                     phaco2.h      pria3.h            stylesheet.css
    browser.h            footswitchbutton.cpp  mainwindow.h                       phaco2.ui     pria3.ui           t_max.cpp
    browser.ui           footswitchbutton.h    mainwindow.ui                      phaco3.cpp    pria.cpp           t_max.h
    calibration.cpp      footswitchbutton.ui   orbitcool_set.cpp                  phaco3.h      pria.h             t_max.ui
    calibration.h        footswitchsense.cpp   orbitcool_set.h                    phaco3.ui     pria.ui            toric.cpp
    calibration.ui       footswitchsense.h     orbitcool_settings_dutycycles.cpp  phaco.cpp     print.cpp          toric.h
    chart.cpp            footswitchsense.ui    orbitcool_settings_dutycycles.h    phaco.h       print.h            toric.ui
    chart.h              frontscreen.cpp       orbitcool_settings_dutycycles.ui   phaco.ui      print.ui           util.h
    chart.ui             frontscreen.h         orbitcool_set.ui                   prcapvac.cpp  prvit.cpp          videoscreen.cpp
    CMakeLists.txt.user  frontscreen.ui        Peristaltic.pro                    prcapvac.h    prvit.h            videoscreen.h
    database.cpp         icon                  Peristaltic.pro.user               prcapvac.ui   prvit.ui           videoscreen.ui
    database.h           image_list.cpp        Peristaltic.pro.user.01378e5       prdia.cpp     Serial.cpp         vtascreen.cpp
    database.ui          image_list.h          Peristaltic.pro.user.1164b37       prdia.h       Serial.cpp.kf5905  vtascreen.h
    doctor.cpp           image_list.ui         Peristaltic.pro.user.44afbcd       prdia.ui      Serial.h           vtascreen.ui
    doctor.h             keypad.cpp            Peristaltic.pro.user.5c2d2ad       pria2.cpp     setting.cpp        welcomepage.cpp
    doctor.ui            keypad.h              Peristaltic.pro.user.64c37ee       pria2.h       setting.h          welcomepage.h
    footswitchangle.cpp  keypad.ui             Peristaltic.pro.user.786186f       pria2.ui      setting.ui         welcomepage.ui
    footswitchangle.h    main.cpp              phaco2.cpp                         pria3.cpp     share

    5) This is the Peristaltic.pro file which was already available in src.I tried to do cross-compile.

    #-------------------------------------------------
    #
    # Project created by QtCreator 2017-07-05T14:33:42
    #
    #-------------------------------------------------
    
    QT       += core gui serialport declarative multimedia webkitwidgets
    QT       += sql
    QT       += printsupport
    QT       += widgets
    CONFIG   += c++11 
    
    unix:!macx:!symbian: LIBS += -L/usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgproc
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = Peristaltic
    TEMPLATE = app
    
    SOURCES += main.cpp\
            mainwindow.cpp \
        doctor.cpp \
        phaco.cpp \
        phaco2.cpp \
        phaco3.cpp \
        prcapvac.cpp \
        prdia.cpp \
        pria.cpp \
        pria2.cpp \
        pria3.cpp \
        Serial.cpp \
        videoscreen.cpp \
        database.cpp \
        prvit.cpp \
        calibration.cpp \
        footswitchangle.cpp \
        footswitchbutton.cpp \
        setting.cpp \
        keypad.cpp \
        print.cpp \
    #    toric.cpp \
        vtascreen.cpp \
        frontscreen.cpp \
        browser.cpp \
        image_list.cpp \
        orbitcool_set.cpp \
        welcomepage.cpp \
        chart.cpp \
        t_max.cpp \
        footswitchsense.cpp
    
    HEADERS  += mainwindow.h \
        doctor.h \
        phaco.h \
        phaco2.h \
        phaco3.h \
        prcapvac.h \
        prdia.h \
        pria.h \
        pria2.h \
        pria3.h \
        Serial.h \
        videoscreen.h \
        database.h \
        prvit.h \
        calibration.h \
        footswitchangle.h \
        footswitchbutton.h \
        setting.h \
        keypad.h \
        print.h \
    #    toric.h \
        util.h \
        vtascreen.h \
        frontscreen.h \
        browser.h \
        image_list.h \
        orbitcool_set.h \
        welcomepage.h \
        chart.h \
        t_max.h \
        footswitchsense.h
    
    FORMS    += mainwindow.ui \
        doctor.ui \
        phaco.ui \
        phaco2.ui \
        phaco3.ui \
        prcapvac.ui \
        prdia.ui \
        pria.ui \
        pria2.ui \
        pria3.ui \
        videoscreen.ui \
        database.ui \
        prvit.ui \
        calibration.ui \
        footswitchangle.ui \
        footswitchbutton.ui \
        setting.ui \
        keypad.ui \
        print.ui \
    #   toric.ui \
        vtascreen.ui \
        frontscreen.ui \
        browser.ui \
        image_list.ui \
        orbitcool_set.ui \
        welcomepage.ui \
        chart.ui \
        t_max.ui \
        footswitchsense.ui

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/Peristaltic/src> sudo qmake Peristaltic.pro
    Project ERROR: Unknown module(s) in QT: declarative

    6) Because of the this error. I removed the declarative library from the Peristaltic.pro file, which will be in line "QT     +=  declarative"

    7) Again I run the qmake.

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/Peristaltic/src> sudo qmake Peristaltic.pro

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/example-applications/Peristaltic/src> sudo make

    Then I got the below error along with the build log.

    t_max.o: In function `t_max::on_calib_pushButton_clicked()':
    t_max.cpp:(.text+0x24dc): undefined reference to `cvCreateVideoWriter'
    t_max.cpp:(.text+0x257d): undefined reference to `cvReleaseVideoWriter'
    t_max.o: In function `t_max::on_pushButton_clicked()':
    t_max.cpp:(.text+0x2829): undefined reference to `cvReleaseCapture'
    t_max.o: In function `t_max::putImage(_IplImage*, QString, int, int, int, int, int, int)':
    t_max.cpp:(.text+0x667e): undefined reference to `cvConvertImage'
    t_max.cpp:(.text+0x669a): undefined reference to `cvWriteFrame'
    t_max.o: In function `t_max::timerEvent(QTimerEvent*)':
    t_max.cpp:(.text+0x7b56): undefined reference to `cvQueryFrame'
    t_max.o: In function `t_max::t_max(QWidget*)':
    t_max.cpp:(.text+0x7f5a): undefined reference to `cvCreateCameraCapture'
    t_max.cpp:(.text+0x7f73): undefined reference to `cvSetCaptureProperty'
    t_max.cpp:(.text+0x7f89): undefined reference to `cvSetCaptureProperty'
    t_max.o: In function `t_max::on_pushButton_2_clicked()':
    t_max.cpp:(.text+0xaca0): undefined reference to `cvReleaseCapture'
    videoscreen.o: In function `videoscreen::kill_function()':
    videoscreen.cpp:(.text+0x1cc9): undefined reference to `cvReleaseCapture'
    videoscreen.o: In function `videoscreen::Record_on()':
    videoscreen.cpp:(.text+0x2673): undefined reference to `cvCreateVideoWriter'
    videoscreen.o: In function `videoscreen::putImage(_IplImage*)':
    videoscreen.cpp:(.text+0x2c8d): undefined reference to `cvWriteFrame'
    videoscreen.o: In function `videoscreen::timerEvent(QTimerEvent*)':
    videoscreen.cpp:(.text+0x2eca): undefined reference to `cvQueryFrame'
    videoscreen.o: In function `videoscreen::videoscreen(QWidget*)':
    videoscreen.cpp:(.text+0x370a): undefined reference to `cvCreateCameraCapture'
    videoscreen.cpp:(.text+0x372c): undefined reference to `cvSetCaptureProperty'
    videoscreen.cpp:(.text+0x3742): undefined reference to `cvSetCaptureProperty'
    collect2: error: ld returned 1 exit status
    Makefile:320: recipe for target 'Peristaltic' failed
    make: *** [Peristaltic] Error 1

  • Hello,

    The OpenCV libs are not present in the default linux-devkit. Based on my internal discussion, our next 9.0 release should include all the opencv libs. The release should be coming out in the next couple of weeks. 

    Regards,
    Krunal

  • Hello Krunal,

    >> I am have already installed the opencv libraries using "sudo apt-get install libopencv-dev" before the build.

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux/usr/include/opencv2> ls

    aruco            datasets        hfs.hpp              ml.hpp                quality       stereo.hpp            video.hpp
    aruco.hpp        dpm.hpp         highgui              objdetect             quality.hpp   stitching             videoio
    bgsegm.hpp       face            highgui.hpp          objdetect.hpp         reg           stitching.hpp         videoio.hpp
    bioinspired      face.hpp        imgcodecs            opencv.hpp            rgbd          structured_light      videostab
    bioinspired.hpp  features2d      imgcodecs.hpp        opencv_modules.hpp    rgbd.hpp      structured_light.hpp  videostab.hpp
    calib3d          features2d.hpp  img_hash             optflow               saliency      superres              xfeatures2d
    calib3d.hpp      flann           img_hash.hpp         optflow.hpp           saliency.hpp  superres.hpp          xfeatures2d.hpp
    ccalib           flann.hpp       imgproc              phase_unwrapping      sfm           surface_matching      ximgproc
    ccalib.hpp       fuzzy           imgproc.hpp          phase_unwrapping.hpp  sfm.hpp       surface_matching.hpp  ximgproc.hpp
    core             fuzzy.hpp       line_descriptor      photo                 shape         tracking              xobjdetect.hpp
    core.hpp         gapi            line_descriptor.hpp  photo.hpp             shape.hpp     tracking.hpp          xphoto
    cvconfig.h       gapi.hpp        ml                   plot.hpp              stereo        video                 xphoto.h

    >> Below is my QT version inside devkit

    [linux-devkit]:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux/usr/include/opencv2> qmake -version
    QMake version 3.1
    Using Qt version 5.14.2 in /home/zumi/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit/sysroots/aarch64-linux/usr/lib

    Whether Qt version 5.14.2 supports declarative?

    Regards,

    Anu Jayan

  • Hello Anu,

    Whether Qt version 5.14.2 supports declarative?

    --> You need to check with the Qt community on that and we did not develop or design Qt5.14.2.

    Regards,
    Krunal