Directory Structures: Windows : E:\Windows (Windows system) KeilBin : E:\Keil\C51\bin AGDIDebug : E:\...\Debug Hello : E:\...\Hello (This is a uvision project)
AGDI needs connection code between interface and target hardware. Since PC connects the target through parallel ports, I choose WinIo that enables direct I/O under Windows2000/XP. It's required that WinIo.dll/sys/vxd be in the same directory as the executable program using them. So I put them in the Windows & KeilBin & AGDIDebug & Hello directories.
InitTarget() in AGDI.cpp calls InitializeWinIo() in WinIo. When I press F5 in VC6, uvision2 is opened. Then I press Ctrl+F5 in uvision2. However, InitializeWinIo() failed ( it returns false ) which means WinIo.sys cannot be found.
I'm sure the WinIo.dll has been loaded (::LoadLibrary() returns non-zero). How can uvision2 find WinIo.sys?
Please Help!
It's much better now after debugging. :)
It works when putting WinIo.dll/sys/vxd in E:\Keil\uv2\. InitTarget() read/write ecr register, status register, control register is fine. However, it has trouble when r/w epp data register. Don't know why, since my test program using WinIo works fine.
"How can uvision2 find WinIo.sys?"
Surely, it can't? It is up to your AGDI code to find WinIo for it?!
Have you tried a simple test program that verifies that your code can correctly initialise WinIO - independently of uVision?
View all questions in Keil forum