case study: porting qt for embedded linux on embedded processors
DESCRIPTION
Qt has been crucial for Texas Instruments to develop attractive applications as system demonstrations including appealing graphics and communication features within a defined time space and resource environment. This session will discuss porting and using Qt for Embedded Linux on several embedded processors. Walzer will present TI's experience and the current status of configuring Qt for ARM based platforms running Linux as the operating system, as well as have a look at the current state of integrating hardware accelerators such as DSP and graphics cores into Qt4. Presentation by Frank Walzer held during Qt Developer Days 2009. http://qt.nokia.com/developer/learning/elearningTRANSCRIPT
Porting Qt for Embedded Linux on Embedded Processors Frank Walzer – Texas Instruments
Beagle Board
Peripheral I/ODVI-D video outSD/MMC+S-Video outUSB 2.0 HS OTGI2C, I2S, SPI,MMC/SDJTAGStereo in/outAlternate powerRS-232 serial
OMAP3530 Processor600MHz Cortex-A8
NEON+VFPv316KB/16KB L1$256KB L2$
430MHz C64x+ DSP32K/32K L1$48K L1D32K L2
PowerVR SGX GPU64K on-chip RAM
POP Memory256MB LPDDR RAM256MB NAND flash
USB Powered2W maximum consumption
OMAP is small % of thatMany adapter options
Car, wall, battery, solar, …
10 cm
Agenda
• Motivation for using Qt at Texas Instruments• Porting Qt to TI Embedded Processors• What do we do with Qt?• Enhancing Qt through Accelerators• Future
Frank WalzerSenior System EngineerTexas Instruments [email protected]
Motivation
• Complexity, complexity, complexity…• Reduce amount of time to build a real system
– System software– Feature complete– Easy to learn & use– OS API abstraction– Cross-platform support– Modular & flexible – Open-source
• So we found Qt™• Many other options exist but none are matching our
requirements any better
Porting Qt to Embedded Processors
• Many TI Embedded Processors are ARM core based– ARM supported as architecture in Qt– Qt Embedded Linux our standard choice
• Follow the Qt build process– Get source download or use Git to clone Gitorious Qt tree(s)– Adaptation of mkspecs as needed– Configure, compile & test– Usually painless
• Already tested devices– OMAP35xx family (Cortex-A8, DSP, PowerVR SGX)– AM35xx (Cortex-A8, PowerVR SGX)– OMAP-L137/L138 (ARM9, DSP)– DM365 and DM644x (ARM9)
• Modifications to Qt sources?– Only once to work around a framebuffer issue (two lines of code)– 100% of demos and examples work unmodified– Expect changes needed for optimized hardware integration
OMAP3530 Processor
ARM®
Cortex™-A8CPU
L3/L4 Interconnect
C64x+™ DSP and video accelerators (3525/3530 only)
Peripherals
Program/Data Storage
System
I2Cx3
Serial Interfaces
Display Subsystem
Connectivity
MMC/SD/
SDIOx3
USBHost Controller x3
USB 2.0 HSOTG
Controller
GPMC
SDRCUART
x2
UARTw/IRDA
McBSPx5
McSPIx4
TimersGP x12WDT x2
Image Pipe Parallel I/F
Camera I/FPOWERVR SGX™Graphics
(3515/3530 only)
HDQ /1-wire
OMAP35x Processor
10 bit DACVideoEnc 10 bit DAC
LCDCont-roller
Our Use of Qt
• Ability to support customers porting Qt– Drive Qt releases to include tested mkspecs targeting TI devices– Provide example configurations to enable advanced hardware
• Creation of focused applications– Targeted end-equipment GUIs – Customer or major event support– From bare GUI prototype to full applications
• Standard demonstrations– Using Qt demos and examples a lot!
• Benchmarks– Either Qt demos & examples or small applications– qgears for graphics
• Early system testing– Quick way to evaluate complex peripherals on new hardware
Qt Application Development
• Often done cross-platform– New hardware not available in time– More efficient on PC– 99% of Qt application source code can be directly cross-
compiled with no modification• Serial port exception!
• Porting final applications to multiple platforms– Embedded platforms supported with multiple operating systems– Again limited hardware availability– Identical GUI maybe shown using PC only– Rapid prototyping
Development Experience
• Focused on Qt Embedded Linux• Human Machine Interface demo
– Done in 5 weeks– New graphical display & communications– 1 student + 0.5 engineers– Started on OMAP3 and ported to OMAP-L1– New hardware, new to Qt
• Weight Scale GUI prototype– 2 days– Developed on PC and tested on OMAP3
EVM using touch screen control• Several customer applications
– Just compile and run– For benchmarking on different OS
Demo Software Stack – OMAP-L1
ARM / Peripherals DSP
MV Pro5Linux Ethernet
Qt 4.5 Embedded Linux
Graphic Acceleration
(optional)
Temperature Demo
OS: MV pro5 LinuxQt 4.5 framework abstracts OS APIApplication program using C++ Object Oriented ProgrammingDebug on other platforms possible due to Qt 4.5 cross-platform supportHigh abstraction on application level leads to fast development
USB/ACM Display Timer
Linux API
GUI/FB TCP/IPSerial IO Timer
Real Applications
TSC2046
OMAP3/OMAP-L1xx
SPI
Enhancing Qt
• Full support for embedded hardware beyond ARM core– PowerVR SGX core for OpenGLES, OpenVG– C6xxx DSP for effective signal processing
• Ready to use with Qt classes– Initial support in Qt for OpenGLES– Still evaluating best use cases
• DSP designated for multimedia applications– Possible integration of TI gstreamer-plugin with Phonon?– Already requested by customers– Very early discussion phase
• Optimizing Qt for dedicated hardware requires support from silicon vendor
Future
• Provide full Qt porting support– Using gitorious as platform– Update when new devices appear– Wiki: http://omap.wiki.com/Building_Qt
• Evaluate Qt 4.6 SVG support– Does it integrate well with OpenVG API on OMAP3?
• Drive Qt use in TI on world-wide level• Develop additional reference applications
– Industrial automation market– Use Qt as GUI for process control software
Summary
• Customers can benefit from Qt in a similar way– Highly efficient development– Portable and re-usable (C++)– Great GUI creation tools– Same constraints on resources as we have
• We stepped into Qt at the right time– Highly successful projects for TI– Lots of customer requests– Plays well with TI plans and needs for Embedded
Processing
Demonstration