EmbDev.net

Forum: ARM programming with GCC/GNU tools interrupt attribute


Author: outer_space (Guest)
Posted on:

Rate this post
0 useful
not useful
Why doesnt the gcc interrupt attribute work?  Is anyone working on
fixing it?

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
outer_space wrote:
> Why doesnt the gcc interrupt attribute work?  Is anyone working on
> fixing it?

The attribute works if the code is compiled in "arm-only"-mode. There
are known issues when using the attribute together with interwork, maybe
just when optimization is enabled. The problems is known and there are
patches in the gcc-bugzilla. As far as I know the patches are not
included in gcc 4.1.1. The gcc-bugzilla provides further information.
IRC the topic has been discussed in the GNUARM-yahoo-group and in this
forum some time ago. I have mentioned some "workarounds" an this forum
some days ago.

This forum is not the best place for a question about the state of the
gcc-development (better: gcc mailing-list).

Martin Thomas

Author: Pete Gasper (pgasper)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> outer_space wrote:
>> Why doesnt the gcc interrupt attribute work?  Is anyone working on
>> fixing it?
>
> The attribute works if the code is compiled in "arm-only"-mode. There
> are known issues when using the attribute together with interwork, maybe
> just when optimization is enabled. The problems is known and there are
> patches in the gcc-bugzilla. As far as I know the patches are not
> included in gcc 4.1.1. The gcc-bugzilla provides further information.
> IRC the topic has been discussed in the GNUARM-yahoo-group and in this
> forum some time ago. I have mentioned some "workarounds" an this forum
> some days ago.
>
> This forum is not the best place for a question about the state of the
> gcc-development (better: gcc mailing-list).
>
> Martin Thomas

What is the purpose of the attribute? Some code uses it, some doesn't.

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
Pete Gasper wrote:

> What is the purpose of the attribute? Some code uses it, some doesn't.

For example the compiler should generate instructions to "adjust" the
return-address when this attribute is used. See ARM technical manual
about return-addresses of exceptions.

Martin Thomas

Author: Andy Xy (andy0815)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> outer_space wrote:
>> Why doesnt the gcc interrupt attribute work?  Is anyone working on
>> fixing it?
>
> The attribute works if the code is compiled in "arm-only"-mode. There
> are known issues when using the attribute together with interwork, maybe
> just when optimization is enabled. The problems is known and there are
> patches in the gcc-bugzilla. As far as I know the patches are not
> included in gcc 4.1.1. The gcc-bugzilla provides further information.
> IRC the topic has been discussed in the GNUARM-yahoo-group and in this
> forum some time ago. I have mentioned some "workarounds" an this forum
> some days ago.
>
> This forum is not the best place for a question about the state of the
> gcc-development (better: gcc mailing-list).
>
> Martin Thomas

The problem is still there. Any chance to use
__attribute__((interrupt("irq")) without workarounds? It is quite
annoying took me a whole day to figure out that wrong code is generated.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.