This example demonstrates a simple assembly program containing a far call
which can be run on the C54x Code Composer Studio (CCS) simulator. It's
purpose is to demonstrate the steps required to set up CCS and run a program
using extended program memory in the simulator.

The example assumes you have used CCS and have enough knowledge of CCS to run
a simple program, such as the first program of the CCS Tutorial. Please refer
to the CCS Tutorial or CCS User's Guide for information on using CCS.

Before following the steps described below, copy test.asm and test.cmd
from the FTP site to a directory on your machine.



1. Run the Setup CCStudio program and create a C54xx Simulator in your System
Configuration. Under board properties, set the DSP to simulate to a C5410 and
then exit the setup program.

NOTE: The setup tool allows you to define both an emulator and simulator.  If
you have both defined, the Parallel Debug Manager (PDM) is activated when you
start CCS and the Code Composer screen is started from the PDM.  In this case,
when this README file asks you to exit CCS, you should also exit the PDM.

2. run CCS with the simulator

3. choose the Option->Memory Map menu item

4. create program memory from 0 to 0x1FFFF:

	a. make sure the Program tab is in the front

	b. set the Enable Memory Mapping switch

	c. press the reset button

	d. click on the one entry in the Memory Map List

	e. enter 0x00020000 in the Length field

	f. select EXRAM from the pull down list in the Attributes field
	   (note: if you select RAM, you will get an error when loading
            program)

	g. press the Add button

5. create data memory from 0 to 0xFFFF:

	a. move the Data tab to the front

	b. set the Enable Memory Mapping switch

	c. press the reset button

	d. click on the one entry in the Memory Map List

	e. enter 0x00008000 in the Length field
           (start address should be 0x00000000)

	f. select RAM from the pull down list in the Attributes field

	g. press the Add button

        h. click on the 2nd entry in the Memory Map List

	i. enter 0x00008000 in the Length field
           (start address should be 0x00080000)

	j. select EXRAM from the pull down list in the Attributes field

	k. press the Add button

	l. press the Done button

5. exit CCS

6. run CCS with the simulator

7. Create a project and add test.asm and test.cmd to the newly created
project.

8. You now need to set the project options to allow for the configuration you
have defined by choosing the Project->Options menu item.

	a. bring the Assembler tab to the front and set Category 
	   to Processor

	b. set Processor Version to 548
	   NOTE:the assembler uses the 548 version for the 5410

	c. set the Define __far_mode Symbol switch

	d. set Category to Symbols

	e. Set the Keep Labels as Symbols switch

	f. bring the Linker tab to the front

	g. set values in Memory category:
		Output Module: Absolute Executable
		Output Filename: test.out
		Map Filename: test.map
		Code Entry Point: test
                No Autoinitialization

	   this should set the options to:  -e test -m test.map -o test.out

	h. press OK

9. press the Rebuild All button

10. load program by choosing File->Load Program and selecting test.out

11. The program should load and the dis-assembly window should show the
current instruction as being address 0x2000. If you step (F8) thru the
program you will see the far call jump to 0x18000 and the far return
jump to  0x2004. 


For programs with a more complicated memory configuration, you can use
this simple example as a baseline and modify to your configuration.
