OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [or1ksim/] [debug/] [debug-unit.c] - Diff between revs 224 and 235

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

Rev 224 Rev 235
Line 979... Line 979...
 
 
}       /* debug_enabled() */
}       /* debug_enabled() */
 
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*!Enable or disable the legacy GDB interface to the debug unit
 
 
 
   This is for use with the OpenRISC Remote JTAG protocol (now deprecated). It
 
   may only be specified if the RSP interface is not specified. If both are
 
   specified, the RSP will be used.
 
 
 
   @param[in] val  The value to use
 
   @param[in] dat  The config data structure (not used here)                 */
 
/*---------------------------------------------------------------------------*/
 
static void
 
debug_gdb_enabled (union param_val val, void *dat)
 
{
 
  config.debug.gdb_enabled = val.int_val;
 
 
 
  if (config.debug.gdb_enabled && config.debug.rsp_enabled)
 
    {
 
      fprintf (stderr, "WARNING. Cannot specify both legacy and RSP GDB "
 
               "interfaces: legacy interface ignored\n");
 
      config.debug.gdb_enabled = 0;
 
    }
 
}       /* debug_gdb_enabled () */
 
 
 
 
 
/*---------------------------------------------------------------------------*/
 
/*!Enable or disable Remote Serial Protocol GDB interface to the debug unit
/*!Enable or disable Remote Serial Protocol GDB interface to the debug unit
 
 
   This is the preferred interface. It may only be specified if the RSP
   This is the now the only interface.
   interface is not specified. If both are specified, the RSP will be used.
 
 
 
   @param[in] val  The value to use
   @param[in] val  The value to use
   @param[in] dat  The config data structure (not used here)                 */
   @param[in] dat  The config data structure (not used here)                 */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
static void
static void
debug_rsp_enabled (union param_val val, void *dat)
debug_rsp_enabled (union param_val val, void *dat)
{
{
  config.debug.rsp_enabled = val.int_val;
  config.debug.rsp_enabled = val.int_val;
 
 
  if (config.debug.gdb_enabled && config.debug.rsp_enabled)
 
    {
 
      fprintf (stderr, "WARNING. Cannot specify both legacy and RSP GDB "
 
               "interfaces: legacy interface ignored\n");
 
      config.debug.gdb_enabled = 0;
 
    }
 
}       /* debug_rsp_enabled () */
}       /* debug_rsp_enabled () */
 
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*!Set the legacy GDB server port
 
 
 
   This is for use with the OpenRISC Remote JTAG protocol (now deprecated).
 
   Ensure the value chosen is valid. Note that 0 is permitted, meaning the
 
   connection should be to the "or1ksim" service, rather than a port.
 
 
 
   Both this and the RSP port may be specified, but only one may be enabled
 
   (see debug_gdb_enabled() and debug_rsp_enabled()).
 
 
 
   @param[in] val  The value to use
 
   @param[in] dat  The config data structure (not used here)                 */
 
/*---------------------------------------------------------------------------*/
 
static void
 
debug_server_port (union param_val val, void *dat)
 
{
 
  if ((val.int_val < 0) || (val.int_val > 65535))
 
    {
 
      fprintf (stderr, "Warning: invalid legacy GDB port specified: ignored\n");
 
    }
 
  else
 
    {
 
      config.debug.server_port = val.int_val;
 
    }
 
}       /* debug_server_port() */
 
 
 
 
 
/*---------------------------------------------------------------------------*/
 
/*!Set the Remote Serial Protocol GDB server port
/*!Set the Remote Serial Protocol GDB server port
 
 
   This is for use with the RSP, which is now the preferred interface.  Ensure
   This is for use with the RSP, which is now the preferred interface.  Ensure
   the value chosen is valid. Note that 0 is permitted, meaning the connection
   the value chosen is valid. Note that 0 is permitted, meaning the connection
   should be to the "or1ksim-rsp" service, rather than a port.
   should be to the "or1ksim-rsp" service, rather than a port.
 
 
   Both this and the legacy port may be specified, but only one may be enabled
 
   (see debug_gdb_enabled() and debug_rsp_enabled()).
 
 
 
   @param[in] val  The value to use
   @param[in] val  The value to use
   @param[in] dat  The config data structure (not used here)                 */
   @param[in] dat  The config data structure (not used here)                 */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
static void
static void
debug_rsp_port (union param_val val, void *dat)
debug_rsp_port (union param_val val, void *dat)
Line 1102... Line 1041...
reg_debug_sec ()
reg_debug_sec ()
{
{
  struct config_section *sec = reg_config_sec ("debug", NULL, NULL);
  struct config_section *sec = reg_config_sec ("debug", NULL, NULL);
 
 
  reg_config_param (sec, "enabled",     PARAMT_INT, debug_enabled);
  reg_config_param (sec, "enabled",     PARAMT_INT, debug_enabled);
  reg_config_param (sec, "gdb_enabled", PARAMT_INT, debug_gdb_enabled);
 
  reg_config_param (sec, "rsp_enabled", PARAMT_INT, debug_rsp_enabled);
  reg_config_param (sec, "rsp_enabled", PARAMT_INT, debug_rsp_enabled);
  reg_config_param (sec, "server_port", PARAMT_INT, debug_server_port);
 
  reg_config_param (sec, "rsp_port",    PARAMT_INT, debug_rsp_port);
  reg_config_param (sec, "rsp_port",    PARAMT_INT, debug_rsp_port);
  reg_config_param (sec, "vapi_id",     PARAMT_INT, debug_vapi_id);
  reg_config_param (sec, "vapi_id",     PARAMT_INT, debug_vapi_id);
 
 
}       /* reg_debug_sec () */
}       /* reg_debug_sec () */
 
 

powered by: WebSVN 2.1.0

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