/* * Excimer board demo program running on DINK32 software. There * are 3 files associated with this demo programs: demo.c, demo.h, * and makedemo. makedemo is the make file, it defines the entry * entry point of the program. Currently the entry point is 0x70000. * To build the S-record file demo.src, type "make -f makedemo". * Whence this is done, download the demo.src file to the board using * the "dl -k" command, then execute the demo program with the * "go 70000" command. * * Modification history: * 21Oct98,My Created. */ /*------- Include */ #include "demo.h" /*------- Prototypes */ void demo(); void OpenLines(); void DelayLoop(); void DinkFeatures(); void ShowFeatures(); void PackageInfo(); /*------- Functions */ int main() { demo(); return 0; } void demo() { set_up_transfer_base();/* set up the dink function addresses for printf etc */ while (1) { OpenLines(); DelayLoop(); PackageInfo(); DelayLoop(); DinkFeatures(); DelayLoop(); ShowFeatures(); } } /********************************************************************** * OpenLines - Introducing Excimer, its hardware components and * software * Input - None * Output - None */ void OpenLines() { print("\n\n"); print(" P R E S E N T I N G\n"); print("\n\n"); print(" PowerPC\n"); print("\n\n"); print(" E X C I M E R R E F E R E N C E P L A T F O R M\n"); print("\n\n"); print(" A M I N I M A L PowerPC S Y S T E M\n"); print("\n\n\n"); DelayLoop(); print(" HARDWARE COMPONENTS:\n\n"); print(" * PowerPC Processor * ROM - Flash\n"); print(" * SDRAM * 2 Serial I/O channels\n"); print(" * Memory Controller * Power, Clocks, Reset\n"); print("\n\n"); print(" SOFTWARE:\n\n"); print(" * DINK32\n\n\n\n"); return; } /********************************************************************** * DelayLoop - runs the delay loop to give viewers time to view the * text display on the screen. It also gives the viewer a chance to * get out of the demo program by hitting a key on the keyboard. If a * key is pressed, it goes back to dink_loop; otherwise, it goes on. * Input - None * Output - None */ void DelayLoop() { int i; for (i=0; i < 200000; i++) /* delay loop */ if ( is_char_in_duart() ) /* Did the view hit any key? */ DinkLoop(); /* go back to dink if he did */ return; } /********************************************************************** * DinkFeatures - lists features of DINK * Input - None * Output - None */ void DinkFeatures() { print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); print(" D I N K 3 2\n"); print("\n\n"); print(" A PowerPC D E B U G R O M P R O G R A M\n"); print("\n\n\n\n"); print(" FEATURES:\n\n"); print(" * Flash programming with sector protection\n"); print(" * Built-in hardware self test\n"); print(" * Level 1 Icache and Dcache Enabled\n"); print(" * On-line help screen\n"); print(" * Auto-detect system processor\n"); print(" * Downloading application programs through serial port\n"); print(" * Memory display and modify\n"); print(" * Registers display and modify\n"); print(" * And more ..... \n\n\n\n"); return; } /********************************************************************** * ShowFeatures - shows various DINK commands * Input - None * Output - None */ void ShowFeatures() { print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); print(" O N L I N E H E L P S C R E E N\n\n\n"); print(" Type 'help' at the prompt\n\n"); print("DINK32_603e>>help\n\n"); HelpMenu(); print("DINK32_603e>>\n\n"); DelayLoop(); print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); print(" S Y S T E M I N F O R M A T I O N\n\n\n"); print(" Type 'ab' at the prompt\n\n"); print("DINK32_603e>>ab\n"); ParAbout(); print("DINK32_603e>>\n\n"); DelayLoop(); print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); print(" D I S A S S E M B L E I N S T R U C T I O N S\n\n\n") ; print(" Type 'ds loc' or 'ds loc1-loc2' at the prompt\n\n"); print(" Example: Disassemble instructions from 0x4000 to 0x4030\n\n\n"); print("DINK32_603e>>ds 4000-4030\n"); Disassemble(0x4000, 0x4030); print("DINK32_603e>>\n\n"); DelayLoop(); print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); return; } /********************************************************************** * PackageInfo - prints price and content of the package * Input - None * Output - None */ void PackageInfo() { print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); print(" $\n"); print(" F O R $$$$ $$ $$$ $$$$$ \n"); print(" $ $ $ $ $ $ $ \n"); print(" $$$ $ $ $$$$ $$$$ \n"); print(" $ $ $$$$$ $ $ \n"); print(" $$$$ $ $$$ $$$$ Y O U G E T:\n"); print(" $\n\n\n"); print(" HARDWARE\n\n"); print(" * 300 MHz MPC603e Minimal System Design\n"); print(" * Serial Port Cable\n"); print(" * Macraigor Systems wiggler with Parallel Port Cable\n"); print(" for JTAG/COP interface\n\n\n"); DelayLoop(); print(" SOFTWARE\n\n"); print(" * DINK32 and MDINK32 Assembly Level Debugger\n"); print(" * Demo version of SDS Source Level Debugger\n"); print(" * Demo version of MetaWare High C/C++ Compiler package\n\n\n"); DelayLoop(); print(" DOCUMENTATION\n\n"); print(" * Schematics of Excimer design\n"); print(" * DINK32 User's Manual\n"); print(" * PowerPC documentation CD\n"); print("\n\n"); return; }