02: Failed on connect: Ep(01). Target marked as not debuggable
If the error "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.
- The target MCU has been put into a flash protection mode.
For example, with NXP parts, this might mean that you have locked the part via CRP - you may only be able to recover this using FlashMagic over a UART.
- An application has been programmed into the MCU which reconfigures the debug pins for other uses.
It may be possible to recover from this by enabling "vector catch" functionality. For more details, see the FAQ Getting debug access to target chip.
- The board is not provided with power.
- The board's debug circuit is incorrectly designed.
For more information see the FAQ SWD / JTAG Connectors and Pinout.