Error reported when terminating scanf() operation.

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by noritan_org on Sat Feb 13 02:15:58 MST 2010
An "Error" dialogue appears when terminating a program using scanf() function to get inputs from the user. The dialogue says,

Target request failed: Failed to interrupt.

The program I am executing is as follows.

#ifdef __USE_CMSIS
#include "LPC11xx.h"

#include <stdio.h>

int main(void) {
    char line[32];

    while (1) {
        scanf("%32s", line);
        printf("%s\n", line);
    return 0 ;
Program just echos-back user inputs.

When this program is running and the "Terminate" button on the "Debug" view is clicked, the "Error" dialogue appears.  But the "Debug" view is still existing there.

Once the "Error" dialogue appears, there is no way to communicate with LPCXpresso without un-plug from USB and then plug into USB again. When "Debug" button is clicked without recycling USB connection, an another error dialogue appears as follows.

Connect to emulator or board: NXP LPC1100
X No emulator or board available.
This could be because it is unpowered, unconnected or already in use.
Device is connected already Other VIDPID=00000000 (Connected)

I understand the second dialogue appears because a "gdb" process is still running grabbing the LPCXpresso USB device.

My operating system is Windows XP SP2
Does anyone have same problem ?