Getting IRQ_Handler to work for imx53

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting IRQ_Handler to work for imx53

Jump to solution
1,069 Views
davidgolke
Contributor I

Having trouble defining IRQ_Handler.  I believe I have all of the necessary setup (enabling interrupts, enable global interrupts through TZIC, set up icf file, etc) but I cannot get this function to be triggered/entered.  Any help would be appreciated.

From the startup file:

LDR     PC,Reset_Addr           ; Reset

LDR     PC,Undefined_Addr       ; Undefined instructions

LDR     PC,SWI_Addr             ; Software interrupt (SWI/SVC)

LDR     PC,Prefetch_Addr        ; Prefetch abort

LDR     PC,Abort_Addr           ; Data abort

DCD     0                       ; RESERVED

LDR     PC,IRQ_Addr             ; IRQ

LDR     PC,FIQ_Addr             ; FIQ

DATA

Reset_Addr:     DCD   __iar_program_start

Undefined_Addr: DCD   Undefined_Handler

SWI_Addr:       DCD   SWI_Handler

Prefetch_Addr:  DCD   Prefetch_Handler

Abort_Addr:     DCD   Abort_Handler

IRQ_Addr:       DCD   IRQ_Handler

FIQ_Addr:       DCD   FIQ_Handler

From linker file:

define symbol __ICFEDIT_intvec_start__ = 0xF801FFB8;

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

From interrupt c file:

__irq __arm void IRQ_Handler        ( void ) { Interrupt_Handler(); }

Labels (1)
0 Kudos
1 Solution
780 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

attached is interrupt example for i.MX53 Quickstart board.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
780 Views
davidgolke
Contributor I

Also when I have all of this set up and I halt the debugger and try to run again, I see the following error:

"Could not start CPU core. (ErrorCode: -1)

Abort debug session?"

0 Kudos
781 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

attached is interrupt example for i.MX53 Quickstart board.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
780 Views
davidgolke
Contributor I

I am getting the following errors on the following lines:

Error[40]: Bad instruction stack.s 3

Error[40]: Bad instruction stack.s 9

These are lines

AREA    Stacks, DATA, NOINIT

top_of_stacks    SPACE   1

0 Kudos
780 Views
davidgolke
Contributor I

I am getting the error "Error[40]: Bad instruction" from trying to use "AREA" in startup.s and stack.s.  I'm guessing this is because the project I'm working with isn't using any library files other than those in my project.

0 Kudos