Creating the Boot Loader Main Function (Windows Embedded CE 6.0)


The main function, which is an entry point routine, is called by the boot loader's StartUp function. The main function turns around and calls BootloaderMain, which is defined in the BLCOMMON library. The routine can continue to perform any number of initialization tasks, but it should end in a call to the BLCOMMON library entry point.

The BLCOMMON library defines the basic structure of a boot loader and drives many of the implementation details for the boot loader development process. For more information about the BLCOMMON library, see BLCOMMON Code Library.

  1. Create a file called Main.c.

  2. Add the implementation for the main routine in the Main.c file.

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

    void (void)
        // Common boot loader (blcommon) main routine.
        // Should never get here.

Community Additions