PCI Driver for a custom board works if I execute the app but not if I use the debugger.

From: Juan de la Cerda (juandlcc_at_hotmail.com)
Date: 06/29/04


Date: 29 Jun 2004 01:59:35 -0700

Hello,

I have built my PCI driver with DIRS/SOURCES construction and I added
it to my platform (PB 4.2 - Release Version) with no problems.

The registry entries are ok, and the device is present. I test the
driver, and works very good.

I open the driver from my app example (built with eVC++) with this
call:

dio = CreateFile(TEXT("TEX1:"), GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);

If I execute the app through (Ctrl-F5) button the driver works fine,
but If I try to debug it using (F5) button, the app runs until the
CreateFile call and hangs at this point.

In debug mode, If I put a break-point in the CreateFile line, I see
CreateFile is called because program stops at this line, later if
press F5 again to continue the program, it works fine too, and I can
access the board registers. But without the breakpoint, it hangs.

I don't understand what is happening and I don't know what I am doing
wrong.

Please, could anybody helpme?

Regards,

Juan.