/* $Id: mhelp.c,v 1.1 1999/08/18 18:49:00 garym Exp $ Copyright Motorola, Inc. 1993, 1994, 1999 ALL RIGHTS RESERVED You are hereby granted a copyright license to use, modify, and distribute the SOFTWARE so long as this entire notice is retained without alteration in any modified and/or redistributed versions, and that such modified versions are clearly identified as such. No licenses are granted by implication, estoppel or otherwise under any patents or trademarks of Motorola, Inc. The SOFTWARE is provided on an "AS IS" basis and without warranty. To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. To the maximum extent permitted by applicable law, IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility for the maintenance and support of the SOFTWARE. */ #include "dink.h" #include "errors.h" #include "arg_tb.h" #include "rfs_tb.h" #include "toks.h" #include extern int CommGetChar(); extern unsigned long KEYBOARD; extern long dink_type; /*-------------------------------------------------------------------------- ** */ STATUS menu() { PRINT(" Excimer/Maximer DINK COMMAND LIST\n"); PRINT("Command Mnemonic Command Mnemonic \n"); PRINT("======= ======== ======= ======== \n"); PRINT("About... about, ab Download download, dl\n" "Flash display fl [-dsi | -e] Flash ram to rom fw -e\n" "Go go Help help, he\n" "Menu menu, me . (repeat last command)\n" ); PRINT("\n"); PRINT("For additional details about a command, please type \"help \"\n" ); return (SUCCESS); } /************************************************************/ void no_help() { PRINT("No help is available,\n"); } /***************************************************************/ void help_about() { PRINT( "ABOUT\n" "=====\n" "Mnemonic: about, ab\n" "Syntax: ab\n" "Description: This command displays the general information" "on DINK32.\n" "Example: \"ab\" would display the opening screen of DINK32.\n" ); } /***************************************************************/ void help_baud() { PRINT( "SET BAUD RATE\n" "=============\n" "Mnemonic: setbaud, sb\n" "Syntax: sb [-h|k ]\n" " This command sets the baud rate for the host serial port (-h) or the\n" " keyboard serial port (-k) by specifying the appropriate flag followed\n" " by a valid baud rate [2400,4800,9600,19200,38400]. If only a flag is\n" " specified the current baud rate for that serial port is returned.\n" "Example: \"sb -h\" shows the current baud rate for the host serial port.\n" "Example: \"sb -h 9600\" sets the host serial port baud rate to 9600.\n" ); } /********************************************************************/ void help_download() { PRINT( "DOWNLOAD\n" "========\n" "Mnemonic: download, dl\n" "Description: This command will expect to receive data either from\n" " the keyboard serial port or from the host serial port. The\n" " data received can be in two formats: S-Records or compressed\n" " S-Records, which are auto-matically decompressed. The data\n" " which is downloaded will be placed in memory locations specified\n" " by the input file for RAM or as specified for FLASH.\n" " There are two separate forms for RAM and FLASH downloads.\n" " Information on S-Records can be found in the DINK32 User's Guide.\n" "\n" "RAM download Syntax: dl {-k|-h} [-fx] [-v] [-o offset]\n" "Options: The \"-k\" option copies the data stream from the keyboard\n" " serial port into memory, while \"-h\" option copies data\n" " from the host serial port. One of these two options must\n" " be supplied.\n" " The \"-fx\" option enables XON/XOFF (software) flow control\n" " for downloading at higher speeds.\n" " The \"-v\" option verifies a previous download, printing an\n" " error message for each difference found.\n" " The \"-o offset\" option adds a hexadecimal offset to the\n" " address of the S-Record lines to relocate code.\n" "\n" "FLASH download Syntax: dl -fl [-e] -o (offset)\n" "Example: \"dl -fl -o ffc00000\" will copy the data stream from the\n" " keyboard serial port into flash memory.\n" "Example: \"dl -fl -e -o ffc00000\" will erase flash memory then\n" " copy the data stream from the keyboard serial port into\n" " flash memory.\n" ); } /************************************************************************/ void help_go() { PRINT( "GO\n" "==\n" "Mnemonic: go\n" "Syntax: go [
|+]\n" "Description: This command allows the user to execute user code starting at\n" " the specified address. Execution will continue until a breakpoint or\n" " an exception occurs.\n" " If the \"+\" form is used, then execution will start at the address\n" " defined by the contents of bits 0-29 of SRR0.\n" "\n" " The user should terminate their code with an illegal opcode or with a\n" " breakpoint. The value of dink_loop() is initially placed in the User\n" " Programming Model link register. If you terminate your code\n" " with a blr to that location you will re-enter DINK. In the process,\n" " however, you will perform the prolog of the dink_loop function which\n" " will save registers (ex. lr) off onto the currently defined stack (ie.\n" " the value in r1). This may be an unexpected side-effect.\n" "\n" " Note: If a breakpoint is encountered, the user must clear the\n" " breakpoint in order for execution to continue.\n" ); } /********************************************************************/ void help_help() { PRINT( "HELP\n" "===== \n" "Mnemonic: help, he\n" "Syntax: he \n" "Description: This command provides information on the DINK32 commands.\n" "Example: \"he go\" will display the help information on the \"go\" command.\n" ); } /**********************************************************************/ void help_menu() { PRINT( "MENU\n" "====\n" "Mnemonic: menu, me\n" "Syntax: me\n" "Description: This command provides a summarized listing of the commands\n" " implemented in DINK32.\n" "Example: \"me\" will display the DINK32 command summary.\n" ); } /************************************************************/ void help_flash() { PRINT( "FLASH COMMANDS\n" "==============\n" "Mnemonic: flash, fl\n" "Syntax: fl -flags -o value -s sector number\n" "Description: This command performs actions to the flash memory\n" "Flags: -dsi display sector information\n" "Flags: -e erase erase all of flash\n" "Flags: -cp copy copy MDINK from RAM to Flash\n" " Required Flags: -o copy address in flash\n" " Optional Flags: -e erase flash first\n" "Flags: -sp protect indicated sector\n" " Required Flags: -n sector number 0-18\n" "Flags: -su unprotect indicated sector\n" " Required Flags: -n sector number 0-18\n" "Flags: -se erase indicated sector\n" " Required Flags: -n sector number 0-18\n" " Example: fl -sp -n 5 - sector protect sector 5\n" ); } /****************************************************************/ void help_display_sector() { PRINT( "DISPLAY SECTOR PROTECT INFORMATION\n" "==================================\n" "Mnemonic: fl [-dsi | -e], fl [-dsi | -e]\n" "Syntax: fl -dsi\n" "Description: The command prints out the Device and sector info\n" "Syntax: fl -e\n" "Description: The command erases all of unprotected flash memory\n" ); } /****************************************************************/ void help_copy_to_flash() { PRINT( "COPY ALL THE CONTENTS OF RAM TO FLASH ADDRESS 0xFFF00000\n" "========================================================\n" "Mnemonic: fw, flashwrite\n" "Syntax: fw\n" "Description: The command copies the contents of the entire 512K of\n" " RAM to FLASH starting at flash address 0xFFF00000.\n" ); } /****************************************************************/ void help_info() { PRINT( "SYSTEM/HARDWARE INFORMATION\n" "===========================\n" "Mnemonic: in, info\n" "Syntax : in\n" "Description: The command displays features of the hardware such as\n" " memory sizes, locations of the serial ports, memory\n" " layout, etc.\n" ); }