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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orpmon/] [common/] [common.c] - Diff between revs 855 and 858

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

Rev 855 Rev 858
Line 1... Line 1...
#include "common.h"
#include "common.h"
#include "uart.h"
#include "uart.h"
#include "screen.h"
#include "screen.h"
#include "support.h"
#include "support.h"
#include "keyboard.h"
#include "keyboard.h"
 
#include "spr_defs.h"
 
#include "int.h"
 
 
#define MAX_COMMANDS  100
#define MAX_COMMANDS  100
 
 
extern unsigned long src_addr;
extern unsigned long src_addr;
 
 
Line 19... Line 21...
  int (*func)(int argc, char *argv[]);
  int (*func)(int argc, char *argv[]);
} command[MAX_COMMANDS];
} command[MAX_COMMANDS];
 
 
void putc (const char c)
void putc (const char c)
{
{
  debug ("getc %i, %i = %c\n", bd.bi_console_type, c, c);
  debug ("putc %i, %i = %c\n", bd.bi_console_type, c, c);
  switch (bd.bi_console_type) {
  switch (bd.bi_console_type) {
  case CT_NONE:
  case CT_NONE:
    break;
    break;
  case CT_UART:
  case CT_UART:
    uart_putc (c);
    uart_putc (c);
Line 259... Line 261...
/* Main shell loop */
/* Main shell loop */
int main(int argc, char **argv)
int main(int argc, char **argv)
{
{
  extern unsigned long calc_mycrc32 (void);
  extern unsigned long calc_mycrc32 (void);
  unsigned long t;
  unsigned long t;
#if 0
#if 1
  extern unsigned long mycrc32, mysize;
  extern unsigned long mycrc32, mysize;
#endif
#endif
  /* Initialize controller */
  int_init ();
  change_console_type (CT_UART);
  change_console_type (CONSOLE_TYPE);
 
  mtspr(SPR_SR, mfspr(SPR_SR) | SPR_SR_IEE);
 
 
#if SELF_CHECK
#if SELF_CHECK
  printf ("Self check... ");
  printf ("Self check... ");
  if ((t = calc_mycrc32 ())) printf ("FAILED!!!\n");
  if ((t = calc_mycrc32 ())) printf ("FAILED!!!\n");
  else printf ("OK\n");
  else printf ("OK\n");

powered by: WebSVN 2.1.0

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