The startup_device.s file is provided by the device vendor in a BSP. The file will be copied into a µVision project automatically after selecting Device:Startup in the Manage Run-Time Environment window. It is used to configure the size of the stack that is used by exceptions and interrupt service routines (ISR) for the current project. The stack size requirements depend on the maximum nesting of exception and ISR execution and therefore on the priority settings of the various interrupt and exception sources. Also, the heap which is used by memory allocation functions is configured in this file.
Most of the middleware components only require additional stack size, whereas the File System component also requires additional heap size. The memory requirements are stated in the Resource Requirements section of each Middleware component.
refer from keil websit