EmbDev.net

Forum: ARM programming with GCC/GNU tools interrupt attribute


von outer_space (Guest)


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

von Martin Thomas (Guest)


Rate this post
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

von Pete G. (pgasper)


Rate this post
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.

von Martin Thomas (Guest)


Rate this post
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

von Andy X. (andy0815)


Rate this post
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.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.