Pixel-perfect UI on low-end hardware

2 January 2020

In the past, we have had customers approach us and ask what the minimum hardware requirements are in order to run a Qt Quick based application with 60 fps performance. Up until now, the answer was always that for best performance, Qt Quick applications require a decent CPU, a graphics chip supporting OpenGL ES 2.0, and fairly large amounts of memory in order to support loading the full QtCore, QtQml and QtQuick libraries into memory on top of the operating system (usually Linux or Android) – something like the Colibri iMX6 Solo 256MB from Toradex, which has 256 MB ram, 1 GHz CPU, and Vivante GC880 GPU which supports OpenGL ES 2.0.

If the customer was willing to sacrifice some performance, they could use the QtQuick Software Renderer allowing them to run their application on a device like the Colibri iMX6ULL from Toradex, which does not have an OpenGL ES 2.0 capable GPU, but still has large amounts (256 MB) of RAM and a 700 MHz CPU. The full Qt QML engine is still loaded in this case, but a software rasteriser backend is used to paint Qt Quick scene graph nodes rather than using OpenGL to draw items to the screen. Note that a commercial Qt license is required to use the QtQuick Software Renderer.

Recently, The Qt Company announced their new technology which has been developed to address the low-end segment of the market – Qt for MCUs. This allows applications with UIs written in (a slightly modified, subset of) QML using specially-developed QtQuick components to run on the bare metal (i.e. without an operating system) on low-end hardware, such as the RH850/D1M from Renesas which has 512 kilobytes of SRAM and a 240 MHz CPU or the STM32F769NI from STMicroelectronics which has 512 kilobytes of SRAM and a 216 MHz CPU, or slightly higher-end hardware such as the iMXRT1050 from NXP which has 512 kilobytes of tightly-coupled RAM and a 600 MHz CPU along with the PXP 2D graphics acceleration hardware pipeline.

(Note that some extra SDRAM is still required for the framebuffer, depending on the resolution of the screen you wish to drive. For example, an 800×480 screen with 32 bit color depth requires 1536 KB per frame, so a framebuffer of at least 3072 KB is necessary for smooth 60 fps rendering; thus 4 MB of on-board SDRAM is required. The reference development kit boards for those MCUs mentioned above have 64 MB or 128 MB of SDRAM included.)

Note that an application written for Qt for MCUs can be bare-metal (static application code, where no operating system or libraries exist), so the full QML engine does not exist in this context. Instead, we understand that at build-time, a tool is invoked which converts the application’s QML code (although only a slightly modified subset of the original QML language is currently supported) directly into C++ before compiling it into the application. The tool includes a new rendering technology (previously called the Qt Quick Ultralite renderer) to construct a lightweight scene graph to generate the appropriate drawing primitives (with support for 2D graphics acceleration if available, such as the PXP in NXP i.MX RT1050) when traversed in the application render loop.

A video showing what is possible using Qt for MCUs can be seen at https://www.youtube.com/watch?v=p9_Qy3kw1wc. In many cases, the entire application code can fit into 512 KB of SRAM, with an extra 4 MB allocated in SDRAM for the framebuffer, and the user is able to interact with a touch-driven Qt Quick UI running at 60 fps.

The Qt for MCUs Evaluation Package can be requested from The Qt Company if you want to evaluate this solution for your product. The Evaluation Package can be upgraded to a full Engineering Package by purchasing it from The Qt Company.

If you need help implementing your UI with Qt for MCUs, Qinetic can help – we are experts in Qt Quick and QML development, and have extensive experience working on embedded user interfaces in a variety of device types, from low-end industrial devices all the way up to high-end consumer devices. Contact us via our email address (info at qinetic dot com dot au) to discuss your project and how we might be able to help!

Previous
Previous

Qt 6.5 LTS and Qt For WebAssembly

Next
Next

Qt 5.12 LTS released!