how to add interrupt routine in codewarrior

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

how to add interrupt routine in codewarrior

Jump to solution
2,983 Views
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

Labels (1)
Tags (1)
0 Kudos
1 Solution
860 Views
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

View solution in original post

0 Kudos
3 Replies
861 Views
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 Kudos
860 Views
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 Kudos
860 Views
Monica
Senior Contributor III

Hello Kevin... has the method worked out?

Please let us know! :smileywink:

Regards!

0 Kudos