RZ-G/RZG graphics: Difference between revisions

From Renesas.info
mNo edit summary
Line 20: Line 20:
* rsync to sysroot location (e.g. SD)
* rsync to sysroot location (e.g. SD)


About flags, notable one is: -qpa, should be set to wayland or wayland-egl. [https://doc.qt.io/qt-5/embedded-linux.html#eglfs-with-the-eglfs-kms-backend This page] has more info. -no-feature-xcomposite-egl, important otherwise the install fails at link stage.
About flags, a notable one is: -qpa, should be set to wayland or wayland-egl. [https://doc.qt.io/qt-5/embedded-linux.html#eglfs-with-the-eglfs-kms-backend This page] has more info. -no-feature-xcomposite-egl, important otherwise the install fails at link stage.


Version 5.6.3 and the newly built version can coexist. If not changed Qt is installed into /usr/local/Qt5.x.y.
Version 5.6.3 and the newly built version can coexist. If not changed Qt is installed into /usr/local/Qt5.x.y.

Revision as of 10:46, 15 October 2021

RZ-G

Qt

Build Qt outside of Yocto

First of all the RZ/G2 SDK is needed, core-image-weston-sdk, as well as core-image-qt-sdk are both fine. By default it is installed in /opt/poky/2.4.3 (RZ/G2E-M-N-H).

Install gperf and nss-dev to target rootfs (needed by qtwebengine, TODO: still not working because of nss includes not found).

Actually if gperf is not there, qtwebengine is not selected by the configure, so no problem in building, in other words no need to explicitly set -skip qtwebengine.

Steps to build (refer to this script for more details):

  • clone (potentially checkout specific version)
  • init repository
  • mkdir/cd qt5-build
  • ../configure ….. (many flags)
  • make
  • make install
  • rsync to sysroot location (e.g. SD)

About flags, a notable one is: -qpa, should be set to wayland or wayland-egl. This page has more info. -no-feature-xcomposite-egl, important otherwise the install fails at link stage.

Version 5.6.3 and the newly built version can coexist. If not changed Qt is installed into /usr/local/Qt5.x.y.

Qt apps development environment set-up

In order to develop a Qt application it would be easier to install Qt on the host PC, that includes also the IDE (Qt creator).

Once installed in Ubuntu, Qt creator icon should be visible in the application list, or it can be launched from the command prompt:

 ~/Qt5.12.10/Tools/QtCreator/bin/qtcreator.sh

If not already done, before launching Qt creator it is required to source the SDK environment setup script, for example:

source /opt/poky/2.4.3/environment-setup-aarch64-poky-linux

Qt creator is normally configured to develop, debug and run x86 applications. In order to cross develop, debug and run applications on the RZ/G2 some configurations are needed.

First, a new device has to be added, Tools -> Options -> Devices, then add a new device as per screenshot below:

Qt-Add-Device.png

Obviously adapting the IP address to match the RZ/G2 board IP address. Note that SFTP (openssh-sftp-server) and/or rsync must be installed on the target to be able to deploy the binaries.

Then go to the Kits tab and add a new Kit in the manual section:

Qt-Kits.png

Now Qt version tab:

Qt-version.png

Compilers:

Qt-Compilers.png

And finally Debuggers:

Qt-debuggers.png


Once the kit is configured, you can pick one of the many Qt examples available in the standard installation and make sure to use the Kit(s) just created:

Qt-Build-settings.png

At this point you should be able to build, debug and run Qt applications on a RZ/G2 board.