diff --git a/Demo/ARM7_LPC2106_GCC/lpc2106-ram.ld b/Demo/ARM7_LPC2106_GCC/lpc2106-ram.ld index c54802c2f..523a41ad7 100644 --- a/Demo/ARM7_LPC2106_GCC/lpc2106-ram.ld +++ b/Demo/ARM7_LPC2106_GCC/lpc2106-ram.ld @@ -36,6 +36,12 @@ SECTIONS *(.bss) } >ram + . = ALIGN(4); + .eh_frame : + { + KEEP (*(.eh_frame)) + } > ram + /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ diff --git a/Demo/ARM7_LPC2106_GCC/lpc2106-rom.ld b/Demo/ARM7_LPC2106_GCC/lpc2106-rom.ld index e7cf25a22..0e70a4aa7 100644 --- a/Demo/ARM7_LPC2106_GCC/lpc2106-rom.ld +++ b/Demo/ARM7_LPC2106_GCC/lpc2106-rom.ld @@ -36,6 +36,12 @@ SECTIONS *(.bss) } >ram + . = ALIGN(4); + .eh_frame : + { + KEEP (*(.eh_frame)) + } > ram + /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ diff --git a/Demo/ARM7_LPC2106_GCC/serial/serialISR.c b/Demo/ARM7_LPC2106_GCC/serial/serialISR.c index f3de5448f..5d2a06d16 100644 --- a/Demo/ARM7_LPC2106_GCC/serial/serialISR.c +++ b/Demo/ARM7_LPC2106_GCC/serial/serialISR.c @@ -96,7 +96,7 @@ void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle void vUART_ISR_Wrapper( void ) __attribute__ ((naked)); /* UART0 interrupt service routine handler. */ -void vUART_ISR_Handler( void ); +void vUART_ISR_Handler( void ) __attribute__ ((noinline)); /*-----------------------------------------------------------*/ void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, @@ -124,7 +124,7 @@ void vUART_ISR_Wrapper( void ) /* Call the handler. This must be a separate function from the wrapper to ensure the correct stack frame is set up. */ - vUART_ISR_Handler(); + __asm volatile ("bl vUART_ISR_Handler"); /* Restore the context of whichever task is going to run next. */ portRESTORE_CONTEXT();