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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [common/] [common.c] - Diff between revs 355 and 375

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

Rev 355 Rev 375
Line 10... Line 10...
#include "build.h"
#include "build.h"
 
 
#define MAX_COMMANDS  100
#define MAX_COMMANDS  100
 
 
// Value from linker script
// Value from linker script
extern unsigned long src_addr;
extern unsigned long _src_addr;
 
 
bd_t bd;
bd_t bd;
 
 
int num_commands = 0;
int num_commands = 0;
 
 
Line 214... Line 214...
  printf ("\n" BOARD_DEF_NAME"> ");
  printf ("\n" BOARD_DEF_NAME"> ");
 
 
  while(1)
  while(1)
    {
    {
      c=getc();
      c=getc();
 
 
 
      if (c == 0x7f) // Backspace on picocom is showing up as 0x7f
 
        c = '\b';
 
 
      if (c == '\r' || c == '\f' || c == '\n')
      if (c == '\r' || c == '\f' || c == '\n')
        {
        {
          // Mark end of string
          // Mark end of string
          *pstr = '\0';
          *pstr = '\0';
          putc('\n');
          putc('\n');
Line 288... Line 292...
  }
  }
 
 
}
}
 
 
#if HELP_ENABLED
#if HELP_ENABLED
extern unsigned long src_addr; // Stack section ends here, will print it out
extern unsigned long _src_addr; // Stack section ends here, will print it out
/* Displays help screen */
/* Displays help screen */
int help_cmd (int argc, char *argv[])
int help_cmd (int argc, char *argv[])
{
{
  int i;
  int i;
  for (i = 0; i < num_commands; i++)
  for (i = 0; i < num_commands; i++)
Line 302... Line 306...
  printf("\n");
  printf("\n");
  printf("CPU info\n");
  printf("CPU info\n");
  printf("Frequency\t\t%dMHz\n", IN_CLK/1000000);
  printf("Frequency\t\t%dMHz\n", IN_CLK/1000000);
  print_or1k_cache_info();
  print_or1k_cache_info();
  printf("\n");
  printf("\n");
  printf("Info: Stack section addr 0x%x\n",(unsigned long) &src_addr);
  printf("Info: Stack section addr 0x%x\n",(unsigned long) &_src_addr);
  printf("Build tag: %s", BUILD_VERSION);
  printf("Build tag: %s", BUILD_VERSION);
 
 
  return 0;
  return 0;
}
}
#endif /* HELP_ENABLED */
#endif /* HELP_ENABLED */
Line 327... Line 331...
/* List of all initializations */
/* List of all initializations */
void mon_init (void)
void mon_init (void)
{
{
  /* Set defaults */
  /* Set defaults */
  global.erase_method = 2; /* as needed */
  global.erase_method = 2; /* as needed */
  global.src_addr = (unsigned long)&src_addr;
  global.src_addr = (unsigned long)&_src_addr;
  global.dst_addr = FLASH_BASE_ADDR;
  global.dst_addr = FLASH_BASE_ADDR;
  global.eth_add[0] = ETH_MACADDR0;
  global.eth_add[0] = ETH_MACADDR0;
  global.eth_add[1] = ETH_MACADDR1;
  global.eth_add[1] = ETH_MACADDR1;
  global.eth_add[2] = ETH_MACADDR2;
  global.eth_add[2] = ETH_MACADDR2;
  global.eth_add[3] = ETH_MACADDR3;
  global.eth_add[3] = ETH_MACADDR3;

powered by: WebSVN 2.1.0

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