pmt

Overriding MQX ROM Vector table at compile time, kernel_isr Feature Request

Discussion created by pmt on May 3, 2013
Latest reply on May 7, 2013 by pmt

Greetings,

 

In the MQX vectors.c file the majority of the vectors are set to a single define, DEFAULT_VECTOR:

 

    /* Cortex external interrupt vectors                                                */

    DEFAULT_VECTOR,         /* 0x10  0x00000040   -   ivINT_DMA0                        */

    DEFAULT_VECTOR,         /* 0x11  0x00000044   -   ivINT_DMA1                        */

     ...

However, more useful would be if they are set to unique names:

 

               ; External Interrupts

               DCD     DMA0_DMA16_IRQHandler  ; DMA channel 0/16 transfer complete interrupt

               DCD     DMA1_DMA17_IRQHandler  ; DMA channel 1/17 transfer complete interrupt

               ...

 

That are set to the default handler with a WEAK export:

 

Default_Handler PROC

                EXPORT  DMA0_DMA16_IRQHandler     [WEAK]

                EXPORT  DMA1_DMA17_IRQHandler     [WEAK]

               ...

               // default ISR handler

 

then the user is able to create an override function in the user code like without the need to call run-time kernel interrupt install code.  This is true even if the vector table is left in ROM:

 

// User kernel ISR C code example

void DMA0_DMA16_IRQHandler(void)

{

     // ISR handler here ...

}

 

 

Can you consider this as a modification to the MQX vector BSPs?  It would allow compile time kernel ISR installation that woudl work in ROM or RAM.

 

Thanks,

PMT

 

 

 

 

Outcomes