Product/Application Development on Windows CE Platform

Windows CE (also known officially as Windows Embedded Compact) is Microsoft's operating system for minimalistic computers and embedded systems. Windows CE is a distinctly different operating system and kernel, rather than a trimmed-down version of desktop Windows. It is not to be confused with Windows XP Embedded which is NT-based. It is supported on Intel x86 and compatibles, MIPS, ARM, and Hitachi SuperH processors.

Targeting Windows CE processors for native Visual Studio 2005 projects (http://blogs.msdn.com/davidklinems/archive/2005/11/04/489247.aspx )

By default, Visual Studio 2005 provides SDKs for Pocket PC 2003 and Smartphone 2003 (ARMV4 instruction set).

Additional SDKs (Windows Mobile 5.0 Pocket PC, Windows Mobile 5.0 Smartphone) will add platforms to the Installed SDKs list in the Win32 Smart Device Project Wizard. Each installed SDK enables Visual Studio 2005 to target CPUs supported by that platform. For the Windows Mobile 5.0 SDKs, support for the ARMV4I instruction set is enabled.For developers wishing to write applications for Windows CE 5.0 supported CPUs, the Windows CE 5.0 Standard SDK will need to be installed.

The Windows CE 5.0 SDK provides support for targeting the following instruction sets:
ARMV4I
MIPSII
MIPSII_FP
MIPSIV
MIPSIV_FP
SH4
x86

Common Windows CE Porting Issues(From Windows Desktop OS to Windows CE)

1. Windows CE is a UNICODE operating system, and all strings used in Win32 API calls must be UNICODE.

2. Some of the Functions/API are missing.
(
http://eleves.ec-lille.fr/~couprieg/index.php?2008/06/17/39-first-issues-when-porting-an-application-on-windows-ce )
There's no errno.h,signal.h for Windows CE.

3. It does not support C++ Exceptions BUT support Win32 & MFC exceptions.

4. It does not suport STL as STL uses C++ Exceptions ...There are some WinCE ported STL available , check it out!!!

5. Some of Standard C/C++ API are not supported ; Use Win32 API instead.

6. Multithreading Issues
Don't have SignalObjectAndWait, and it's painful.

Windows CE Developers FAQ -
http://www.megawap.ru/~wap/dev/ce_dev_faq.htm

Windows CE Memory Tools

(http://blogs.gotdotnet.com/ce_base/archive/2006/01/11/511883.aspx)

Heap Memory Tools:

Application Verifier
AppVerifier is Microsoft's official tool for finding the source of a heap leak. It shipped with the CE test kit (CETK) in 4.2 but in 5.0 it ships with the OS. It records a callstack for each heap allocation, discarding data about allocations that are freed. So in the end you can look to see which allocations were not freed, and get callstacks to identify them. AppVerifier can be controlled over KITL from the desktop side, and it also has a device-side UI for controlling it on a standalone device.

CeLog Memtracking
It's really just a logging engine. But we've gone into the heap APIs and added CeLog logging calls to them, so you can set up CeLog to record a stream of heap calls. It will also record callstacks for the heap accesses. However we don't ship any official tools to process that stream and do things like identify leaks.

Memalyzer
There's an unofficial tool -- "memalyzer," that you can use. If you have Platform Builder you have memalyzer (it'll be in your path if you open a build command window). Memalyzer parses the CeLog log file and reports any leaks that it sees.

LMemDebug
LMEMDEBUG records all the heap operations (plus callstacks) into memory. It discards callstacks for freed allocations, so that you only track callstacks for apparent leaks. It can also give you heap statistics like total allocation counts and bucketed size histograms. It is controlled entirely from the Target Control Window, so it requires KITL. It comes with Platform Builder, and if you do a debug build it'll be built and run by default.

Entrek TOOLBOX
Another company, Entrek, has a suite of tools that includes one which can catch heap leaks. I think it is similar to AppVerifier. It's aimed at application developers instead of people who are using Platform Builder.

Non-tools
Despite the fact that they LOOK like they might be useful, I don't find these tools good for investigating heap problems: Remote Performance Monitor, Remote Heap Walker, or the "hd" command in the Target Control Window.

Blogs

Mike Hall’s Windows Embedded Blog –

https://blogs.msdn.com/mikehall/

Windows CE Networking Team WebLog –

http://blogs.msdn.com/cenet/

Doug’s Windows CE Blog –

http://bolingconsulting.com/blog/index.php

Windows CE Base Team Blog: Windows CE kernel and storage technologies and system tools –

http://blogs.msdn.com/ce_base/archive/2008/06/20/bsp-porting-documentation.aspx

Windows Embedded Blog (Windows CE 6.0 Development) –

http://www.bsquare.com/blog/

Links:

The History of Windows CE –

http://www.hpcfactor.com/support/windowsce/

Windows Embedded CE Overview –

http://www.microsoft.com/windows/embedded/products/windowsce/default.mspx

Mobile and Embedded Development –

http://msdn.microsoft.com/en-us/library/ms376734.aspx

Embedded Visual C++ (Pocket PC Development Network) –

http://www.pocketpcdn.com/sections/evc.html

Windows CE Knowledge Center: Where can I find information about developing applications for Windows CE? -

http://www.fmcpherson.com/knowce/where/where3.htm

Microsoft Windows CE 3.0: Windows CE Memory Architecture –

http://msdn.microsoft.com/en-us/library/ms918032.aspx

Layman's Windows CE FAQ –

http://www.pocketpccity.com/articles/2000/3/2000-03-02-Layman-s-Windows.html

Window CE FAQ –

http://www.advantech.com.tw/ESS/Default.aspx?page=FAQWindowsCE

Windows CE Developers FAQ –

http://www.megawap.ru/~wap/dev/ce_dev_faq.htm

Windows CE Archives: FAQs –

http://www.pda-archives.com/wince/2.htm

PocketPC Resources –

http://www.kitris.com/apical/ppclinks.htm

Chris De Herrera's Windows CE Website : Pocket PC Faq –

http://www.pocketpcfaq.com/

Windows CE & Pocket PC UserGroups –

http://www.programmersheaven.com/mb/pocket-pc/Board.aspx

Microsoft Windows CE UserGroup/Newsgroup FAQ –

http://www.jasondunn.com/archive/windowsce/faq/index.htm

Windows CE Networking Team WebLog –

http://blogs.msdn.com/cenet/

Windows CE Win32 API Programming –

http://www.ddj.com/184410532

Going Mobile: How to Port Your Win32 Code to Windows CE –

http://www.developer.com/ws/pc/article.php/1483401

Qt and Windows CE: A cross-platform C++ framework for mobile devices –

http://www.ddj.com/mobile/208200263

Windows CE Registry Guide and basic Tweaks – http://www.hpcfactor.com/support/cesd/s/0006.asp

Web services for Windows CE – http://searchsoa.techtarget.com/tip/0,289483,sid26_gci1320403_tax285607,00.html

gSOAP & Web Services: XML serialization for C/C++ with the gSOAP toolkit –

http://www.ddj.com/cpp/184401909;jsessionid=RVCILQY3DLJRKQSNDLPCKHSCJUNN2JVN?_requestid=13853

Windows CE Base Team Blog: Windows CE kernel and storage technologies and system tools –

http://blogs.msdn.com/ce_base/archive/2008/06/20/bsp-porting-documentation.aspx

Free Book on Windows CE Development –

http://www.deviceguru.com/2008/05/29/free-book-explains-windows-ce-development/

How is Windows Mobile related to Windows CE –

http://blogs.msdn.com/marcpe/archive/2005/04/22/how-is-windows-mobile-related-to-windows-ce.aspx