Esempio n. 1
0
/*  *********************************************************************
    *  ui_init_toyclockcmds()
    *
    *  Add toy clock commands to the command table
    *
    *  Input parameters:
    *  	   nothing
    *
    *  Return value:
    *  	   0
    ********************************************************************* */
int ui_init_toyclockcmds(void)
{

    cmd_addcmd("show time",
               ui_cmd_showtime,
               NULL,
               "Display current time according to RTC",
               "show time",
               "");

    cmd_addcmd("set time",
               ui_cmd_settime,
               NULL,
               "Set current time",
               "set time hh:mm:ss",
               "");

    cmd_addcmd("set date",
               ui_cmd_setdate,
               NULL,
               "Set current date",
               "set date mm/dd/yyyy",
               "");

    return 0;
}
Esempio n. 2
0
int ui_init_flashtestcmds(void)
{
    cmd_addcmd("show flash",
	       ui_cmd_flashtest,
	       NULL,
	       "Display information about a flash device.",
	       "show flash [-sectors]",
	       "-sectors;Display sector information");

#if 0
    cmd_addcmd("nvram read",
	       ui_cmd_readnvram,
	       NULL,
	       "read the NVRAM",
	       "test nvram devname offset",
	       "");

    cmd_addcmd("nvram erase",
	       ui_cmd_erasenvram,
	       NULL,
	       "erase the NVRAM",
	       "erasenvram devname",
	       "-pattern");
#endif


    return 0;
}
Esempio n. 3
0
int ui_init_carmelcmds(void)
{
     cmd_addcmd("monterey reset",
	       ui_cmd_mreset,
	       NULL,
	       "Reset the Monterey Subsystem",
	       "monterey reset [0|1]\n\n"
		"This command resets the board that the Carmel is attached to.  For\n"
		"example, if Carmel is attached to a Monterey board, the Monterey\n"
		"FPGA is reset.  You can specify an absolute value for the reset pin\n"
		"or type 'monterey reset' without a parameter to pulse the reset line.",
		"");

    cmd_addcmd("monterey setenv",
	       ui_cmd_msetenv,
	       NULL,
	       "Set a Monterey environment variable.",
	       "monterey setenv [-p] varname value\n\n"
	       "This command sets an environment variable.  By default, an environment variable\n"
	       "is stored only in memory and will not be retained across system restart.",
	       "-p;Store environment variable permanently in the NVRAM device, if present");

    cmd_addcmd("monterey printenv",
	       ui_cmd_mprintenv,
	       NULL,
	       "Display the Monterey environment variables",
	       "monterey printenv\n\n"
	       "This command prints a table of the Monterey environment variables and their\n"
	       "current values.",
	       "");

    cmd_addcmd("monterey unsetenv",
	       ui_cmd_munsetenv,
	       NULL,
	       "Delete a Monterey environment variable.",
	       "monterey unsetenv varname\n\n"
	       "This command deletes a Monterey environment variable from memory and also \n"
	       "removes it from the NVRAM device (if present).",
	       "");

    cmd_addcmd("monterey setup",
	       ui_cmd_msetup,
	       NULL,
	       "Interactive setup for Monterey variables.",
	       "monterey setup\n\n"
	       "This command prompts for the important Monterey environment variables and\n"
	       "stores them in the ID EEPROM\n",
	       "");

    return 0;

}
Esempio n. 4
0
int ui_init_vapicmds(void)
{
    cmd_addcmd("vapi run",
	       ui_cmd_vapirun,
	       NULL,
	       "Run a program using the VAPI reset vector.",
	       "vapi run\n"
	       "Executes a previously loaded VAPI program by resetting the\n"
	       "CPUs and jumping directly to user code.  The program\n"
	       "must be located at absolute address 0x8002_0000\n",
	       "-uncached;Start execution at 0xA002_0000 (KSEG1)|"
	       "-mc;Start execution at 0xBFD0_0000");

    cmd_addcmd("vapi test",
	       ui_cmd_vapitest,
	       NULL,
	       "Test VAPI interface.",
	       "vapi test\n\n"
	       "Do some basic calls to the VAPI interface, then return to CFE\n\n",
	       "");

    cmd_addcmd("vapi dump",
	       ui_cmd_vapidump,
	       NULL,
	       "Show VAPI log in an easily processed format.",
	       "vapi dump\n\n"
	       "Display the VAPI log in a format that is more easily postprocessed\n"
	       "by external programs.\n\n",
	       "");

    cmd_addcmd("vapi show",
	       ui_cmd_vapishow,
	       NULL,
	       "Show VAPI log.\n",
	       "vapi show\n\n"
	       "Display the VAPI log in a human readable form (sort of)\n\n",
	       "");

    cmd_addcmd("vapi status",
	       ui_cmd_vapistatus,
	       NULL,
	       "Print last VAPI exit status.\n",
	       "vapi status\n\n"
	       "Display the exit status of the last VAPI program that was run\n",
	       "");

    return 0;
}
Esempio n. 5
0
int ui_init_swarmcmds(void)
{
    cmd_addcmd("show temp",
	       ui_cmd_showtemp,
	       NULL,
	       "Display CPU temperature",
	       "show temp",
	       "-continuous;Poll for temperature changes|"
	       "-stop;Stop polling for temperature changes");

    cmd_addcmd("reset",
	       ui_cmd_reset,
	       NULL,
	       "Reset the system.",
	       "reset [-yes] -softreset|-cpu|-unicpu1|-unicpu0|-sysreset",
	       "-yes;Don't ask for confirmation|"
	       "-softreset;Soft reset of the entire chip|"
	       "-cpu;Reset the CPUs|"
	       "-unicpu1;Reset to uniprocessor using CPU1|"
	       "-unicpu0;Reset to uniprocessor using CPU0|"
	       "-sysreset;Full system reset");

#ifdef _FLASHPROG_
    cmd_addcmd("flashop",
	       ui_cmd_flashop,
	       NULL,
	       "Perform flash operations on a single flash device",
	       "flashop [options] [flashdevice]\n\n"
	       "Erases, protects, or unprotects sectors on a flash memory device.\n"
               "",
               "-erase;Erase an address range of flash, no load|"
               "-protect;Protect an address range of flash, no load|"
               "-unprotect;Unprotect an address range of flash, no load|"
               "-startaddr=*;Start address of erase or protect|"
               "-endaddr=*;End address of erase or protect|"
               "-all;Perform operation on entire flash"
               );
#endif

    cfe_bg_add(temp_timer_proc,NULL);

    return 0;
}
Esempio n. 6
0
int ui_init_cpu1cmds(void)
{
    cmd_addcmd("cpu1",
	       ui_cmd_cpu1,
	       NULL,
	       "Controls a test program running on CPU1",
	       "cpu1 start|stop",
	       "");

    return 0;
}
Esempio n. 7
0
int ui_init_flashtestcmds(void)
{
    cmd_addcmd("show flash",
	       ui_cmd_flashtest,
	       NULL,
	       "Display information about a flash device.",
	       "show flash [-sectors]",
	       "-sectors;Display sector information");



    return 0;
}
Esempio n. 8
0
int ui_init_testcmds(void)
{

    cmd_addcmd("test timer",
	       ui_cmd_timertest,
	       NULL,
	       "Test the timer",
	       "test timer",
	       "");
#if CFG_DOWNLOAD
    cmd_addcmd("test bcm1250",
	       ui_cmd_config1250,
	       NULL,
	       "Configure a bcm1250 as a PCI device",
	       "test bcm1250 device-name [file-name]\n\n"
	       "Download code to the specified 1250-based PCI device",
	       ""
	);
#endif

    return 0;
}
Esempio n. 9
0
void cmd_init(void)
{
    cmd_root = NULL;

    cmd_addcmd("help",
	       cmd_help,
	       NULL,
	       "Obtain help for CFE commands",
	       "help [command]\n\n"
	       "Without any parameters, the 'help' command will display a summary\n"
	       "of available commands.  For more details on a command, type 'help'\n"
	       "and the command name.",
	       "");
}
Esempio n. 10
0
int ui_init_cpu1cmds(void)
{
    cmd_addcmd("cpu1",
	       ui_cmd_cpu1,
	       NULL,
	       "Controls a test program running on CPU1",
	       "cpu1 start|stop",
	       "-addr=*;Specifies a start address for CPU1|"
	       "-a1=*;Specifies an initial value for the A1 register|"
	       "-gp=*;Specifies an initial value for the GP register|"
	       "-sp=*;Specifies an initial value for the SP register");

    return 0;
}
Esempio n. 11
0
int ui_init_bcm1250cpcicmds(void)
{
    
    cmd_addcmd("setvxwenv",
           ui_bcm1250cpci_setvxwenv,
           NULL,
           "Set up VxWorks environment variables",
           "setvxwenv \n\n"
           "This command enables passing of CFE environment variables to"
           "VxWorks and its processes.",
           "");


    return 0;
}
Esempio n. 12
0
int ui_init_tempsensorcmds(void)
{

#if (defined(TEMPSENSOR_SMBUS_DEV) && defined(TEMPSENSOR_SMBUS_CHAN))
    cmd_addcmd("show temp",
	       ui_cmd_showtemp,
	       NULL,
	       "Display CPU temperature",
	       "show temp",
	       "-continuous;Poll for temperature changes|"
	       "-stop;Stop polling for temperature changes");

    cfe_bg_add(temp_timer_proc,NULL);
#endif

    return 0;
}
Esempio n. 13
0
int ui_init_loadcmds(void)
{	

#if CFG_NETWORK
    cmd_addcmd("save",
	       ui_cmd_save,
	       NULL,
	       "Save a region of memory to a remote file via TFTP",
	       "save [-options] host:filename startaddr length\n\n",
	       "");
#endif

    cmd_addcmd("load",
	       ui_cmd_load,
	       NULL,
	       "Load an executable file into memory without executing it",
	       "load [-options] host:filename|dev:filename\n\n"
	       "This command loads an executable file into memory, but does not\n"
	       "execute it.  It can be used for loading data files, overlays or\n"
	       "other programs needed before the 'boot' command is used.  By\n"
	       "default, 'load' will load a raw binary at virtual address 0x20000000.",
	       "-elf;Load the file as an ELF executable|"
	       "-srec;Load the file as ASCII S-records|"
	       "-raw;Load the file as a raw binary|"
#if CFG_ZLIB || CFG_LZMA
	       "-z;Load compessed file|"
#endif
	       "-loader=*;Specify CFE loader name|"
	       "-tftp;Load the file using the TFTP protocol|"
	       "-fatfs;Load the file from a FAT file system|"
	       "-rawfs;Load the file from an unformatted file system|"
#if CFG_TCP && CFG_HTTPFS
	       "-http;Load the file using the HTTP protocol|"
#endif
               "-fs=*;Specify CFE file system name|"
	       "-max=*;Specify the maximum number of bytes to load (raw only)|"
	       "-addr=*;Specify the load address (hex) (raw only)");

    cmd_addcmd("boot",
	       ui_cmd_boot,
	       NULL,
	       "Load an executable file into memory and execute it",
	       "boot [-options] host:filename|dev:filename\n\n"
	       "This command loads and executes a program from a boot device\n"
	       "By default, 'boot' will load a raw binary at virtual \n"
	       "address 0x20000000 and then jump to that address",
	       "-elf;Load the file as an ELF executable|"
	       "-srec;Load the file as ASCII S-records|"
	       "-raw;Load the file as a raw binary|"
#if CFG_ZLIB || CFG_LZMA
	       "-z;Load compessed file|"
#endif
	       "-loader=*;Specify CFE loader name|"
	       "-tftp;Load the file using the TFTP protocol|"
	       "-fatfs;Load the file from a FAT file system|"
	       "-rawfs;Load the file from an unformatted file system|"
#if CFG_TCP && CFG_HTTPFS
	       "-http;Load the file using the HTTP protocol|"
#endif
               "-fs=*;Specify CFE file system name|"
	       "-max=*;Specify the maximum number of bytes to load (raw only)|"
	       "-addr=*;Specify the load address (hex) (raw only)|"
	       "-noclose;Don't close network link before executing program");

    cmd_addcmd("go",
	       ui_cmd_go,
	       NULL,
	       "Start a previously loaded program.",
	       "go [address]\n\n"
	       "The 'go' command will start a program previously loaded with \n"
	       "the 'load' command.  You can override the start address by"
	       "specifying it as a parameter to the 'go' command.",
	       "-noclose;Don't close network link before executing program");

    cmd_addcmd("batch",
	       ui_cmd_batch,
	       NULL,
	       "Load a batch file into memory and execute it",
	       "batch [-options] host:filename|dev:filename\n\n"
	       "This command loads and executes a batch file from a boot device",
#if CFG_ZLIB || CFG_LZMA
	       "-z;Load compessed file|"
#endif
	       "-tftp;Load the file using the TFTP protocol|"
	       "-fatfs;Load the file from a FAT file system|"
	       "-rawfs;Load the file from an unformatted file system|"
               "-fs=*;Specify CFE file system name");


#if CFG_AUTOBOOT
    cmd_addcmd("autoboot",
	       ui_cmd_autoboot,
	       NULL,
	       "Automatic system bootstrap.",
	       "autoboot [dev]\n\n"
	       "The 'autoboot' command causes an automatic system bootstrap from\n"
	       "a predefined list of devices and boot files.  This list is \n"
	       "specific to the board and port of CFE.  To try autobooting from\n"
	       "a specific device, you can specify the CFE device name on the command line.",
	       "-forever;Loop over devices until boot is successful|"
	       "-interruptible;Scan console between devices, drop to prompt if key pressed");
#endif	/* CFG_AUTOBOOT */

    return 0;
}
Esempio n. 14
0
int ui_init_examcmds(void)
{
    cmd_addcmd("u",
	       ui_cmd_disasm,
	       NULL,
	       "Disassemble instructions.",
	       "u [addr [length]]\n\n"
	       "This command disassembles instructions at the specified address.\n"
	       "CFE will display standard register names and symbolic names for\n"
	       "certain CP0 registers.  The 'u' command remembers the last address\n"
	       "that was disassembled so you can enter 'u' again with no parameters\n"
	       "to continue a previous request.\n",
               "-p;Address is an uncached physical address|"
	       "-v;Address is a kernel virtual address");


    cmd_addcmd("d",
	       ui_cmd_memdump,
	       NULL,
	       "Dump memory.",
	       "d [-b|-h|-w|-q] [addr [length]]\n\n"
	       "This command displays data from memory as bytes, halfwords, words,\n"
	       "or quadwords.  ASCII text, if present, will appear to the right of\n"
	       "the hex data.  The dump command remembers the previous word size,\n"
	       "dump length and last displayed address, so you can enter 'd' again\n"
	       "to continue a previous dump request.",
	       "-b;Dump memory as bytes|"
	       "-h;Dump memory as halfwords (16-bits)|"
               "-w;Dump memory as words (32-bits)|"
               "-q;Dump memory as quadwords (64-bits)|"
               "-p;Address is an uncached physical address|"
	       "-v;Address is a kernel virtual address");


    cmd_addcmd("e",
	       ui_cmd_memedit,
	       NULL,
	       "Modify contents of memory.",
	       "e [-b|-h|-w|-q] [addr [data...]]\n\n"
	       "This command modifies the contents of memory.  If you do not specify\n"
	       "data on the command line, CFE will prompt for it.  When prompting for\n"
	       "data you may enter '-' to back up, '=' to dump memory at the current\n"
	       "location, or '.' to exit edit mode.",
	       "-b;Edit memory as bytes|"
	       "-h;Edit memory as halfwords (16-bits)|"
               "-w;Edit memory as words (32-bits)|"
               "-q;Edit memory as quadwords (64-bits)|"
	       "-p;Address is an uncached physical address|"
	       "-v;Address is a kernel virtual address");

    cmd_addcmd("f",
	       ui_cmd_memfill,
	       NULL,
	       "Fill contents of memory.",
	       "f [-b|-h|-w|-q] addr length pattern\n\n"
	       "This command modifies the contents of memory.  You can specify the\n"
	       "starting address, length, and pattern of data to fill (in hex)\n",
	       "-b;Edit memory as bytes|"
	       "-h;Edit memory as halfwords (16-bits)|"
               "-w;Edit memory as words (32-bits)|"
               "-q;Edit memory as quadwords (64-bits)|"
	       "-p;Address is an uncached physical address|"
	       "-v;Address is a kernel virtual address");

    cmd_addcmd("memtest",
	       ui_cmd_memtest,
	       NULL,
	       "Test memory.",
	       "memtest [options] addr length\n\n"
	       "This command tests memory.  It is a very crude test, so don't\n"
	       "rely on it for anything really important.  Addr and length are in hex\n",
	       "-p;Address is an uncached physical address|"
	       "-v;Address is a kernel virtual address|"
	       "-loop;Loop till keypress");


    prev_addr = KERNADDR(0);

    return 0;
}