when i debug my project it run into a while (1) for undefined interrupts
one of the other thread says No source available for "0x48082010 (0x48082010)() " and another says No source available for "0xFFFFFF7A (0xFFFFFF7A)() "
So my question is how can i see from the debugger which interrupt is undefined?
i use CW V10.2 and a MCU
Solved! Go to Solution.
Hello,
yes, this can be done without Processor Expert. I assume you have a vector table, maybe something like this (example for ARM/Kinetis below, but similar things apply for other architectures):
/* The Interrupt Vector Table */
void (* const InterruptVector[])() __attribute__ ((section(".vectortable"))) = {
/* Processor exceptions */
(void(*)(void)) &_estack,
__thumb_startup,
NMI_Handler,
...
/* Interrupts */
Default_Handler,
Default_Handler,
Default_Handler,
....
};
void Default_Handler(void)
{
__asm("bkpt");
}
The idea is instead to use Default_Handler() for all the not used vectors, to use an own handler for each entry instead.
For this add one handler for each interrupt, e.g.
void Handler16(void) { __asm("bkpt");}
void Handler17(void) { __asm("bkpt");}
void Handler18(void) { __asm("bkpt");}
and then use them instead of the Default_Handler() in your vector table.
That way you will know easily which interrupt fired.
Hope this helps,
BK
Hello,
are you using Processor Expert?
Then you can assign an interrupt stub for every interrupt vector.
See the screenshot in http://mcuoneclipse.wordpress.com/2012/02/20/oh-my-an-interrupt/
Hope this helps,
BK
I am not using Processor Expert,
is there any other way to solve this or do i need to use Processor Expert?
I am a bit new to codewarrior, so i haven't heard of Processor Expert.
Hello,
yes, this can be done without Processor Expert. I assume you have a vector table, maybe something like this (example for ARM/Kinetis below, but similar things apply for other architectures):
/* The Interrupt Vector Table */
void (* const InterruptVector[])() __attribute__ ((section(".vectortable"))) = {
/* Processor exceptions */
(void(*)(void)) &_estack,
__thumb_startup,
NMI_Handler,
...
/* Interrupts */
Default_Handler,
Default_Handler,
Default_Handler,
....
};
void Default_Handler(void)
{
__asm("bkpt");
}
The idea is instead to use Default_Handler() for all the not used vectors, to use an own handler for each entry instead.
For this add one handler for each interrupt, e.g.
void Handler16(void) { __asm("bkpt");}
void Handler17(void) { __asm("bkpt");}
void Handler18(void) { __asm("bkpt");}
and then use them instead of the Default_Handler() in your vector table.
That way you will know easily which interrupt fired.
Hope this helps,
BK