avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Hard coded asm in an interrupt routine


From: Grant Stockly
Subject: [avr-gcc-list] Hard coded asm in an interrupt routine
Date: Wed, 24 Jul 2002 15:01:14 -0800

I have a time critical routine written in assembler that has to be ran exactly the same length regardless of the outcome of various condition loops (+-650ns). I've used nops and jmps to acheive +-2 instruction cycle runtime for a ~500 instruction routine.

Now I run into the problem of integrating this into a gcc C project. Every time there is an external interrupt I want to run this piece of code. Can I assume that during a 'C' Interrupt that the general purpose registers such as r16, r17 and r20, r21 are safe to destroy? I need to hard code this to work exactly this way.

I also need to be able to initialize the stack about 30 bytes below the end of external ram. Can anyone point me to the file that has this info?

I'm coming from the IAR 1.4 era, and avr-gcc is looking good. $2460 is too much for IAR's new compilier. Agree? : ) I have experience programming linux kernel device drivers and user space tcp programs on bsd.

Thanks,
Grant

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]