The Flash Tool (running on PC) talks to KL MCU on the sdk board via Virtual COM port over USB connection. I suspect the communication fails between the Flash Tool and the KL, probably because you changed the firmware on KL MCU.
So it seems we need to restore the default firmware on KL MCU first. On the other hand, it is weird that your debugger also fail to connect to the device.
There are several things we can try:
- plug in the USB cable of sdk board, and see if there is a VCOM port appears on your PC (is the VCOM port still there?)
- try the procedure in AN12360 3.1 Programming, use flash_gaming_binaries.bat/sh. Internally I think it also calls the Flash Tool. But just give it a shot.
- try to fix the LPC Link 2 connection, check the link: https://community.nxp.com/thread/425730, which also has a similar issue as you are.