Error: an unexpected interrupt occurs or a specific handler is not present in the application code

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Error: an unexpected interrupt occurs or a specific handler is not present in the application code

跳至解决方案
2,723 次查看
doini
Contributor III

Hello,

I created a new C++ project based on LPCOpen for the LPCXpresso1549 demo board, and I copied the code from LPCOpen periph_adc project to try it in my C++ project. It compiled just fine, but at run time it will block here:

 

//*****************************************************************************

// Processor ends up here if an unexpected interrupt occurs or a specific

// handler is not present in the application code.

//*****************************************************************************

__attribute__ ((section(".after_vectors")))

void IntDefaultHandler(void)

{ while(1) {}

}

 

Also the message: 'No source available for "0x30000b8" ' appears.

I attach here my project.

 

I would really appreciate any help.

Thank you,

Doini

Original Attachment has been moved to: Workspace_Receiver_LPC1549.zip

标签 (4)
0 项奖励
回复
1 解答
2,374 次查看
doini
Contributor III

Thank you, I wrote extern "C" {...} around the interrupt functions and it is working now, the error disappeared.

Doini

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,374 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

One thing to watch with C++ is the name mangling of the interrupt handler names.  For more details see : Startup code and interrupt handlers 

With regards to the message 'No source available for "0x30000b8" - this does occasionally happen. But you can just ignore this and close the tab containing it. The debugger has simply stopped the MCU during the connection sequence whilst it was executing code in the ROM bootloader (causing the IDE to try to display the code at that location - which of course there is no source for in your application).

Regards,

LPCXpresso Support

2,375 次查看
doini
Contributor III

Thank you, I wrote extern "C" {...} around the interrupt functions and it is working now, the error disappeared.

Doini

0 项奖励
回复