NOTICE: This website will be shut down in the near future. Product content has moved to Forum content and FAQs have been moved to We encourage you to create a user account on to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.


Interrupt Handlers in C++ applications

lpcxpresso-support's picture

When you create a project using the LPCXpresso IDE project wizard, the startup code generated contains a set of default interrupt handlers, dependent upon the target MCU.

These default interrupt handlers are defined as weak so that if your main application provides an implementation, this will be used instead of the default in the generated executable.

However if your application is a C++ one then any interrupt handlers defined in C++ files within in your main application will need to have C linkage rather than C++ linkage. To do this, make sure that you use extern "C" { .... } around the interrupt handler within your main application code.

For more details, please see you favorite C++ text book, alternatively an internet search will bring up lots of useful links - for example:

Your rating: None