Search by Tags

How to use Automotive Cluster example on Linux


Article updated at 28 May 2019
Compare with Revision

Subscribe for this article updates


This article shows the Automotive Cluster demo running on the Qt framework on Toradex computer modules running Linux.

Automotive Cluster Display Demo

The instrument cluster is used to display information of the vehicle systems. This includes gauges for various parameters such as speed, rpm or fuel, as well as indicators, status lights and also acoustic effects.

Steps to Run the Demo

Download the OpenEmbedded repository

The automotive cluster example for Linux is based on OpenEmbedded (core), to build the example you have to follow OpenEmbedded (core) tutorial and change some steps.

The example has been tested with version V2.4, make sure to synchronize the repository with the correct version.

mkdir ~/oe-core
cd ~/oe-core
repo init -u -b LinuxImageV2.4
repo sync

Add Toradex extra layer

The “meta-toradex-extra” layer contains the Auomotive Cluster example. You need to manually download this layer using:

cd ~/oe-core/stuff
git clone -b ew2015-automotive-cluster 
cd ~/oe-core/build

Compiling configuration

Source the “export” file, this will configure all the environment variables required for OpenEmbedded.

. export

At the “oe-core/build” directory we have to change two files before starting the build. Change the file “local.conf” to configure the machine and add the automotive cluster package:

vim conf/local.conf

Add the qt-automotive-cluster-demo package as a preinstalled package by using the IMAGE_INSTALL variable:

#MACHINE ??= "qemux86"
#MACHINE ?= "colibri-t20"
MACHINE ?= "colibri-vf"
IMAGE_INSTALL_append = " qt-automotive-cluster-demo "

Change the bblayer.conf to include the “meta-toradex-extra”:

vim conf/bblayer.conf

Add the meta-toradex-extra layer:

# These layers hold machine specific content, aka Board Support Packages
  ${TOPDIR}/../stuff/meta-toradex \
  ${TOPDIR}/../stuff/meta-toradex-extra \

Now, run bitbake command to start the build.

bitbake console-trdx-image

Change Application Resolution

By default, Automotive Cluster example is configured to use 1024x600, you can change for 800x480 by removing the define in a “meta-toradex-extra” file.

vi meta-toradex-extra/recipes-qt/qt-automotive-cluster-demo/

Remove “DEFINES+=RESOLUTION_1024x600”


Change Screen Resolutions

You can also change you screen resolution by setting the U-Boot variable (use a serial console to enter the U-Boot prompt):

set vidargs video=dcufb:1024x600
set vidargs video=dcufb:800x480

Use “save” to store this change permanently.

Building the qt user interface

If you want to build the Qt application you have to prepare the QT SDK, configure the Qt Creator and download the source code.

Prepare Qt SDK

To compile the SDK and setup Qt Creator, refer to this article:

How to set up QT Creator to cross-compile for embedded Linux

Building the Qt User Interface using Qt Creator

The source code can be downloaded from the git repository QtAutomotiveClusterDemo:

cd ~/QtProjects/
git clone

If you build all the OpenEmbedded root file system the Automotive Cluster application will be started automatically by default. Before the application starts, the init script also exports some Qt specific environment variables.

However, when using Qt Creator one need to configure Qt Creator to set this environment variables accordingly. In the Projects "Run" settings, extend the "Run Environment" with these variables:


To use the touchscreen you have to be sure that your touchscreen driver is enabled and change the Qt environment variable to something like this (see also Resistive Touch Screen (Linux) and Capacitive Multi-Touch Display (Linux)):

QWS_MOUSE_PROTO: tslib:/dev/input/touchscreen0

Furthermore, add the argument "-qws" in the "Run" section in order to run directly on the Framebuffer device.