Exemplo n.º 1
0
static Uint32 LOCAL_boot(void)
{
  DEVICE_BootMode bootMode;
  
  // Read boot mode 
  bootMode = DEVICE_bootMode();
    
  if (bootMode == DEVICE_BOOTMODE_UART)
  {
    // Wait until the RBL is done using the UART. 
    while((UART0->LSR & 0x40) == 0 );
  }

  // Platform Initialization
  DEVICE_init();

  // Set RAM pointer to beginning of RAM space
  UTIL_setCurrMemPtr(0);

  // Send some information to host
  DEBUG_printString("TI SLT Version: ");
  DEBUG_printString(SLT_VERSION_STRING);
  DEBUG_printString("\r\nBooting Catalog Boot Loader\r\nBootMode = ");
  
  // Select Boot Mode
  switch(bootMode)
  {
    case DEVICE_BOOTMODE_UART:
    {
      //Report Bootmode to host
      DEBUG_printString("UART\r\n");
    }
    default:
    {
      UARTBOOT_copy();
      break;
    }
  }
    
  UART_sendString("   DONE", TRUE);
  
  UTIL_waitLoop(10000);

  DEVICE_TIMER0Stop();

  return E_PASS;    
}
Exemplo n.º 2
0
static Uint32 LOCAL_boot(void)
{
  DEVICE_BootMode bootMode;

  // Read boot mode 
  bootMode = DEVICE_bootMode();
  
  if (bootMode == DEVICE_BOOTMODE_UART)
  {
    // Wait until the RBL is done using the UART. 
    while((UART0->LSR & 0x40) == 0 );
  }

  // Platform Initialization
  if ( DEVICE_init() != E_PASS )
  {
    DEBUG_printString(devString);
    DEBUG_printString(" initialization failed!\r\n");
    asm(" MOV PC, #0");
  }
  else
  {
    DEBUG_printString(devString);
    DEBUG_printString(" initialization passed!\r\n");
  }

  // Set RAM pointer to beginning of RAM space
  UTIL_setCurrMemPtr(0);

  // Send some information to host
  DEBUG_printString("TI SFT Version: ");
  DEBUG_printString(SFT_VERSION_STRING);
  DEBUG_printString("\r\nBooting Catalog Serial Flasher\r\n");
  
  // Perform UART boot (always assume UART boot since this is only used for serial flashing)
  UARTBOOT_copy();
    
  DEBUG_printString("   DONE");
  
  UTIL_waitLoop(10000);

  DEVICE_TIMER0Stop();

  return E_PASS;    
}