Solved
we were using bootloader code on stm32f429i disc1 where we could find that a hard fault when switching from bootloader to user application. We have changed main stack pointer as well as reset the handler before switching to the user application.
..