If the error "02: Failed on connect: Ep(01). Target marked as not debuggable" is seen when trying to start a debug connection, this normally means one of:
- The cable between the debug probe (e.g. Red Probe+, LPC-Link) is not correctly inserted, or is broken.
- In particular make sure that pin 1 of the cable is connected to pin 1 of the header on the board (most cables have a red stripe to indicate pin 1)
- The board is not provided with power.
- The board's debug circuit is incorrectly designed.
- The target MCU has been put into a flash protection mode via CRP (Code Read Protect).
- An application has been programmed into the MCU which reconfigures the debug pins for other uses or has programmed the clock into a "strange state".
- It may be possible to recover from this by booting into ISP mode or enabling "vector catch" functionality. For more details, please see the FAQ "Regaining debug access to target MCU".
- Alternatively, you may be able to use FlashMagic to erase the flash.