Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 28th, 2012  |  syntax: C  |  size: 0.39 KB  |  views: 2  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }