DSPRelated.com
Forums

RE: Interrupt/context problem? RE: 1-27759674 Bug Number: WB1- 39699 USEFUL follow-up

Started by Corey, Rick October 12, 2002
Hello Metrowerks Tech Support

RE: Service Request Number: 1-27759674
Bug Number: WB1-39699 Let me follow up my Email from earlier today. I am thinking that the compiler must be confused about where the scope of
"#pragma interrupt saveall warn" ends, or maybe it is just confused about
which functions are ISRs and which are not.

Background:
In these tests, I'm still checking "deferred inlining" to see the bug.
I have no inline functions, and no ISR ever calls any function at all
whatsoever.
*NON-SDK* 56803 stationary. 5.0.2.
Both my ISRs get RTSs instead of RTIs as long as "deferred inlining" is
checked.

While posting to the Yahoo DSP group a summary of my lengthy Email to you, I
thought to check the postamble of my unrelated test function. I had to
disable "treat all warnings as errors", so the test conditions have changed
slightly. This test function is declared right AFTER one of my ISRs (at
the bottom of the file CAN_ISRs_TEST.c, attached. See line 377.)

The compiler DID put an "RTI" at the end of my unrelated test function
instead of at the end of my ISR!

Perhaps the scope of the pragma extended one function too far, or somehow it
"skipped one" and made the test function an ISR instead.

Maybe the compiler saw the pragma, then kept looking for the NEXT function
to start, not realizing that "#pragma interrupt saveall warn" is placed
INSIDE the braces of the ISR.

Just a guess, a clue for when you have time to look into this one.

Good luck, and happy hunting!

Rick Corey