Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

DOSLoader Mode

Introduction

DOSLoader mode allows you to boot a target PC from a device other than removable media or a dedicated network, such as a hard disk or flash memory. You can then download a target application from the host PC to the target PC. After the target PC boots the kernel, it waits for the host computer to download a real-time application. You can control the target application from either the host PC or the target PC. See DOSLoader Mode Overview for further details.

DOSLoader Mode Overview

The following summarizes the sequence of events for DOSLoader mode. For a detailed step-by-step procedure, see DOSLoader Target Setup.

  1. As necessary, format a 3.5-inch disk or have available a blank CD.

  2. Copy a version of DOS onto this disk and insert this DOS disk into the host PC disk drive.

  3. In the host PC MATLAB Command Window, type xpcexplr.

  4. In the xPC Target Explorer xPC Target Hierarchy pane, select a target PC Configuration node.

  5. In the configuration pane, select the DOS Loader tab.

  6. Create the following files:

    • DOS files — Provide your own copy of DOS to boot the target PC. For example, you can acquire DOS from FreeDOS.

      The MathWorks has tested the xPC Target software with FreeDOS Beta 8 ("Nikita") distribution, MS-DOS (6.0 or higher), PC DOS, and Caldera OpenDOS.

    • autoexec.bat — xPC Target version of this file that calls the xpcboot.com executable to boot the xPC Target kernel.

    • *.rtb — This file contains the xPC Target kernel. It also contains, as applicable, specifications such as serial or TCP/IP communications and the IP address of the target PC.

    • xpcboot.com —- Contains the xPC Target boot executable. This file executes an xPC Target application and executes the *.rtb file.

  7. Set up the target PC boot device such as a 3.5-inch floppy disk, flash disk, or a hard disk drive.

  8. As necessary, transfer the files to the target PC.

  9. Boot the target PC.

    When you boot the target PC, the target PC loads DOS, which then calls the xPC Target autoexec.bat file to start the xPC Target kernel (*.rtb). The target PC then awaits commands from the host PC.

  10. To execute a target application, build and download one from the host PC to the target PC. DOSLoader mode does not automatically load a target application to the target PC. The xPC Target application executes entirely in protected mode using the 32-bit flat memory model.

Restrictions

To use either the DOSLoader mode, your DOS environment must comply with the following restrictions:

To satisfy these restrictions,

Updating the xPC Target Environment

You can use the function getxpcenv to see the current selection for TargetBoot, or you can view this through the xPC Target Explorer window. Start the MATLAB interface and execute the function

xpcexplr

In the xPC Target Explorer xPC Target Hierarchy pane, select a target PC Configuration node. You see the boot mode tabs. The choices are

In the Configuration node, select DOS Loader. The xPC Target environment is updated when you change the value. Create DOSLoader files by clicking the Create DOS Loader button.

For more detailed information about how to use the xPC Target Explorer window, see xPC Target Explorer in the xPC Target Getting Started Guide.

Creating a DOS System Disk

DOSLoader mode allows for booting the target PC from devices other than disk drives or networks, such as flash disks and hard drives. To use this mode, you need a minimal DOS system on the boot device. Use the following DOS command, where drive is the drive that you want to use as the boot device, such as C:.

sys drive

It is helpful to copy additional DOS utilities to the boot disk, including

Once configured for booting, you can transfer the DOSLoader files (created using xpcexplr) to the device. A config.sys file is not necessary. The autoexec.bat file should be used to boot the xPC Target loader. This is described in the following sections.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS