Getting IRQ_Handler to work for imx53

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Getting IRQ_Handler to work for imx53

跳至解决方案
2,225 次查看
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(); }

标签 (1)
0 项奖励
回复
1 解答
1,936 次查看
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 项奖励
回复
4 回复数
1,936 次查看
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 项奖励
回复
1,937 次查看
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 项奖励
回复
1,936 次查看
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 项奖励
回复
1,936 次查看
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 项奖励
回复