Hello Calvin,
here is the procedure I took.
1. Download JLink_OpenSDA_V2.bin according to Segger J-Link Firmware for OpenSDAv2 | MCU on Eclipse.
2. Update bootloader by OopenSDA_V2.bin.
3. Change the IDE debugger to J-Link.
4. Execute "Download and Debug" an appropriate program on the IDE.
If you succeed to download, then the flash mass erase had been recovered.
If you don't, I'm sorry, you should search an alternative procedure.
5. Download 0221_k20dx128_k64f_0x5000.bin from Firmware FRDM K64F - Handbook | mbed.
6. Update bootloader by 0221_k20dx128_k64f_0x5000.bin
5. Change (or Get back) the IDE debugger to CMSIS-DAP.
I hope this will help you.
Best regards,
Yasuhiko Koumoto.