Error reported when terminating scanf() operation.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error reported when terminating scanf() operation.

337 Views
lpcware
NXP Employee
NXP Employee
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"
#endif

#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.


Quote:
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 ?
0 Kudos
1 Reply

308 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Feb 14 13:02:06 MST 2010
Thank you for the code fragment. We're investigating your problem report.

Regards,

CodeRedSupport
0 Kudos