Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

problem installing MHDDK and building

Hey guys, 

 

   Im having a little trouble getting setup. Would someone mind giving me a hand? I'm just getting setup to build a driver to virtualize a PXI-4204 for my software. I downloaded the nimhddk_windowsWDM-2.0 and nieseries.zip, then next I managed to get make working on cmd. Next i edited OSINTERFACE_DIR and OSINTERFACE_MAKEFILE to be:

OSINTERFACE_DIR := ../nimhddk_wdm
OSINTERFACE_MAKEFILE := win-wdm.mak

 both folders are in the same directory

Im not using DMA so I skipped step 4. on step 5 I'm stuck, I'm not really sure what exactly the PXI resource string is and where to edit.

 

with all that I ran make and got the following error:

C:\Documents and Settings\tianshiz\Desktop\nieseries>make
cl.exe /nologo /c /DkLittleEndian=1 /DkMicrosoft=1 /I./ChipObjects /I./Examples
 /I../nimhddk_wdm /Foaiex1.obj ./Examples/aiex1.cpp
process_begin: CreateProcess(NULL, cl.exe /nologo /c /DkLittleEndian=1 /DkMicros
oft=1 /I./ChipObjects /I./Examples /I../nimhddk_wdm /Foaiex1.obj ./Examples/aiex
1.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [aiex1.obj] Error 2

 what did I do wrong and not do?

 

Thanks

0 Kudos
Message 1 of 12
(8,036 Views)

i managed to find the answer, looks like the makefile EXAMPLE_SOURCE_DIR:= . needs to be changed to blank

 

though this gives me a new problem:

 

*** No rule to make target 'aiex1.obj', needed by 'aiex1.exe'. Stop.

 whats going on?

0 Kudos
Message 2 of 12
(8,030 Views)

Hey tianshiz-

 

I wouldn't say that changing the EXAMPLE_SOURCE_DIR fixed your problem, as properly defining that variable is necessary to point to the source files to build.  Your new error is just failing earlier in the process than before because it doesn't actually have anything to build.

 

My first guess (disclaimer: without any testing or real research) would be that the space in the file location is breaking your make step somehow.  Try moving it to just C:\mhddk or something else that doesn't have a space.  Does it get farther along in that case?

Tom W
National Instruments
Message 3 of 12
(8,027 Views)

Hi Tom,

 

 Thank you for the help. I moved my nimhddk_wdm to C:\nimhddkwdm as well as the nieseries folder. Running make now still gives me the error with the "system cannot find the file...".

Here are my makefile:

#
# nieseries/Makefile
#
# $DateTime: 2006/10/24 23:40:45 $
#

#
# Root source directory
#
EXAMPLE_SOURCE_DIR := .

#
# Directory where the examples and objects are built
# 
BUILD_DIR := .

#
#  DMA Library location
#
DMA_LIBRARY_DIR :=

#
#  OS Interface location
#
OSINTERFACE_DIR := ../nimhddkwdm
OSINTERFACE_MAKEFILE := win-wdm.mak

#
#  Define include directories, objects and targets
#

VPATH += \
    $(EXAMPLE_SOURCE_DIR)/ChipObjects \
    $(EXAMPLE_SOURCE_DIR)/Examples
 
CXX_INCLUDES += \
    $(INCLUDE_FLAG)$(EXAMPLE_SOURCE_DIR)/ChipObjects \
    $(INCLUDE_FLAG)$(EXAMPLE_SOURCE_DIR)/Examples

OBJECTS += \
    $(BUILD_DIR)/tESeries$(OBJ_SUFFIX) \
    $(BUILD_DIR)/tSTC$(OBJ_SUFFIX)

TARGETS += \
    $(BUILD_DIR)/aiex1$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex2$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex3$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex5$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex6$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex7$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex8$(PRG_SUFFIX) \
    $(BUILD_DIR)/aiex9$(PRG_SUFFIX) \
    $(BUILD_DIR)/aoex1$(PRG_SUFFIX) \
    $(BUILD_DIR)/aoex2$(PRG_SUFFIX) \
    $(BUILD_DIR)/aoex3$(PRG_SUFFIX) \
    $(BUILD_DIR)/aoex4$(PRG_SUFFIX) \
    $(BUILD_DIR)/aoex5$(PRG_SUFFIX) \
    $(BUILD_DIR)/digex1$(PRG_SUFFIX) \
    $(BUILD_DIR)/digex2$(PRG_SUFFIX) \
    $(BUILD_DIR)/gpct1$(PRG_SUFFIX) \
    $(BUILD_DIR)/gpct2$(PRG_SUFFIX) \
    $(BUILD_DIR)/gpct3$(PRG_SUFFIX)

#
# DMA Support
#
#    include only if the dma library path is defined
#
ifneq (,$(strip $(DMA_LIBRARY_DIR)))

    #
    # add DMA library objects
    #
    include $(DMA_LIBRARY_DIR)/dma.mak

    #
    # examples that use DMA
    #
    TARGETS +=

endif

#
#  OS specific rules and variables
#
include $(OSINTERFACE_DIR)/$(OSINTERFACE_MAKEFILE)

 

thanks for your help

0 Kudos
Message 4 of 12
(8,023 Views)

Hi tianshiz-

 

The path to your osinterface files is not clear.  Check the OSINTERFACE_DIR value.  It directs you to go "up" a directory and then into a directory called nimhddkwdm .  This appears to be the file layout you described, but you may want to confirm that.  If all of the files are in a flat directory called nimhddkwdm then '.' is equivalent to '../nimhddkwdm' in this makefile.  Does win-wdm.mak appear in the same directory that your main makefile resides?  Do the Chipobjects and Examples directories also exist at that same level?

 

It may be easier to help if you show a screenshot of Windows explorer with all of the paths expanded.  But really examining and understanding those path locations may benefit you even more so you know what is causing the failure on your own.

 

One more time, I'm curious why you don't just use NI-DAQmx.  Is it giving you trouble for any particular reason?

 

 

Tom W
National Instruments
0 Kudos
Message 5 of 12
(8,012 Views)

here are some shots:

1.JPG

2.JPG

3.JPG

 

the osinterface_dir should work here since im call the makefile from within nieseries.

 

as for why i am doing this, the ni-daqmx works fine, but for testing purposes we would like to have a solution where we can test the software without risking damage to the DAQs and the device we are controlling. I'm not fully sure on the details of this since I was only assigned this task and did not take part in the software testing.

0 Kudos
Message 6 of 12
(8,007 Views)

Hi tianshiz-

 

My build system was cluttered, but I was able to build the nieseries and nimseries examples against the Windows WDM osinterface libraries.  (Thanks to JoeF for the help!)

 

I also learned in the process that your original CreateProcess() failure is something we have been seeing off-and-on but don't totally understand (yet).  My guess is that it has something to do with subtle nuances in the line endings/tab settings in our makefiles that results from our cross-platform development and exports.  Can you share which build environment you're using (i.e. where did your copy of 'make' and associated compilers come from)?

 

In the meantime, you can try JoeF's suggestion to ensure that local line endings are preserved:

 

use 'make -k > build.bat' and run the batch file 

 

Let me know if this is unsuccessful.  Thanks-

Tom W
National Instruments
0 Kudos
Message 7 of 12
(7,980 Views)

Hi tom,

 

I got my make from windowsgnu32:

http://gnuwin32.sourceforge.net/packages/make.htm

it should be using a C compiler

 

i tried JoeF's suggestion but got a bunch of system cannot find file error for the createprocess function.

0 Kudos
Message 8 of 12
(7,978 Views)

Hi tianshiz-

 

I'm glad I asked about your build environment.  Is it safe to assume you are also using some version of Microsoft Visual Studio?  cl.exe is a Microsoft-specific compiler .exe.  I assume you are, since the gnuwin32 page lists it as a requirement.  It shouldn't matter much, but I use UnxUtils as an alternative.

 

If you are indeed using MSVC, make sure you are using the 'Visual Studio Command Prompt' which sets up various build environment variables for you.  On my installation I find this at Start>>Programs>>Microsoft Visual Studio>>Visual Studio Tools>>Visual Studio Command prompt.  I am able to run 'make' from that location and see better results.

 

If you execute cl.exe from your existing command window, what output do you see?

Tom W
National Instruments
0 Kudos
Message 9 of 12
(7,973 Views)

yes i'm using MSVC express 2010

i used the special cmd and it worked! now I have all the exes!

though i'm not really sure at the moment how to progress any further, i guess i'm just not understanding how these example interface with the NIDAQmx api library.

thanks for your help in getting my files built!

0 Kudos
Message 10 of 12
(7,970 Views)