8 years, 10 months ago.

library issue while using FRDM-K64F

Hello,

I am using RA8875 Display with the FRDM-K64F the issue occurs when I use the menu library menu.h. If I compile my code the following error occurs. https://developer.mbed.org/media/uploads/shakir/screen_shot_2015-05-11_at_10.58.52_am.png.

Meanwhile, the error does not occur with mbed-LPC1768.It only occurs with FRDM-K64.

It should be noted that the code used is the example code provided

What should I do to void or fix the error?

Did you define NMI_Handler in main.cpp file? Where's your main.cpp file? A code snippet provided?

posted by Martin Kojtal 11 May 2015

Yes I am using the example code https://developer.mbed.org/users/WiredHome/code/PUB_RA8875_mPaint/

posted by Majed Shakir 11 May 2015

1 Answer

8 years, 10 months ago.

From main.cpp delete:

extern "C" void NMI_Handler()
{
    printf("\r\n\r\nNMI Fault!\r\n");
    wait_ms(500);
    NVIC_SystemReset();
}

It does not fit there (the others are error handlers, the NMI isn't an error handler), and in general it looks to me to be a leftover of some debug sessions.

On the K64F the mbed library already uses the NMI handler (to disable the NMI handler, before that quite some people had issues when it would lock up after accidentally triggering the NMI handler, which is effectively an InterruptIn which is always enabled), so since the main.cpp also uses it, there is a multiple definition.

Accepted Answer