AMX 86 and Paradigm C++


 Contents

 Introduction
 Step 1: Start the PDREMOTE/ROM Target Monitor
 Step 2: Prepare AMX 86 Files
 Step 3: Create the Paradigm C++ Project
 Step 4: Set the Project Options
 Step 5: Set the Environment Options
 Step 6: Modify the Locate Configuration
 Step 7: Add the Files to the Project
 Step 8: Build and Run the AMX 86 Sample Program


 Introduction

The Paradigm C++ software development tools are often used by developers to produce embedded, ROMable 16-bit applications for 80x86 target hardware or 24-bit applications for use with the VAutomation Turbo86 processor family.

The Sample Program provided with AMX 86 can be generated using Microsoft, Borland or WATCOM C/C++ tools to create an MS-DOS program suitable for execution under MS-DOS on PC compatible hardware. However, these tools are not suitable for creating embedded, ROMable applications.

This document will bridge the gap and show how to produce a ROMable version of the AMX 86 Sample Program using the Paradigm C++ tools in place of MS-DOS based tools.

It is assumed that Paradigm C++ has been installed. It is further assumed that AMX 86 has been installed into directory C:\AMX831.



 Step 1: Start the PDREMOTE/ROM Target Monitor

For purposes of illustration, a conventional 80x86 PC operating in real mode will be used as the embedded PC. The PC is assumed to include a standard, PC compatible VGA video card.

In order to treat a standard PC as an embedded Paradigm PDREMOTE/ROM target, you must first boot the target PC from a custom Paradigm boot disk, thereby starting the Paradigm PDREMOTE/ROM Target Monitor. You can create the boot floppy disk by running the Paradigm boot disk creation utility as follows:

BOOTDISK.EXE com1 a:

Connect COM1 of the host PC on which the Paradigm tools are being used to COM1 of the target PC. Then reboot the target PC using the boot disk created by the Paradigm utility. Your 80x86 embedded target is then ready for test.

If your target is a 24-bit VAutomation Turbo186 processor on the VAutomation IntelliCore Protyping System (TIPS3) board, you do not have to use the Paradigm Target Monitor. You can use the VSA-186 VAutomation System Analyzer from FS2 (First Silicon Solutions, Inc.) to connect the host PC parallel port to the JTAG connector on the VAutomation TIPS3 board. Follow the directions provided by FS2, VAutomation and Paradigm.


 Step 2: Prepare AMX 86 Files

Since a conventional PC is being used as the target, the Paradigm 16-bit tools must be used. Hence, AMX 86 installation directory AMX831\TOOLPD will be used as the home directory for this sample Paradigm C++ IDE project.

If your target is a 24-bit VAutomation Turbo86 or Turbo186 processor (or equivalent), use the AMX 86 extended Paradigm directory AMX831\TOOLPX as the home directory. In the examples which follow, simply replace all occurrences of TOOLPD with TOOLPX.

The AMX 86 System Configuration Module must be created outside the Paradigm C++ IDE environment. The AMX 86 Configuration Manager utility AM831CM.EXE is used to create and/or edit the AMX 86 Sample Program User Parameter File AM831SCF.UP as described in the AMX 86 Reference Manual.

From the Windows Start menu, select the MS-DOS Command Prompt. Then make directory AMX831\TOOLPD the current directory. To start the AMX 86 Configuration Manager, issue the following command from the MS-DOS command prompt:

..\CFGBLDW\AM831CM AM831SCF.UP

Once the Configuration Manager has been started, generate the System Configuration Module AM831SCF.ASM by selecting the Generate option from the Quit menu. If you generated the System Configuration Module in some other directory, move or copy the resulting file AM831SCF.ASM to the AMX 86 Paradigm toolset directory AMX831\TOOLPD.



 Step 3: Create the Paradigm C++ Project

From the Paradigm C++ IDE File menu, create a new project. In the New Target dialog that appears, enter the properties as shown.

The project name amxsam was chosen arbitrarily. As noted in Step 2, the project has been created in the AMX831\TOOLPD directory for convenience. The AMX 86 object modules and libraries in directory TOOLPD\LIB can be readily imported by the Paradigm tools.

Note that you must select the Large Target Model. AMX 86 does not support small or compact memory models.

From the Advanced options, select the No Source Node option since existing files will be imported. When creating a new application, you may wish to create an initial node.

If your target is a 24-bit VAutomation Turbo86 or Turbo186 processor (or equivalent), you must alter the Platform: setting to select Extended address mode. If you are using the FS2 JTAG interface, be sure to set the Target Connection: to VSA-186.



 Step 4: Set the Project Options

There are several project options which must be selected to properly build an AMX 86 application. From the main menu, select Options ==> Project... to invoke the Project Options dialog.

Add the path to the directory containing the AMX 86 header files to the Include: list of search directories. Append the text ;..\DEF to the existing search path. The path is relative to the project directory AMX831\TOOLPD. The semicolon is used as a separator when multiple paths are specified.

Next, define the compiler symbol AMCCIF=2 for use by AMX 86 header files to identify Paradigm as the toolset being used.

You must select the Large Memory Model.
AMX 86 does not support small or compact memory models.



 Step 5: Set the Environment Options

From the main menu, select Options ==> Environment.... to invoke the Environment Options dialog.

Make sure that Start application execution at application entry point is enabled. If the option is disabled, the program will attempt to start at address 0FFFF:0 and will not operate properly when used with the PDREMOTE/ROM Target Monitor on PC hardware.



 Step 6: Modify the Locate Configuration

The AMX 86 Sample Program Link Specification File AM831SAM.LKS is not used when linking with the Paradigm tools. Instead, the Paradigm Locate Configuration File AMXSAM.CFG is used. This file will be automatically generated in the project directory AMX831\TOOLPD.

Two extra lines must be added to any Paradigm Locate Configuration File AMXSAM.CFG used with AMX 86. The two lines must be inserted in the order shown below. These lines add the AMX data class AMXD and the AMX stack class AMXS to the list of RAM classes. Since classes AMXD and AMXS must be treated as FAR data, they should located just prior to all other FAR data classes.



 Step 7: Add the Files to the Project

Next, add to the project all of the files which are required to build the application. Files are added by right clicking on the AMXSAM.ROM node in the Project window and selecting Add node. For the AMX 86 Sample Program, the list the list of files is as shown below. All file paths are relative to the project directory, AMX831\TOOLPD.

The AMX 86 Sample Program requires character level console services for display output and keyboard input. The AMX 86 console driver CH_PCCON.C provides these services for conventional PC hardware. An alternate AMX 86 serial I/O driver CH8250S.C can be used to access a terminal connected to one of the COM ports of the PC. However, in this case, two COM ports would be required: one for the terminal and one for the Paradigm remote debugger.

This example takes advantage of the fact that the target hardware is a conventional PC with a VGA video card and standard PC BIOS support for the keyboard. The AMX 86 PC console driver CH_PCCON.C can therefore be used for console operations.

The AMX 86 Sample Program also requires a clock for timing purposes. The AMX 86 clock driver CH8253T.C is used in this example.

Note that the source files for the clock driver CH8253T.C and the PC console driver CH_PCCON.C are located in AMX 86 installation directory AMX831\SAMPLE.



 Step 8: Build and Run the AMX 86 Sample Program

From the main menu, select Project ==> Make all or click on the toolbar button. Either action will force the application to build, producing an executable load module with the name AMXSAM.AXE.

Upon completion of the build, the following dialog will appear, indicating that the build was successful.

From the main menu, select Debug ==> Run or click on the toolbar button. Either action will force the debugger to download module AMXSAM.AXE to the target hardware and begin execution.

Once the AMX 86 Sample Program is running, the video display on the target PC will show the timer tick messages generated by the AMX 86 application.


Top of page



Copyright © 2000-2002
KADAK Products Ltd.
All rights reserved.
 
Last updated: November 1, 2002