Friday, 30 April 2010

Windows Embedded 7 RTM

After months of a CTP version being available the final version has been released to manufacturer. Windows Embedded Standard 7, the successor of Windows XP Embedded was released April 27th 2010 at the ESC West - Silicon Valley

Windows Embedded Standard 7 is the first embedded OS based on the successful desktop o/s Windows 7. Thus the aligned naming.

It is a highly customizable embedded o/s in a componentized form, which allows OEMs to build devices with a control over the memory footprint and the addition of embedded enabling features (HORM etc.) but still get the familiarity and power of Windows 7.

You can find the Windows Embedded Standard 7 RTM press release here.

But if you want to learn more and you’re in the UK why not come to the Microsoft HUB event next Thursday 6th May.
I’ll be there on the Direct Insight booth and in our Windows Embedded CE- Hands on Lab event. So why not register via this link

>> Nigel

Thursday, 22 April 2010

OEMReadDebugByte in CE6.0

I quite often run a simple serial terminal using the debug port, having this we can control the platform without active sync, a keybaord or even an LCD, but when running from CE6.0 the application doesn't build because OEMReadDebugByte fails. If you want an app to be able to do the equivalent of OEMReadDebugByte instead use the function InputDebugCharW.

Wednesday, 31 March 2010

Waiting for Thread / Process termination

When launching child processes from applications I used to use GetExitCodeProcess on the process handle, checking if STILL_ACTIVE is returned if it is still running.. heres the smart way!

After spawning a process or creating a worker thread the end of the process/thread can be waited on using WaitForSingleObject.

For instance for threads:

HANDLE hThread;
hThread = CreateThread(NULL,0,StartThread,&threadParam,0,NULL);
if(hThread1 != NULL)
{
WaitForSingleObject(hThread,INFINITE);
}


For processes:

PROCESS_INFORMATION pi={0};
if (CreateProcess (parameters, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, &pi))
{
WaitForSingleObject(pi.hProcess,INFINITE);
}


Thursday, 25 March 2010

Registry notifications to pass data between kernel to Apps/drivers

This breifly outlines the technique of passing information or state changes between the Windows CE Kernel/OAL and running drivers or applications. Passing events and notification from the kernel to a driver or application can be a little problematic, information flow the other way is straight forward using the kernel IOCtls.

One thing we can use here is the registry and the registry change notifications, for instance, both drivers/applications and kernel can change the registry, the kernel calls are all preceeded by NK, for instance:

Kernel:

NKRegOpenKeyEx
NKRegCreateKeyEx
NKRegSetValueEx

Driver/App:

RegOpenKeyEx
RegCreateKeyEx
RegSetValueEx

So why not set a state or value to pass in the registry, then wait on a particular registry key or value being changed using the following:


// create an event on a particular registry change
HANDLE event = CeFindFirstRegChange(....)

while(1)
{
// wait for notification of a change
WaitForSingleObject(event, INFINITE);

// clear event
CeFindNextRegChange(event);

}

Using this technique small, or large complex data can be shared very easily.

Thursday, 11 March 2010

Platform Builder: Remember to enable Multiprocessor Build

A support incident today reminded me that many people have forgotten to enable Multiprocessor Build support.

Enabling this will reduce the overall time it takes to build a platform workspace and it can be autodetected if enabled. But it seems the default is a manual selected number of processors=1


The selection is accessed via Tools / Options with the selection options as captured below:




Hope this is of help. Nigel

Thursday, 4 March 2010

Passing data using SetEvent on Windows CE

Martin in the office came across this one, normally SetEvent is used to signal between two threads or even processes that something has happened, a very light weight message queue shall we say, the major limitation is that you can't pass any parameters or data, so you end up having multiple events or storing the parameter information in the registry etc..but using this API you can associate a DWORD of information against an event that is signalled, pretty handy for simple signalling information between drivers and applications...

BOOL SetEventData(   HANDLE hEvent,   DWORD dwData );
For more information look at:

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

Enjoy!

Thursday, 4 February 2010

Southern Electronics Show

Just a quick note to invite you to come visit me on the ByteSnap Design stand at next week's Southern Electronics show in Farnborough from the 10 - 11 February 2010.

We will be demonstrating a number of customer projects including one from Rotalink, a designer and manufacturer of miniature motors, transmission and controls. This demo hooks up a DC motor speed detector to a mini-fairground wheel to show rotation and angle information via a display using our SnapUI product.

We'll also be showcasing other bespoke embedded electronics designs, embedded firmware and board design services. Come down to have a talk about services we can provide you from PCB design, through Firmware/BSP design to application development.

See you there!