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.

Using ti81xx fb with qt

I'm trying to create a QT project for a DM816x board and ran into a roadblock.  My project will compile and run until I included the ti81xxfb.h file.  My project can't seem to find it.  

If I try to include ti81xxfb.h from the includes directory I get :

error: linux/ti81xxfb.h: No such file or directory

I copied the file directly into my project and everything worked great until I tried to use the FBIO_WAITFORVSYNC ioctl.  I'm thinking this is a similar problem with my project referencing the wrong headers perhaps.  I can compile the video examples using the ti81xxfb.h header and FBIO_WAITFORVSYNC but as soon as I try to add any of these to my QT projects it claims to not know what it is.

error: 'FBIO_WAITFORVSYNC' was not declared in this scope

Looking at the Makefile I can't tell exactly what is the problem but I'm guessing its the INCPATH????.  Manually editing this doesn't make the compiler happy.  I just haven't been able to verify this or find a solution.  Ideas?

  • I'm thinking it's something from the qmake.conf file but nothing jumps out at me:

    #
    # qmake configuration for building with arm-linux-g++
    #

    include(../../common/g++.conf)
    include(../../common/linux.conf)
    include(../../common/qws.conf)

    #User specific Path - To Be edited by User
    QT_INSTALL_DIR = $$PWD/../../..
    SGX_SDK_ROOT = /home/tim/ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/graphics-sdk_4.04.00.02
    TSLIB_INCDIR = $TSLIB_INSTALL_DIR/include
    TSLIB_LIBDIR = $FILESYSTEM_INSTALL_ROOT/usr/lib

    # modifications to g++.conf
    QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    QMAKE_CC = arm-none-linux-gnueabi-gcc
    QMAKE_CXX = arm-none-linux-gnueabi-g++
    QMAKE_LINK = arm-none-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

    # modifications to linux.conf
    QMAKE_AR = arm-none-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
    QMAKE_STRIP = arm-none-linux-gnueabi-strip

    #Do not edit beyond this

    QMAKE_INCDIR_OPENGL_ES2 = $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/
    #QMAKE_INCDIR_OPENGL_ES2 += $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/
    QMAKE_INCDIR_OPENGL_ES2 += $$SGX_SDK_ROOT/include
    QMAKE_INCDIR_OPENGL_ES2 += $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/
    QMAKE_LIBDIR_OPENGL_ES2 = $$SGX_SDK_ROOT/gfx_rel_es6.x/
    QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um $$SGX_SDK_ROOT/gfx_rel_es6.x/libusc.so

    QMAKE_INCDIR_OPENGL += $$SGX_SDK_ROOT/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/
    QMAKE_LIBDIR_OPENGL = $$SGX_SDK_ROOT/gfx_rel_es6.x
    QMAKE_LIBDIR_OPENGL_QT = $$SGX_SDK_ROOT/gfx_rel_es6.x
    QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um -lusc

    QMAKE_INCDIR_OPENVG = $$SGX_SDK_ROOT/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/
    QMAKE_LIBDIR_OPENVG = $$SGX_SDK_ROOT/gfx_rel_es6.x/
    QMAKE_LIBS_OPENVG = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um -lOpenVG -lOpenVGU

    QMAKE_INCDIR_EGL = $$QMAKE_INCDIR_OPENGL_ES2
    QMAKE_INCDIR_EGL += $$QT_INSTALL_DIR/src/3rdparty/powervr/wsegl2
    QMAKE_INCDIR_POWERVR = $$QT_INSTALL_DIR/src/3rdparty/powervr/wsegl2
    QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
    QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um -lGLESv2 -lGLES_CM -lusc

    QMAKE_INCDIR += $$TSLIB_INCDIR
    QMAKE_INCDIR += $$QMAKE_INCDIR_OPENGL_ES2
    QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
    QMAKE_LIBDIR += $$TSLIB_LIBDIR
    QMAKE_LIBS = $$QMAKE_LIBS_OPENGL_ES2
    #-lts

    load(qt_config)
  • Hi Tim,

    Make sure your PATH environment variable contains qmake:

    host$ source ~/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/environment-setup

    On success you should have [linux-devkit]host>

    Please follow the exact steps from ti-ezsdk_dm816x-evm_5_05_02_00/docs/DM816x_EZ_Software_Developers_Guide.pdf
    5.4 Creating a Qt/Embedded application

    BR
    Pavel
  • 'which qmake' shows me the path to qmake.

    I also run the environment_setup.     

    Despite both of these steps my project refuses to recognize: #include <linux/ti81xxfb.h>

    The problem arises when qmake is used to generate the makefile.  The resulting file builds and seems to run until I start to include <linux/ti81xxfb.h> 

    error: linux/ti81xxfb.h: No such file or directory

    The file does exist but it seems the build environment may be looking in the wrong place.  If I try to manually add it to the INCPATH in the makefile it return an error and lets me know that is not a viable option.

  • Yes, seems to be Makefile related issue.

    Can you try with passing the whole path in the .cpp file (application):

    #include </home/users/pbotev/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/src/linux-2.6.37-psp04.04.00.01-headers/include/linux/ti81xxfb.h>

    BR
    Pavel
  • Tim,

    The Qt header files are located at:
    ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/qtopia

    This path depends on the OE_QMAKE_INCDIR_QT variable:

    [linux-devkit]:~/workdir/qt> echo $OE_QMAKE_INCDIR_QT
    /home/users/pbotev/ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/include/qtopia

    This variable is set (export) when you source the environment-setup script, check this script:

    ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/environment-setup

    export OE_QMAKE_INCDIR_QT=${SDK_PATH}/${TARGET_SYS}/usr/include/qtopia



    ti81xxfb.h is linux kernel header file which I am not sure you should use for Qt application.

    ti-ezsdk_dm816x-evm_5_05_02_00/linux-devkit/arm-none-linux-gnueabi/usr/src/linux-2.6.37-psp04.04.00.01-headers/include/linux/ti81xxfb.h

    ti-ezsdk_dm816x-evm_5_05_02_00/board-support/linux-2.6.37-psp04.04.00.01/include/linux/ti81xxfb.h

    BR
    Pavel

  • Changing the include path to be explicit does work but then I get an error for trying to use FBIO_WAITFORVSYNC.  The linux/fb.h is not the correct one as well.  I can explicitly change this to be an absolute path in ti81xxfb.h and then the second error foes away but I'm not a big fan of doing this as a permanent solution.

    I need access to the ti81xxfb.h version in Qt because it is just too slow in it's implementations.  I need direct access to the framebuffer to display images.  Can't get more than 15FPS letting Qt do the work.  I tried OPENGL as well and it was equally slow.  Various implementations get me a little better numbers but I can only get 30FPS writing to the framebuffer directly.