Flash device driver in Windows Embedded CE 6.0

In previous version of Windows CE the flash drivers followed a model based on FAL (Flash Abstraction Layer): the developer had to write the FMD (Flash Media Driver) layer and link it with fal.lib to create a DLL which exposed a block (DSK_Xxx) stream interface. Starting with Windows Embedded CE 6.0 R2 MS introduces a new model based on a MDD/PDD layer structure. The MDD part is implemented in a DLL (flashmdd.dll) exposing a block (DSK_Xxx) stream interface which handles some specific IOCTL_FLASH_XXX codes; the DLL calls the PDD DLL which the developer has to write according to the interface specified by MS; this interface is similar to the MDD (a block stream interface driver) which handles some specific IOCTL_FLASH_PDD_XXX codes. The FAL/FMD model is still supported.
In addition, in Windows Embedded CE 6.0, you have a new partion driver (flashpart.dll) specifically designed for flash block devices. This partition driver has to be used with the MDD DLL since it’s aware of the specific IOCTL_FLASH_XXX codes that the MDD DLL implements.

MS provides a library (flashpddwrapper.lib) which gives the developer the opportunity to reuse the FMD code in the new architecture: this library exposes the PDD interface to the MDD DLL but internally calls the old FMD entry point. 

Notice that the shared source for Windows Embedded CE 6.0 includes the FAL library source code which was not available before: the FAL is implemented in C++  while in previous versions it was implemented in C. Other source code which is available (in the public part of %_WINCEROOT%) includes flashpddwrapper and some specific FMD. Some of these FMD (for example the sample RAM flash driver) are linked in two different ways to create a flash driver which uses the FAL (for example ramfmd) and another one which benefits from the new model (flashpdd_ram). 

Flash driver architecture before Windows Embedded CE 6.0 R2

FAL.LIB + FMD.LIB (developer)

Flash driver architecture after Windows Embedded CE 6.0 R2



FLASHPDD.DLL (developer)

MDD/PDD wrapping the FMD




FAL.LIB + FMD.LIB (developer)

For additional info see MSDN documentation.

This entry was posted in Windows Embedded CE and tagged , , , , , , . Bookmark the permalink.

One Response to Flash device driver in Windows Embedded CE 6.0

  1. Shiva says:

    How flash driver implementation is done in WinCE 7..?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s