how can i rectify this?
Is it of hardware issue or any library functions is missing?
can any one please help
One reason could be that the flash algorithm is not correctly set as per your target device in Options for Target -> Utilities -> SettingsSelect the correct algo and try again.
Indeed, look at the specific message in the pop-up describing what the initial failure was. For example not finding the target, not having a flash algorithm for the memory in question, etc.
also look at messages in the uVision 'Output' window ...