Get the BSP associated with your hardware platform; it includes the source code to the board's startup program. You must link your minidriver to this startup program.
For more information, see the BSP documentation.
For information about the functions in the startup library, see the Customizing Image Startup Programs chapter of Building Embedded Systems.