Compartir a través de


Implementing the OEMIsFlashAddr Function (Windows CE 5.0)

Send Feedback

The OEMIsFlashAddr function determines whether the .bin file being downloaded is destined for flash memory or for RAM. This function takes a memory address, and its return value indicates whether the address is in flash memory.

If a boot loader image is destined for flash memory, the BLCOMMON library will call flash memory routines during and after the download process to save and write the boot loader image to flash memory.

To implement the OEMIsFlashAddr function

  • Edit the file Flash.c by adding the code necessary to fully implement the OEMIsFlashAddr function.

    The following code example shows the implementation of the OEMIsFlashAddr function for the hardware platform used in this boot loader example.

    #define FLASH_START      0
    #define FLASH_LENGTH     0x02000000
    BOOL OEMIsFlashAddr(DWORD dwAddr)
    {
            // Does the specified address fall in the flash address range?
            //
            if ((dwAddr >= FLASH_START) && (dwAddr < (FLASH_START + FLASH_LENGTH)))
            {
                    return(TRUE);
            }
    
        return(FALSE);
    }
    

See Also

How to Develop a Boot Loader

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.