Advertisement
Guest User

Untitled

a guest
May 28th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. int main(int i, char **c)
  2. {
  3.     char buffer[64];
  4.  
  5.     /* lock gdbstub ROM */
  6.     CSR_DBG_CTRL = DBG_CTRL_GDB_ROM_LOCK;
  7.  
  8.     /* enable bus errors */
  9.     CSR_DBG_CTRL = DBG_CTRL_BUS_ERR_EN;
  10.  
  11.     CSR_GPIO_OUT = GPIO_LED1;
  12.     rescue = !((unsigned int)main > FLASH_OFFSET_REGULAR_BIOS);
  13.  
  14.     uart_force_sync(1);
  15.     irq_setmask(0);
  16.     irq_enable(0);
  17.     uart_init();
  18.     uart_write('E');
  19.     while(1)
  20.     {
  21.         asm volatile("nop");
  22.     }
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement