Qt on Real Time OSs
... or how to get your Qt app on QNX and friends   10/09/09
Contents

• Some Basics
  – CPU, Operating System, Windowing System

• Hardware Acceleration
• Deeper look into...
  – QNX...
Contents




           Some Basics




                         3
Qt for RTOS

• Qt for RTOS ports are Community Supported
• Not all Qt modules available
• Qt APIs available unmodified (co...
Embedded vs. Desktop

• Qt Embedded can be fine-tuned for size
  – configure options, e.g. -no-script
  – feature macros, ...
Integration

• Before we can start developing, the following
  must be considered:
  – CPU Architecture
  – Operating Syst...
Contents




           CPU Architecture




                              7
Classic layer diagram




                     QtCore

                Opera)ng	
  System

                      CPU




 ...
Classic layer diagram + atomics




                      QtCore
       Atomic
    Operations   Opera)ng	
  System

      ...
Classic layer diagram + atomics II




             Atomics    QtCore

                       INTEGRITY

                 ...
Summary CPU Architecture

• Qt is CPU agnostic on operating systems that
  feature atomic operations
   – INTEGRITY, Windo...
Contents




           Operating Systems




                               12
Classic layer diagram (again)




                      QtCore

                 Opera)ng	
  System

                    H...
OS dependencies

• Qt Embedded is self-contained
  – Build system is bootstrapped
  – Requires libc, pthread, some math fu...
Classic OS diagram



                               QtCore




   Linux   Windows   Solaris      Mac	
  OS	
  X   Symbian...
Classic OS diagram (simplified)



                   QtCore




         POSIX              Win32

                 Hardw...
Operating System

• Qt supports
  – Win32 (*_win.cpp files)
  – POSIX (*_unix.cpp files)
     • Exception: Some native cal...
Operating System - Summary
• QtCore runs well on a POSIX compliant OS/RTOS
• Amount of required POSIX functionality varies...
Contents




           Windowing Systems




                               19
Classic layer diagram with GUI



                           QtGui

             QtCore       Windowing	
  System

       ...
Windowing Systems

                                 QtGui




      X11             S60                Windows            ...
Introducing QWS

• Qt contains it's own Windowing System:
  “Qt Windowing System” (QWS)
• Contains a compositing window ma...
Classic layer diagram with GUI



                           QtGui

             QtCore              QWS
                 ...
QWS vs. OS


                   QWS




                         Drivers???




             Opera)ng	
  System

         ...
QWS diagram with gfx output


                                     QWS




    DirectFB         LinuxFB        Custom    V...
QVFB screenshot




                  26
Embedded Windowing Systems

                              QtGui




            X11                               QWS




...
QWS vs. X11

• X11
  – asynchronous client-server architecture, IPC
  – requires additional window manager process
  – com...
Contents




           Hardware Acceleration




                                   29
HW Acceleration in Qt

• Qt supports OpenVG and OpenGL ES >= 2.0
• Both allow HW accelerated 2D [or 3D] painting
• However...
Embedded Windowing Systems

                           QtGui




              X11                        QWS

           ...
EGL to the rescue

• EGL is the glue layer between Windowing
  Systems and hardware acceleration
  (http://www.khronos.org...
Embedded Windowing Systems

                               QtGui




   EGL            X11                        QWS

   ...
Something still missing for QWS

• EGL is still relying on an underlying windowing
  system
• Works for X11, but not (out ...
Something still missing (2)

• OpenKODE with KDui extension is its own
 windowing system
• So is QWS




                 ...
Something still missing (3)

• OpenKODE with KDui extension is its own
 windowing system
• So is QWS
• #%^!@#!!




      ...
Introducing Lighthouse

• Lighthouse is the new QWS
• Lighthouse is not its own windowing system
• Instead, features plug-...
Embedded Windowing Systems

                               QtGui




   EGL            X11                        Lighthou...
Summary Windowing System

• QWS works well with non accelerated displays
   – HW acceleration possible, but tricky
• Light...
Summary Integration

• Before writing an application, we need to...
   – consider the atomic operation support
   – consid...
Contents




           Demo




                  41
Contents




           A Deeper Look Into...
                  QNX




                                   42
QNX

• QNX port is community supported
  – About 5 occurrences of conditional Q_OS_QNX code

• Several successful deployme...
QWS diagram on QNX


                                           QWS




             io-­‐display         Custom          ...
QNX - limitations

• No QSystemSemaphore, QSharedMemory
  – SYSV style semaphores and shared memory missing
    from QNX

...
QNX

• How to build (see Platform Notes - QNX)
  –   -xplatform unsupported/qws/qnx-i386-g++

  –   -embedded i386

  –   ...
Contents




           A Deeper Look Into...
                VxWorks




                                   46
VxWorks

• VxWorks port is community supported
  – About 60 VxWorks specific code changes

• Several successful deployment...
QtGui diagram on VxWorks


                 QtGui




                  X11

                VxWorks

                Hard...
VxWorks - limitations

• No QSystemSemaphore, QSharedMemory
  – No SYSV style semaphores, shared memory

• No QLibrary
  –...
QNX

• How to build (see Platform Notes - VxWorks)
  –   -xplatform unsupported/qws/vxworks-simpentium-g++

  –   -embedde...
Contents




           A Deeper Look Into...
               INTEGRITY




                                   50
INTEGRITY

• Only a subset of Qt supported
• Port currently only available on request




                                ...
Contents




           Thank you :)
           (Questions?)




                          52
Upcoming SlideShare
Loading in...5
×

Qt on Real Time Operating Systems

11,572

Published on

Presentation by Harald Fernengel held during Qt Developer Days 2009.

http://qt.nokia.com/developer/learning/elearning

Published in: Technology
1 Comment
4 Likes
Statistics
Notes
  • if can give me more info about qt for vxworks?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
11,572
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
319
Comments
1
Likes
4
Embeds 0
No embeds

No notes for slide

Qt on Real Time Operating Systems

  1. 1. Qt on Real Time OSs ... or how to get your Qt app on QNX and friends 10/09/09
  2. 2. Contents • Some Basics – CPU, Operating System, Windowing System • Hardware Acceleration • Deeper look into... – QNX – VxWorks – INTEGRITY 2
  3. 3. Contents Some Basics 3
  4. 4. Qt for RTOS • Qt for RTOS ports are Community Supported • Not all Qt modules available • Qt APIs available unmodified (code once...) (with few exceptions that are documented in platform notes) 6
  5. 5. Embedded vs. Desktop • Qt Embedded can be fine-tuned for size – configure options, e.g. -no-script – feature macros, e.g. QT_NO_FILEDIALOG 4
  6. 6. Integration • Before we can start developing, the following must be considered: – CPU Architecture – Operating System – Windowing System 6
  7. 7. Contents CPU Architecture 7
  8. 8. Classic layer diagram QtCore Opera)ng  System CPU 8
  9. 9. Classic layer diagram + atomics QtCore Atomic Operations Opera)ng  System CPU 9
  10. 10. Classic layer diagram + atomics II Atomics QtCore INTEGRITY CPU 10
  11. 11. Summary CPU Architecture • Qt is CPU agnostic on operating systems that feature atomic operations – INTEGRITY, Windows CE • Otherwise, Qt has built-in support for... – x86_64, i386, ARM, MIPS, PowerPC, SuperH, ... • Optional: Blend and Blit optimizations (using iwMMXt, SSE, ...) 11
  12. 12. Contents Operating Systems 12
  13. 13. Classic layer diagram (again) QtCore Opera)ng  System Hardware 13
  14. 14. OS dependencies • Qt Embedded is self-contained – Build system is bootstrapped – Requires libc, pthread, some math functions – No other external library dependencies (like STL) 14
  15. 15. Classic OS diagram QtCore Linux Windows Solaris Mac  OS  X Symbian RTOS... Hardware 15
  16. 16. Classic OS diagram (simplified) QtCore POSIX Win32 Hardware 16
  17. 17. Operating System • Qt supports – Win32 (*_win.cpp files) – POSIX (*_unix.cpp files) • Exception: Some native calls instead of POSIX for optimization or deeper integration (for example on Symbian, Mac OS X) 17
  18. 18. Operating System - Summary • QtCore runs well on a POSIX compliant OS/RTOS • Amount of required POSIX functionality varies (e.g. QT_NO_FILESYSTEM) • Subsystems (e.g. file system) can be replaced by native calls if necessary 18
  19. 19. Contents Windowing Systems 19
  20. 20. Classic layer diagram with GUI QtGui QtCore Windowing  System Opera)ng  System Hardware 20
  21. 21. Windowing Systems QtGui X11 S60 Windows Mac  OS  X ??? Linux Solaris Symbian Windows Mac  OS  X RTOS... Hardware 21
  22. 22. Introducing QWS • Qt contains it's own Windowing System: “Qt Windowing System” (QWS) • Contains a compositing window manager • Requires direct access to graphics card and input devices (mouse/touchscreen, keyboard/keypad) 22
  23. 23. Classic layer diagram with GUI QtGui QtCore QWS Screen  Drivers Opera)ng  System Input  Drivers Hardware 23
  24. 24. QWS vs. OS QWS Drivers??? Opera)ng  System Hardware 24
  25. 25. QWS diagram with gfx output QWS DirectFB LinuxFB Custom VNC Virtual  FB Opera)ng  System Hardware Network qvW 25
  26. 26. QVFB screenshot 26
  27. 27. Embedded Windowing Systems QtGui X11 QWS Linux Solaris Symbian Windows Mac  OS  X RTOS... Hardware 27
  28. 28. QWS vs. X11 • X11 – asynchronous client-server architecture, IPC – requires additional window manager process – complex due to lots of (optional) extensions • QWS – self-contained – single process mode possible 28
  29. 29. Contents Hardware Acceleration 29
  30. 30. HW Acceleration in Qt • Qt supports OpenVG and OpenGL ES >= 2.0 • Both allow HW accelerated 2D [or 3D] painting • However, both APIs don't define the interface to the Windowing System 30
  31. 31. Embedded Windowing Systems QtGui X11 QWS ??? ??? Opera)ng  System OpenVG OpenGL  (ES) Hardware 31
  32. 32. EGL to the rescue • EGL is the glue layer between Windowing Systems and hardware acceleration (http://www.khronos.org/egl/) 32
  33. 33. Embedded Windowing Systems QtGui EGL X11 QWS ??? Opera)ng  System OpenVG OpenGL  (ES) Hardware 33
  34. 34. Something still missing for QWS • EGL is still relying on an underlying windowing system • Works for X11, but not (out of the box) for QWS • OpenKODE with KDui extension required 34
  35. 35. Something still missing (2) • OpenKODE with KDui extension is its own windowing system • So is QWS 35
  36. 36. Something still missing (3) • OpenKODE with KDui extension is its own windowing system • So is QWS • #%^!@#!! 36
  37. 37. Introducing Lighthouse • Lighthouse is the new QWS • Lighthouse is not its own windowing system • Instead, features plug-in architecture for integrating existing windowing systems WARNING! WORK IN PROGRESS 37
  38. 38. Embedded Windowing Systems QtGui EGL X11 Lighthouse EGL  +  KD Opera)ng  System OpenVG OpenGL  (ES) Hardware 38
  39. 39. Summary Windowing System • QWS works well with non accelerated displays – HW acceleration possible, but tricky • Lighthouse works best with existing windowing systems (KDgui) with OpenGL (ES) or OpenVG • X11 works best if the infrastructure already exists for the target board, or if co-existence with other X11 applications is required 39
  40. 40. Summary Integration • Before writing an application, we need to... – consider the atomic operation support – consider the feature set – consider the windowing system – consider the hardware acceleration • If that's done, it's write once, deploy everywhere 40
  41. 41. Contents Demo 41
  42. 42. Contents A Deeper Look Into... QNX 42
  43. 43. QNX • QNX port is community supported – About 5 occurrences of conditional Q_OS_QNX code • Several successful deployments – QWS without HW acceleration • No Photon integration – Photon is a windowing system → collides with QWS • Photon's X11 server not recommended – Doesn't feature Xrender, poor rendering quality 43
  44. 44. QWS diagram on QNX QWS io-­‐display Custom VNC Experimental! QNX Hardware Network 44
  45. 45. QNX - limitations • No QSystemSemaphore, QSharedMemory – SYSV style semaphores and shared memory missing from QNX • No QProcess support – Starting a process in a thread not supported • QWS has single process GUI support only • No Qt3Support 45
  46. 46. QNX • How to build (see Platform Notes - QNX) – -xplatform unsupported/qws/qnx-i386-g++ – -embedded i386 – -no-qt3support – -qt-gfx-qnx – -qt-mouse-qnx – -qt-kbd-qnx – -no-exceptions – ... 43
  47. 47. Contents A Deeper Look Into... VxWorks 46
  48. 48. VxWorks • VxWorks port is community supported – About 60 VxWorks specific code changes • Several successful deployments – X11 with OpenGL acceleration 47
  49. 49. QtGui diagram on VxWorks QtGui X11 VxWorks Hardware 48
  50. 50. VxWorks - limitations • No QSystemSemaphore, QSharedMemory – No SYSV style semaphores, shared memory • No QLibrary – No plugins • Only one QApplication per system – VxWorks has flat address space • No Qt3Support 49
  51. 51. QNX • How to build (see Platform Notes - VxWorks) – -xplatform unsupported/qws/vxworks-simpentium-g++ – -embedded vxworks – -exceptions – -no-qt3support – ... 43
  52. 52. Contents A Deeper Look Into... INTEGRITY 50
  53. 53. INTEGRITY • Only a subset of Qt supported • Port currently only available on request 51
  54. 54. Contents Thank you :) (Questions?) 52
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×