This is the mail archive of the mailing list for the crossgcc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ISR in C++

I remember seeing a similar discussion on the real-time newsgroup. You might
to throw this topic around there. My motivation in posting here however is to
you to forward me any information that you acquire on this subject.


Ivan Porres Paltor wrote:

> Ivan Porres Paltor wrote:
> >
> > Hi!,
> >
> > I am using g++ for the Hitachi SH1 processor. ( sh-hms target ).
> >
> > The compiler works fine, but I am trying to do a interrupt service
> > routine in C++.
> Thanks to the people that helped me with the previous post.
> Now, I realized that my g++ ignores the "#pragma interrupt" directive.
> I.e.:
> #pragma interrupt
> extern "C"
> void isrCPP {
>  //
> };
> The compiler accepts this code, but it does not save or restore the
> registers and does not add a "Return-from-Interruption" op-code (rete in
> the asm).
> Is it a known bug? I am missing something?
> Also, I am interested in a good OO mechanism to dispatch the interrupts.
> If you know a good reference or you want to discuss about it please tell
> me.
> Thanks,
> Ivan
> --
> Ivan Porres Paltor                    Turku Centre for Computer Science
> Åbo Akademi, Department of Computer Science  Phone: +358-2-2154033
> Lemminkäinengatan 14A
> FIN-20520 Turku - Finland