Geeks With Blogs
Windows Embedded Annotations

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.

Posted on Thursday, November 5, 2009 9:35 AM Windows CE | Back to top

Comments on this post: Flash device driver in Windows Embedded CE 6.0

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Luca Calligaris | Powered by: