이것저것/My_Work

Running LabVIEW on Windows XP Embedded

우담바라 2008. 6. 4. 21:42

Overview

This tutorial will attempt to provide instructions for building a Windows XP Embedded image that will run LabVIEW

Introduction

Unlike Microsoft Windows XP Home and Pro editions, Windows XP Embedded makes it possible to build a completely customized Windows installation image. This is advantageous when certain functionality or compatibility that is normally included in Windows is either unnecessary or unwanted, and when storage capacity is a significant limiting factor. This document is intended to give a brief tutorial on building an XP Embedded image based on a specific target platform, and includes those components that LabVIEW 8.0 needs to run.

Installing Windows XP Embedded Studio


A fully functional 90-day evaluation copy of Windows XP Embedded Studio is available on Microsoft's website here. Run the XPEFFI.exe program. You should be given a choice of four different "Main Product Install Options":
  • Windows XP Embedded SP1 Tools
  • SQL Server Desktop Engine (MSDE)
  • Windows XP Embedded SP1 Database
  • Windows XP Embedded SP2

The first three selections are necessary. The fourth (SP2) simply adds/modifies the database with new/updated components from Service Pack 2, so this is a good idea but not required. Click "Start Download Now" and follow the installation instructions after the downloads finishes. The default settings should be sufficient.

Building an XP Embedded image based on a target

  • XP Embedded Target Analyzer
  • XP Embedded Studio includes two small executables called Target Analyzers that gather information about your system and produce a file called devices.pmq. XP Embedded Studio can use this file to determine what components (drivers, etc.) your image will need to take advantage of your system's hardware. While this step isn't necessary, it greatly reduces the effort needed to build an image for your system. The Target Analyzers are located in the "utilities" directory of your XP Embedded Studio installation (probably Program Files\Windows Embedded\utilities). There are two:
    • tap.exe - Use this if your target has Windows 2000, XP, or 2003 Server running on it.
    • ta.exe - Use this if your target has a different Operating System or none at all by running it from a DOS or Windows 95 boot floppy.

    Whichever Target Analyzer you use, running it should produce the devices.pmq file in the same directory. Move this file to your system running XP Embedded Studio.
  • XP Embedded Target Designer

    Start the XP Embedded Target Designer tool (Start > Programs > Microsoft Windows Embedded Studio > Target Designer) and create a new configuration (File > New). Name it and click "OK."

    Initially, your configuration has no components and is set with default settings (located in "Settings" under your configuration's file name in the center column). Depending on your target, these may or may not need to be changed. For example, if your XP Embedded image will be the primary or only Operating System on the target (running on the primary or only boot partition), the defaults should be correct. But if you will be dual booting to the XP Embedded image on a secondary partition/drive (such as when testing), you will likely need to make some drive letter changes, etc. Instructions for dual booting XP Embedded with XP Pro are here.

    If you generated a devices.pmq file using one of the Target Analyzers, import it now (File > Import). If not, you will need to manually determine what components your installation will need to utilize your hardware. This process is beyond the scope of this tutorial, so consult the XP Embedded and online documentation for help with this.

    Note: The Target Analyzers import the drivers necessary to functionally utilize as much of your system's hardware as Windows XP recognizes. If you don't need/want some of this functionality, you can remove some of these now. For example, if your target has an integrated ethernet card but you don't want network functionality, you can remove the ethernet controller and other network-related drivers from the list and thereby prevent internet- and network-related components (such as Internet Explorer) from being added by the Dependency Check in the next step. Or you can remove these components individually after they have been added by the Dependency Check. This is also a good time to add any additional features you may want.

    Once you've completed the initial step of adding the basic components for your target, you will need to fix any unresolved dependencies. Each component in XP Embedded Studio contains a list of other files which they depend on. Running a Dependency Check (Configuration > Check Dependencies) will go through these components and add anything that may be missing. When this completes, there may be a list of dependencies (in the lower pane) that require you to make choices before they can be resolved. Double-click each of these and make the choices as instructed. These are mostly preferences that will not determine whether LabVIEW will run or not, but make the choices that make the most sense for your system.

    The next step is adding components which are needed to install and run LabVIEW. Obviously, your target will need to resemble a "normal" PC to run LabVIEW normally, including meeting the minimum system requirements for LabVIEW and supporting hardware like a CD-ROM drive (if installing LabVIEW from a CD), a monitor, keyboard, mouse, etc. The Target Analyzer should have recognized this hardware, so those driver requirements should already be met. Beyond this, there are a few additional components that LabVIEW will need.
    • The LabVIEW installer requires the "Windows Installer Service" component, which should be in the list in the left column of the Target Designer. Add this.
    • Most of the DLL files that LabVIEW requires appear to be included automatically with the basic XP Embedded image, except for one. This is included in the "OLD Dialog Interfaces" component. Add this. Or, you may simply add oledlg.dll to the WINDOWS/system32 directory after building the XP Embedded image (you can copy this DLL from the WINDOWS/system32 directory of your normal Windows XP install).
    • If your VIs will utilize Microsoft .NET technology, add the ".NET Framework" component.

    In most cases, these components should be all that must be added in addition to the components chosen by the Target Analyzer. However, consult the list of DLL files upon which LabVIEW depends (text file below). You can compare this list against the image you generate with XP Embedded Studio. You can then manually copy any missing files over from your normal Windows installation, or use the Component Database Manager (Start > Programs > Microsoft Windows Embedded Studio > Component Database Manager) to search for the components that include those files and rebuild the image with them (Under the "Component" tab, click "Filter," click "New," name the filter, select "Component contains the following file: [filelist]," click "Add Rule," double click where instructed, enter the file you're searching for, click OK, click OK, highlight your filter, click "Apply Filter").



    Before building the image, you must fix any unresolved dependencies, so run Dependency Checks and make any decisions that are required until the check completes with no errors. Now build the image (Configuration > Build Target Image).

    Deploying XP Embedded and installing LabVIEW

Once you have generated the image for your XP Embedded installation, you simply need to copy it to the boot partition of your target. Assuming the correct drivers and dependent files were included in the installation, the system should boot and begin running the First Boot Agent. This will configure your installation, then restart the machine. After this, the Windows installation should be complete and ready for LabVIEW to be installed. Do this as you would on any other platform (using a CD, presumably). While the version of Windows you're running may be minimal, LabVIEW should install and run as expected.