Hi all,

Is there an easy way to insert a few lines of asm code in an
ISR before the prologue starts (at the ISR entry) and then
some additional code after the epilogue (right before the
RETI)?

There are a couple of reasons why I'm trying to do this:

1) To insert some pin toggling instructions so I can more
   accurately track time spent in various ISRs (including
   the register save/restores).

2) To switch to a different stack for some stack-hungry ISRs
   so that I don't have to reserve as much memory in each
   task's stack area when running a preemptive RTOS.

I've been doing it for a few test scenarios by compiling to
assembler and then manually inserting code in the generated
asm, but it's pretty cumbersome.  And I don't want to
declare the ISRs as naked since I still want to the compiler
to automatically generate the register save/restore code.

Thanks for any ideas,

-mark


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to