I have a problem with writing interrupt handlers in Keil ARM compiler for LPC1114. When I write program in C++ and specify --cpp compiler option all code from interrupt handlers disappears, it is replaced with infinite loop. I wrote simple program that illustrates my trouble.
#include "LPC11xx.h" // LPC11xx definitions
#define SYSTICK_DELAY 120000 // for 10 ms systick @ 12MHz osc
void SysTick_Handler(void)
{
__NOP();
}
int main (void)
{
SystemInit(); // from system_LPC11xx.c
SysTick_Config(SYSTICK_DELAY); // from core_cm0.h
// Loop forever
while (1) __NOP();
}
When trying to compile this code with --cpp compiler option I get infinite loop in disasm:
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
This is the place where __NOP() from above program must be. And it is there when I'm compiling code with --c99 compiler option or without additional options. Keil MDK version is 4.12. Can anyone tell me is there any solution or workaround ?
volatile
in it. \$\endgroup\$