This is the mail archive of the
mailing list for the eCos project.
Re: idle_thread_loops with arm-eabi-gcc
- From: Andrew Lunn <andrew at lunn dot ch>
- To: "Heidet, Christophe" <Christophe dot Heidet at Gunnebo dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 13 Aug 2009 14:29:13 +0200
- Subject: Re: [ECOS] idle_thread_loops with arm-eabi-gcc
- References: <A8132EA223573C4399933F12BF4B62DA01D51454@frbdhmail01.gunnebo.net>
On Wed, Aug 12, 2009 at 09:08:54AM +0200, Heidet, Christophe wrote:
> I have a strange problem with arm-eabi-gcc.
> I use the version from ecos website : arm-eabi-gcc V4.3.2
> If I build with the -O2 optimization flag, I can't use the cpuload
> package, because the "idle_thread_loops" never increase ...
> If I decrease the optimization (to -O0) I have no problem and the
> cpuload works very well.
> Does anybody have a solution ? instead of decrease the optimization ...
Try making idle_thread_loops volatile. That might stop the compiler
from optimizing out the increment.
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss