CPE/EE 421 Microcomputers

LAB MANUAL



Testing the environment

Test programs:

Testing procedure:



Using X68K cross-assembler

This cross-assembler takes as its input an ASCII text file and produces a binary file. The source file MUST have the extension '.X68' in order for the cross-assembler to recognize it. The binary file generated by the cross-assembler has the same name as the source file but with the extension ".BIN".

The cross-assembler is run by entering command

X68K <filename>

at the MS-DOS Command Prompt.

For example, to cross-assemble TEST.X68, you enter

X68K TEST

(Remember: you must omit the .X68 extension!)

If we wish to produce a listing file as well as a binary file, we append the suffix -L

X68K <filename> -L

This command produces two files: .BIN and .LIS

After you've done with cross-assembler and if you don't have any errors, you have to create an S-record file, using command:

S68K <filename>

This command will produce the file with the extension .REC; this file is going to be the input file for your 68000 Educational Trainer.

Now you can start program called 'Serial Connection to 68000 Education Trainer.' (We are assuming that you have already plugged in your power source and checked that the board serial cable is connected to the PC.)

When you see the prompt 'TUTOR 1.3 >' you can start entering commands.

LO1

When you see the prompt 'TUTOR 1.3 >' download is complete and you can start your program by entering the command

GO <address>

where the <address> is the hex number denoting the starting address of your program.

Additional commands

Before and after starting your program, you can use some additional commands to display or change the content of your memory, registers, etc. Also, you can trace through your program or you can set breakpoints. You will need following commands:
 

MD <address>

displays memory contents of 16 consecutive bytes in a hex format starting from the <address>

DF

shows all registers and the next instruction

.D0

displays register D0

.PC

displays program counter

.<register> <value>

to modify the register

MS <address> <value>

to set the memory at the <address> to <value>

TR

trace command; permits the execution of a single instruction at a time

BR <address>

to place the break point at the location specified by <address>; to resume execution after a break point, you have to enter TR to step past, followed by GO to run the program.



Embedded Development Environment - C Programming

o        Select EDE->Linker/Formatter Options

o        Select first tab: Format

o        Select HEX file for downloading and PROM (.REC)

o        Select fourth tab: Locator

o        Check Read locator commands from user file (instead of <project>.lc)

o        Click OK


Using CrossView Pro68K debugger

For C debugging set:


GO BACK to CPE/EE 421 Course Page