Getting more out of Qt on Windows Embedded Compact 7 & ARM processors

Published Tuesday January 29th, 2013
12 Comments on Getting more out of Qt on Windows Embedded Compact 7 & ARM processors
Posted in Build system, Compilers, Embedded, Performance, Qt

At the moment most of the buzz is probably around Qt5, but it is good to remember that Qt4 is still alive. While we are working to increase platform coverage on Qt5, there are still some platforms that are officially supported by Digia only with the Qt4 codebase. One of those platforms is Windows Embedded Compact 7. In this blog post I wanted to share with you a small tip that can bring you big performance benefits on Windows Embedded Compact 7.

Windows Embedded Compact 7 is tied to Visual Studio 2008, and if you are targeting an ARM based device you might have realized that the Visual Studio 2008 toolchain only supports ARMV4 and ARVM4i instruction sets for ARM architecture. Due to this limitation, Qt mkspecs for Windows Embedded Compact 7 defaults to ARMV4i instruction set. However, there also exists a version of the Visual Studio 2008 compiler which can generate code for more recent ARM instruction sets and CPU cores. This compiler is included in the Platform Builder (the tool used to generate Windows Embedded Compact 7 OS images and SDKs). If you have Platform Builder installed, you can build Qt for ARMv7 instruction set and also benefit from the more advanced floating point units of the latest CPU cores. To build Qt 4.8.x with ARMV7 instruction set and to use the latest floating point instructions supported by ARM you can do the following:

In the mkspec you are using for WEC7 ARM build, change the value of CE_ARCH variable from armv4i to armv7, and add the following code block there:

QMAKE_CFLAGS    += -QRarch7 -arch:VFPv3-D32 -QRfpe-

Then make sure that you have the cl.exe from platform builder (c:\WINCE700\SDK\BIN\i386\ARM) in your path before visual studio 2008, and just reconfigure and build Qt and your Qt application. That’s it – now just enjoy the better performance!

For more detailed information about the different Visual Studio 2008 compiler versions, and the options used for QMAKE_CFLAGS, please check the paper written by Adeneo Embedded. With the upcoming Windows Embedded 2013, Microsoft has also updated the Windows Embedded Compact toolchain to Visual Studio 2012.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Build system, Compilers, Embedded, Performance, Qt


Alexander Quinones says:

Hi Janne,

thanks for the useful post. I would like to get Qt 4.8.x or higher running on the Beagleboard Mx, taking advantage of the PowerVR SGX Graphics acceleration for OpenGL. Unfortunately I could not find enough up to date information to carry out this.

Apart of the useful tip above, could you please share some instructions to get get Qt 4.8.x or higher running with VS2008 for WC7 in the BBmX? i.e. ‘configure’ flags, etc.

Based on your video in Youtube tittled “Qt Commercial Support for Windows Embedded Compact 7”, it seems that you’re the right person to be asked for 😉

Thanks in advance.

Best wishes,


Janne Anttila says:

Good point Alex, WEC7 has been supported only by commercially licensed Qt 4.8.x (what Digia made before bying the whole Qt business). Actually all source code patches are also available in open source version, but documentation has been available only in commercial version. I think this will change once we start supporting WEC7 with Qt5. So now you basically have two options:

1. Download evaluation of commercial version from and get detailed instruction with the package
2. Use open source version with the instructions I tried to summarize below (I did not test these so there might be some errors)

Instructions for build Qt for WEC7:

1. Install WEC7 and prerequisites as instructed here
* (Remember to install Board support packages for ARMV7)
2. Download and install BeagleBoard XM BSP from Adeneo (
3. Install WEC7 image to BeagleBoard XM (Follow instructions from Adeneo package)
4. Modily mkspecs\wince70embedded-armv4i-msvc2008\qmake.conf, and replace “CE_SDK = WEC7_SDK_NAME” with “CE_SDK = BeagleBoard-xM – WEC7”
5. Possibly apply also ARMv7 settings instructed in the blog post
6. Run configure: configure -platform win32-msvc2008 -xplatform wince70embedded-armv4i-msvc2008 -no-accessibility -exceptions -opengl es2
7. Set environmnet for Qt building as follows:

set PATH=%CD%\bin;%PATH%
checksdk -sdk "BeagleBoard-xM - WEC7 (ARMv4I)" -script bb-xm-env.bat

8. Add WEC7 opengl stuff to INCLUDE and LIB environment variables:

set INCLUDE=%INCLUDE%;C:\WINCE700\public\COMMON\sdk\inc
set LIB=%LIB%;C:\WINCE700\public\COMMON\sdk\lib\armv7\checked

9. Build with nmake
10. Copy binaries to memory card, put it to beagle and enjoy!

Alex says:

Hi again Janne,

thanks for your answer.

I am preparing my PC environment to test your instructions. I will let you know soon the results.

In the meantime I have some questions for you:

1) where is the “bb-xm-env.bat” script?
2) to support QML, I suppose that I have to add the flag “-declarative” to the configure call, right? is QML working fine under WC7?
3) Is ActiveX hosting working fine? I am planning to host WMP in my application…

Janne Anttila says:

1) bb-xm-env.bat is output of checksdk tool
2) No specific configure options is needed, declarative should be build by default. And yes it works OK on WEC7
3) ActiveQt container is supported on WEC7, thought not tested very well. ActiveQt server is not currently supported in WEC7.

Paul says:

Hi Janne,

Could you please tell me if QtWebkit is supported on Qt 4.8 modules and WEC7.

Thank you!

Janne Anttila says:

WebKit is not supported with Qt 4.8 on WEC7. I once tried to get it working and IIRC there wasn’t too big problems but I just did not have time to finish the work. And in the other hand we haven’t had too many requests for it…

Pablo Cerón says:

Hi Janne,

thank you for the post, i’m experimenting some performance issues with qt 4.8.4 in windows embedded compact 7 and this seems to be very helpfull. The problem is, when i try to configure and make after adding the new lines i get warnings telling me that the new options could not be parsed and therefore they make no effect. Am i overlooking something?

Thank you!

Janne Anttila says:

You probably don’t have correct cl.exe in the path, as said in blog post please make sure that you have the cl.exe from platform builder (c:\WINCE700\SDK\BIN\i386\ARM) in your path before visual studio 2008. If you did install platform builder to something else than default path, just modify the path accordingly.

You can check that you have the correct cl.exe first in the path by launching cl.exe from command prompt and by checking that the output is as follows:

Microsoft (R) C/C++ Optimizing Compiler Version 15.01.50304.03 for ARM
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

Pablo Cerón says:

Hi Janne,

thank you for your answer, it turned out i had a little mess in my path env. variable. I checked it and now is working.

Anyway I am still getting some strange performance issues. It takes more than five seconds to load even the most simple application, and when I implement, for example, a tab widget, it takes again some time (depending on the complexity) to switch the new widget on. The performance once the widget is loaded is ok, but this delay is very dissapointing.

Have you experimented or heard about similar behaviour? I tried with different build configurations but no one had a truly impact in this problem.

Thank you,
Pablo Cerón

arash says:

support,services,download,sayn,Try now nokia N8-00

arash says:

sayn nokia N8-00

Bernard Gerondale says:

Buildings serve several needs of society – primarily as shelter from weather and as general living space, to provide privacy, to store belongings and to comfortably live and work. A building as a shelter represents a physical division of the human habitat (a place of comfort and safety) and the outside (a place that at times may be harsh and harmful).:

Take a peek at our new blog as well

Commenting closed.

Get started today with Qt Download now