Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Create compelling UI for embedded devices with the Nucleus Add-on for the Qt Framework
Phil Brumby
Qt is a registered trade mark of Digia Plc and/or its subsidiaries.
mentor.com/embedded
Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Qt is a registered trade mark of Digia Plc and/or its subsidiaries. All other trademarks mentioned in this document are trademarks of their respective owners.
Agenda
What is Qt? Qt for Embedded Demo - Nucleus Add-on for the Qt Framework Memory Management Performance Matters Demo - Bad Frame rate analysis Summary
mentor.com/embedded
12/03/2014
WHAT IS QT?
mentor.com/embedded
What is Qt?
A cross-platform UI framework
Spans traditional to more sophisticated UIs Includes UI development tools Wide range of developers, open governance model Over 450,000 developers in more than 70 industries Medical, white goods, automotive, consumer, industrial UI implementation is portable across many platforms
mentor.com/embedded
12/03/2014
What is Qtcontinued
Qt Widgets
Ideal for static, traditional 2D UIs buttons, controls Uses Qt Designer a WYSIWYG UI editor Auto code generation Compact UI code memory footprint For more advanced and animated UIs with 3D and OpenGL/ES shader effects UI written in QML (CSS & JavaScript like script) Uses Qt Quick Designer a WYSIWyG UI editor Runs on embedded rendering engine Requires OpenGL/ES GPU
mentor.com/embedded
Qt Quick
QT FOR EMBEDDED
mentor.com/embedded
12/03/2014
From engagements experienced in the embedded space significant use cases exist for deployment of both QWidget & Qt Quick solutions. As GPU enablement and memory size continues to increase across a fuller range of hardware, QML based Qt Quick solutions become more viable Substantial embedded device market opportunities for mid-range UIs via QWidget
Resource limited embedded devices requiring smaller memory footprint, No GPU available Non-CE markets, such as medical and white goods requiring static layout and more traditional 2D buttons and controls style UIs Well correlated with the general embedded RTOS market opportunity
mentor.com/embedded
Supports Qt Widgets & Qt Designer UI tooling Execution of Qt run-time on Nucleus RTOS Accessibility of Qt tools / artifacts in ReadyStart IDE
mentor.com/embedded
12/03/2014
Qt version supported
Footprint management tool Trace points and agents for performance analysis of Qt-based GUIs Supported platforms
TI AM3358 EVM (ARM A8) i.MX6 SabreLite (ARM A9) Additional platforms on roadmap
mentor.com/embedded
Qt appears as a library project within Nucleus Wizard takes care of project creation from Qt + patches Configuration and build via IDE Conceals Qts complex command line build process Qt Creator doesnt help with this stuff Easier to build and configure Qt under Nucleus than under any other OS including desktops
10
mentor.com/embedded
12/03/2014
Project builds, runs and debugs just like any other Nucleus Process Qt presentation layer is enclosed in a sub-folder Qt tool chain is hidden behind the IDE Can right-click or double click to launch Qt GUI design tool
11
mentor.com/embedded
Qt Designer
12
mentor.com/embedded
12/03/2014
MEMORY MANAGEMENT
14
mentor.com/embedded
12/03/2014
Qt Footprint Management
Manual Qt library configuration is a headache! Base options turned on/off in IDE (about 9-10)
15
mentor.com/embedded
Qt Footprint Management
One click memory optimization Produces an application-specific library instance, of minimum size Not available with standard Open Source Qt
Qt library footprint for the Washing Machine demo was reduced from ~13MB to ~4MB by compacting
Absolute minimum Qt library footprint is ~3MB
16
mentor.com/embedded
12/03/2014
PERFORMANCE MATTERS!
17
mentor.com/embedded
For Mentor, after enabling a customer with UI technology, OS, Middleware and Dev tools, we have a vested interest in ensuring a quality product is produced!
18
mentor.com/embedded
12/03/2014
Responsiveness
How quickly a UI responds to an input (e.g. a touch event) Avoiding UIs which are perceived as laggy
Animation smoothness
Start-up time
Affected by OS, UI framework, application processing, resource loading and graphics computation
19
mentor.com/embedded
Performance Metrics
To get to the bottom of Qt performance issues, you must understand system metrics for measuring performance We can then use them to understand the story of just what is happening on the hardware at any given time
Execution profile LISRS, HISRS, Tasks, Events CPU State, utilisation, multi core access Memory Pools, usage, load File system activity
Frame rate (FPS), pixel load, runtime data requests, % screen redraw, start up time
mentor.com/embedded
20
10
12/03/2014
Sourcery Analyzer is a new and powerful way to debug and analyze the behavior and performance of complex single and multi-core embedded systems.
uses tracing to investigate problems where interactive debuggers fall short provides a variety of out-of-the-box analysis tools to get up and running quickly
enables users to develop application-specific analysis tools tailored to their unique requirements
21
mentor.com/embedded
Available agents
22
mentor.com/embedded
11
12/03/2014
24
mentor.com/embedded
12
12/03/2014
SUMMARY
25
mentor.com/embedded
Summary
Integration of Qt QWidgets with an RTOS yields an attractive mid-range embedded UI solution Fully enabling effective embedded UI development requires features beyond those available via the open source Qt project:
Host based UI development and simulation Automated memory footprint management tool Built-in UI performance analysis instrumentation
The users interactive experience of the UI is critical to the success of the device, performance matters!
Performance visualization tools such as Sourcery Analyzer provide deeper and faster insight into difficult UI problems by performing customized analysis across the OS, Qt framework and application layers
26
mentor.com/embedded
13