This forum link also discusses about similar issue. Thus it may be useful:
It didn't fix the problem.
Can you please give us the log (screenshot) that appears while trying to program using JLINK.
I will suggest you to also create a Forum thread at Segger's forum for JLINK, in order to take their perspective on this error message.
This is the log:
Downloading file [final.hex]...
J-Link: Flash download: Bank 0 @ 0x10000000: 2 ranges affected (95744 bytes)
J-Link: Flash download: Total time needed: 7.314s (Prepare: 0.049s, Compare: 0.041s, Erase: 3.135s, Program: 2.396s, Verify: 1.672s, Restore: 0.018s)
Writing target memory failed.
My app runs and verify passes using PSoC Programmer.
I checked for this issue.
I think this error comes because the hex has data at address 0x9030 0000 for PSoC6.
This needs to be removed from file.
Please check this KBA link from Segger for better understanding :Flashing Cypress PSoC Creator output data files with J-Flash - SEGGER Wiki
These forum links are discussing and provided solution for the same issue: