Please refer to our application note AN98558 which introduces an alternate method to program the Cypress SPI flash by using Altera’s Nios® II tool
Thank you for the reference. It is working well.
I have already tried using NIOS II.
But the issue was in my override text file .
My Sector size and Block size was not the correct one.
Now it is corrected as per the application note and flash is working well.