Hello Abul hasan,
I faced once similar problem, application was running using debugger, once power was reconnected, no action. I found out it was a matter of a clock initialization. I would suggest you to at least use any indicator (LED, console, etc) to find out how far your application gets and where it gets trapped. This applies if your programmer is really functional and program resides in FLASH.
Regards,
c0170