Running QT GUI Print


This application note explains how to run a demo QT GUI on the Emcraft Systems Kinetis System-On-Module (SOM) under uClinux. The demo is shown in the following video.


Hardware Platform

All software tests documented below were performed on the Emcraft Kinetis System-On-Module (SOM) Starter Kit, plugged into the Freescale Tower with the TWR-LCD-RGB module connected. The TWR-LCD-RGB module hosts a 4.3" 480 x 272 LCD with a touch panel controlled by an I2C device. Note that the following rework is required on the TWR-LCD-RGB, in order for the touchscreen to work with the Kinetis SOM:

  • Install a 0 Ohm resistor to R1.

On the TWR-SOM-BSB-2A baseboard the jumpers on JP4 pins 1-2 and 3-4 must be installed to enable pull-up resistors on the I2C bus.

Installing the Demo

Download the Qt add-on for uClinux. It includes the QT 4.7.3 library sources, ported and ready for uClinux Cortex-M.

Go to the top of your Linux Cortex-M installation and unpack the Qt add-on:

[psl@ocean ~]$ cd linux-cortexm-1.13.0
[psl@ocean linux-cortexm-1.13.0]$ tar jxf /tmp/qt-4.7.3.tar.bz2
[psl@ocean linux-cortexm-1.13.0]$

This will add the following directory to your Linux Cortex-M installation: A2F/qt-4.7.3.

Download the Qt demo project archive (qtdemo.tgz) and install it to the top of the Linux installation. To build the project, first go to to the Qt sources tree and build it:

[psl@ocean linux-cortexm-1.13.0]$ . ./ACTIVATE.sh
[psl@ocean linux-cortexm-1.13.0]$ cd A2F/qt-4.7.3/
[psl@ocean qt-4.7.3]$ ./linux-cortexm-configure-mouse
...
[psl@ocean qt-4.7.3]$ make
...

Now, go to the project directory and build the bootable Linux image:

[psl@ocean linux-cortexm-1.13.0]$ cd projects/qtdemo
[psl@ocean qtdemo]$ make
...

Note: The demo project has been built and validated in context of the Emcraft Systems Release 1.13.0. If you are using a different release, some porting changes may be needed.


Running the Demo

Boot the bootable Linux image (qtdemo.uImage) to the Kinetis SOM from the network, as described in Loading Linux images via Ethernet and TFTP.

When you boot the Linux image on the target, it proceeds to automatically launch the Qt GUI on the 4.3" LCD. It takes about 3 seconds for the GUI to start to a fully functional state. Use the touch to navigate and control the GUI.