ARM Technical Support Knowledge Articles

COPYING C INTERRUPT ROUTINES TO IDATA IN V3.X

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

I need a solution where I can copy a C interrupt routine into IDATA. The code to do this must support future editing of the interrupt routine so that as the interrupt routine grows or shrinks, the entire interrupt code gets copied. Is there an easy way to do this?

ANSWER

Unfortunately, there is not a simple way to do this in C166 Version 3. However, there is in Version 4. See below for more information.

In Version 3, the most difficult problem is that C166 does not have an option generate relocatable code. The compiler may generate absolute jumps in the code generated for a function (even interrupt functions). When you copy the function to a different address, this will cause problems.

The length of the function is not a big problem. You just have to know which function follows the interrupt function in the source code. The difference between the following function and the interrupt function is the length of the interrupt function.

If the interrupt function is not complex and is not big, there is a good chance that it does not contain absolute jumps, but you can never guarantee it.

MORE INFORMATION

Article last edited on: 2004-05-20 20:22:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential