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

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

Re: [avr-gcc-list] Simulating with AVR-Studio


From: Jim Pearce
Subject: Re: [avr-gcc-list] Simulating with AVR-Studio
Date: Mon, 7 May 2001 10:40:49 -0300

I guess I was a bit loose with my definitions!  

Anyway, a bit of history on the post.  I was using Larry Barello's excellent 
AvrX kernel.  It has the following in its AvrX.h file:

<snip>
extern inline void Epilog(void) { asm("\trjmp     _Epilog\n"); }
<\snip>

This is placed at the end of ISRs to return control to the kernel. For example:

AVRX_SIGINT(SIG_OVERFLOW0)
{
    IntProlog();                // Switch to kernel stack/context
    outp(TCNT0_INIT, TCNT0);    // Reset timer overflow count
    AvrXTimerHandler();         // Call Time queue manager
    Epilog();                   // Return to tasks 
}


As written it causes problems for Astudio, specifically the disassembly for the 
module that contains the macro call will not be displayed.  

If instead you do:

#define Epilog1() { asm("\trjmp     _Epilog\n"); }

AVRX_SIGINT(SIG_OVERFLOW0)
{
    IntProlog();                // Switch to kernel stack/context
    outp(TCNT0_INIT, TCNT0);    // Reset timer overflow count
    AvrXTimerHandler();         // Call Time queue manager
    Epilog1();                   // Return to tasks 
}

Astudio is happy and shows all of your source disassembly.


Jim




reply via email to

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