lpcware

Linux framebuffer driver and Qt GUI on LPC1788

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Vladimir Khusainov on Mon Mar 26 08:26:29 MST 2012
The following video provides a demonstration of the framebuffer device driver and a Qt/Embedded GUI application running on  the NXP LPC1788 microcontroller under uClinux:

http://www.youtube.com/watch?v=rqaHkpbcT5s

Highlights are as follow:

o) The first demo is a user-space application that we (Emcraft Systems) use to test framebuffer device driver implementations on various Linux (and uClinux) platforms. It opens /dev/fb, queries the framebuffer driver for the parameters (height, width, depth), mmap's the framebuffer into the process space and then just fills the framebuffer memory as a data array with a certain pattern. Being that simple, this application brings the "GUI" up with no noticable delay.

o) The second demo is a Qt/Embedded GUI appliction. Qt/E is a very sophisticated GUI library, which allows about anything one may desire from GUI in an embedded design. Various sophisticated widgets, different kinds of input devices (including a combination of several inputs), images of different formats, host-based GUI builders and what not.

The trade-off of course is that the Qt library is a lot of code. Specifically, resultant Qt/E binaries, as built for Cortex-M3, are 6-7 MBytes in size. On the LPC1788, the start-up time for this specific Qt/E demo is about 10 seconds from the point when the applications gets started from the shell.

o) This Linux configuration has the entire file system, the Qt application binary, fonts, images, etc included, in the RAM-based initramfs, which it mounts as a root filesystem. The initramfs is linked directly into the kernel image at built time. As a result, the loadable Linux image for this configuration is quite sizeable  (about 9 MBytes).

o) This video loads the Linux image onto the target from a TFTP host. This of course is not practicle in a deployed configuration. Realistic possibilities for the LPC1788 would be:

- Mount a partition on SD Card, USB Flash stick or JFFS2 filesystem in NAND Flash and run the Qt application from there.

- Load a Linux image with the large initramfs containing the Qt application from SD Card, USB Flash stick or NAND Flash. Any of these options would require adding support for a corresponding I/O  interface to U-boot.

Outcomes