OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orpmon/] [cmds/] [global.c] - Diff between revs 816 and 818

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 816 Rev 818
Line 51... Line 51...
    global.erase_method = a;
    global.erase_method = a;
    return 0;
    return 0;
  } else return -1;
  } else return -1;
}
}
 
 
 
int start_addr_cmd (int argc, char *argv[])
 
{
 
  if (argc == 1) {
 
    global.start_addr = strtoul (argv[0], 0, 0);
 
    return 0;
 
  } else return -1;
 
}
 
 
#if HELP_ENABLED
#if HELP_ENABLED
int globals_cmd (int argc, char *argv[])
int globals_cmd (int argc, char *argv[])
{
{
  const char *erase_method_desc[] = {"do not erase", "fully", "as needed"};
  const char *erase_method_desc[] = {"do not erase", "fully", "as needed"};
  if (argc) return -1;
  if (argc) return -1;
  printf ("src_addr = %08lx\n", global.src_addr);
  printf ("src_addr = %08lx\n", global.src_addr);
  printf ("dst_addr = %08lx\n", global.dst_addr);
  printf ("dst_addr = %08lx\n", global.dst_addr);
 
  printf ("start_addr = %08lx\n", global.start_addr);
  printf ("length = %08lx\n", global.length);
  printf ("length = %08lx\n", global.length);
  printf ("ip = %08lx\n", global.ip);
  printf ("ip = %08lx\n", global.ip);
  printf ("srv_ip = %08lx\n", global.srv_ip);
  printf ("srv_ip = %08lx\n", global.srv_ip);
  printf ("erase_method = %i (%s)\n", (int)global.erase_method, erase_method_desc[global.erase_method]);
  printf ("erase_method = %i (%s)\n", (int)global.erase_method, erase_method_desc[global.erase_method]);
  return 0;
  return 0;
Line 70... Line 79...
 
 
void module_global_init (void)
void module_global_init (void)
{
{
  register_command ("src_addr", "<value>", "sets global parameter source address", src_addr_cmd);
  register_command ("src_addr", "<value>", "sets global parameter source address", src_addr_cmd);
  register_command ("dst_addr", "<value>", "sets global parameter destination address", dst_addr_cmd);
  register_command ("dst_addr", "<value>", "sets global parameter destination address", dst_addr_cmd);
 
  register_command ("start_addr", "<value>", "sets start address", start_addr_cmd);
  register_command ("length", "<value>", "sets global parameter length", length_cmd);
  register_command ("length", "<value>", "sets global parameter length", length_cmd);
  register_command ("ip", "<value> <value> <value>", "sets global parameter ip address", ip_cmd);
  register_command ("ip", "<value> <value> <value>", "sets global parameter ip address", ip_cmd);
  register_command ("srv_ip", "<value> <value> <value>", "sets global parameter server ip address", srv_ip_cmd);
  register_command ("srv_ip", "<value> <value> <value>", "sets global parameter server ip address", srv_ip_cmd);
  register_command ("erase_method", "<value> <value> <value>", "sets flash erase method (0 = do not erase, 1 = fully, 2 = as needed)", erase_method_cmd);
  register_command ("erase_method", "<value> <value> <value>", "sets flash erase method (0 = do not erase, 1 = fully, 2 = as needed)", erase_method_cmd);
  if (HELP_ENABLED) register_command ("globals", "", "show globals", globals_cmd);
  if (HELP_ENABLED) register_command ("globals", "", "show globals", globals_cmd);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.