Another related question, please.
I tied to bypass the problem moving the interrupt vectors to ram in my main program by using interrupt jumps in my bootloader program. This I understand will add just the jump commands latency. My main program uses the USB rom serial code. I seem to have a problem using the bootloader jump method with the USB when my main program is located at 0x4000. The program seems to start and I can seem debug printout on an uart port but stalls apparently in the USB initialization. The main program works when located at address 0. I saw on the forum where there were problems with the CAN rom interface in a similar situation. It my just be a bug somewhere.
/*****************************************************************************
** Function name: USB_IRQHandler
**
** Description: Redirects CPU to application defined handler
**
** Parameters: None
**
** Returned value: None
**
*****************************************************************************/
void USB_IRQHandler(void)
{
/* Re-direct interrupt, get handler address from application vector table */
asm volatile("ldr r0, =0x4098");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
} // USB_IRQHandler
/*****************************************************************************
** Function name: USB_FIQHandler
**
** Description: Redirects CPU to application defined handler
**
** Parameters: None
**
** Returned value: None
**
*****************************************************************************/
void USB_FIQHandler(void)
{
/* Re-direct interrupt, get handler address from application vector table */
asm volatile("ldr r0, =0x409C");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
} // USB_FIQHandler
/*****************************************************************************
** Function name: USBWakeup_IRQHandler
**
** Description: Redirects CPU to application defined handler
**
** Parameters: None
**
** Returned value: None
**
*****************************************************************************/
void USBWakeup_IRQHandler(void)
{
/* Re-direct interrupt, get handler address from application vector table */
asm volatile("ldr r0, =0x40B8");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
} // USBWakeup_IRQHandler
Thanks