Download Print this page

Motorola Minimal PowerPC 603e User Manual page 6

Advertisement

{
*(char *) (0x40200000) = 0x04; /* turn status led on */
}
Save the Þle as ledon.c as a text Þle. (Many text editors save in their own format with extra formatting
characters that will cause the compile to fail.) Also, text editors like WordPad in Windows will append a .txt
to the Þlename which must be removed before passing to the compiler.
Assuming you have installed a Metaware compiler on your PC type the following in a DOS window.
hcppc -Hppc603 -c ledon.c
To load the program and get a downloadable s-record Þle type the following in the DOS window.
ldppc -B start_addr=0x70000 -xm ledon.o
A Þle named Ôa.hexÕ Þle will be generated and this Þle will be the one to download to Excimer.
In the Excimer terminal window, at the DINK32 prompt type the following:
dl -k <return>
This is the DINK download command that takes the s-record Þle and loads it into RAM on the EXCIMER
board. Downloading to DINK is equivalent to typing entries into the keyboard. In fact, text Þles of
keystrokes or DINK commands can be downloaded as easily as s-records. The terminal emulation program
will provide an autotype function that permits the user to select the a.hex s-record Þle previously generated
and download it through the serial into Excimer.
The DINK32 prompt returns when the download is complete.
Now we can type the ÔgoÕ command to run the program to turn the led on.
go 70000
The Status LED on Excimer is controlled by the OUT 2 signal of the Serial 1 UART (National
Semiconductor PC1655D Dual Universal Asynchronous Reciever/Transmitter). It will turn on when this
program writes a one to bit 3 (bit 0 is the LSB) of the MODEM Control Register at address 0x40200000 of
Excimer. It will remain on until disabled by another program you write, compile, link and download or until
the Excimer board is reset.
If the LED does not go out, the debug capabilities of Excimer and the Wiggler can be used to debug your
program.
Part 2 Debugging
Debug on Excimer is supported with the following capabilities in DINK:
¥
Assembly and disassembly of PowerPC instructions
¥
Display and modiÞcation of registers
¥
Display, modiÞcation and movement of system memory
¥
Singlestep and continued execution from a speciÞc address
¥
Display, setting, removal of instruction breakpoints
DINK is an example of a ROM-resident debugger. It resides in ROM and is copied down to RAM for
execution. ROM resident debuggers are often criticized because:
6
Minimal PowerPC 603e Evaluation Board
MOTOROLA

Advertisement

loading