how to add an ISR in Rowley for LPC2368.

raedbenz wrote on Thursday, November 26, 2009:

sorry but i am a newbie to freertos.
i am using rowley with lpc268. i managed to run my hello world task (led flash).
now i would like to add an interrupt on UART0 receveir. how do u define interreupts in freertos ? (i know how to setup registers for UART0, but how to define isr routine and context switching, etc…)
any documentation for that?

edwards3 wrote on Thursday, November 26, 2009:

Rowley for ARM just uses the standard GCC ARM7 port. Look at the Interrupt Service Routines section of this page

I think it is a bit out of date though. The very latest versions of GCC can try and inline the C function call. To avoid this simply call the C function from asm instead. So in the example on the linked page, replace the C function call to vASwitchCompatibleISR_Handler(); with __asm volatile ( “bl vASwitchCompatibleISR_Handler” );