how to add interrupt routine in codewarrior

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

how to add interrupt routine in codewarrior

跳至解决方案
3,949 次查看
Blackrose
Contributor I

Dear all:

       I use codewarrior create a bareboard project.Now, i couldn't konw how to add a ISR function in codewarrior.My version of codewarrior is 10.1. Could you show me some advice for this.(I doesn't found more doucments)Thanks

 

Kevin

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,826 次查看
CrasyCat
Specialist III

Hello

First question is which MCU are you targeting (HCS08, Coldfire, Kinetis, ....)?

Then you may want to create a project and activate ProcessorExpert. Then you add a Bean for lets say a Timer and let Processor Expert generate code for you.

You can then look how the interrupt has been configured and implemented.

This can give you an idea on how to implement your interrupt.  You can even let Processor Expert handle the whole code generation for peripheral configuration and management.

CrasyCat

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,827 次查看
CrasyCat
Specialist III

Hello

First question is which MCU are you targeting (HCS08, Coldfire, Kinetis, ....)?

Then you may want to create a project and activate ProcessorExpert. Then you add a Bean for lets say a Timer and let Processor Expert generate code for you.

You can then look how the interrupt has been configured and implemented.

This can give you an idea on how to implement your interrupt.  You can even let Processor Expert handle the whole code generation for peripheral configuration and management.

CrasyCat

0 项奖励
回复
1,826 次查看
Blackrose
Contributor I

Thanks for your quickly response.

I used chip name is coldfire 52259.

I got a file that note some steps for add ISR into a project.It doesn't say about ProcessExpert.

Here are steps:

1.write a ISR function

__declspec(interrupt)

void my_isr(void)

{

//doing somethins

}

2.modifiy exceptions.c and add custom name of ISR

extern __declspec(interrupt) void my_isr(void);

....

my_isr ,/* 82(0x148)  */

I follow these steps doing somethings.Though my_isr() doesn't run.I didn't know this method is right.I can try your method.

Thanks

Kevin Chen

0 项奖励
回复
1,826 次查看
Monica
Senior Contributor III

Hello Kevin... has the method worked out?

Please let us know! :smileywink:

Regards!

0 项奖励
回复