AnsweredAssumed Answered

KSDK and IAR: Problems with interrupts

Question asked by Sebastian Lenz on Jan 26, 2016
Latest reply on Feb 1, 2016 by Alice_Yang

Hi guys,

 

again I have some troubles while using IAR.

I want to use the KSDK within IAR. I copied the platform folder out of the KSDK folder to the project folder and made the following settings within IAR project settings:

     - C/C++ Compiler --> Preprocessor --> Defined symbols:

               CPU_MK22FN512VLH12

     - C/C++ Compiler --> Preprocessor --> Additional include directories:

               $PROJ_DIR$\platform\devices\MK22F51212\include

               $PROJ_DIR$\platform\devices\MK22F51212\startup

               $PROJ_DIR$\platform\CMSIS\Include

               $PROJ_DIR$\platform\composite\inc

               $PROJ_DIR$\platform\devices

               $PROJ_DIR$\platform\devices\inc

               $PROJ_DIR$\platform\drivers\inc

               $PROJ_DIR$\platform\hal\inc

               $PROJ_DIR$\platform\osa\inc

               $PROJ_DIR$\platform\system\inc

               $PROJ_DIR$\platform\utilities\inc

 

In my example I'm initializing PIT0 with interrupts. As interrupt handler I added void PIT0_IRQHandler(void){}.

But while debugging I can't set a breakpoint within the handler and the debugger gets stuck within a NMI handler, I guess because the handler for the pit isr isn't known by the cpu.

 

Copying that project to KDS it works, because within the project a Startup_Code folder is generated, where the startup_MK22F51212.S file is included. In this file I can find the declaration of the PIT0_IRQHandler.

Where I have to include this file in IAR?

 

Best greetz,

S. L.

Outcomes