[En-Nut-Discussion] GCC optimizations

Coleman Brumley cbrumley at polarsoft.biz
Tue Mar 17 14:23:06 CET 2009



> Hi,

Hi Ole. Thanks for replying.   

> 
> > My H/W platform is based on the AT91SAM7X256.  Has anyone else had
> > trouble
> > with the YAGARTO tools when working with this CPU?
> >
> I'm using a self build arm-elf-gcc toolchain on Ubuntu Linux for this
> CPU without any problems ever. 

That's reassuring news.  Thank you.  

> Perhaps you should try the new 4.8 NutOS
> version / release candidate and implement the abort handler to see
> where
> a data abort is happening.
> 

I've implemented the abort handlers in 4.6.4 based on those that Harald
provided at http://www.ethernut.de/en/documents/arm-exceptions.html.

I will try the 4.8 version as soon as I get a chance.  If I understand the
abort handling in 4.8, it has a stack trace, also.  That would be beneficial
in trying to further track this down.  Am I mistaken about this?

> Dataaborts could result (randomly) from stack overflows. You might
> check
> if you gave your threads enough stack space. The resulting data aborts
> might occur quite randomly as the stack usage is not always
> deterministic and in case of an underrun there might be any (non
> deterministic) data from other threads overwritten. This might (also
> non
> determinstic) lead to a data abort condition in some situtions.

In the cases where the data aborts occur, it's always in NutThreadSwitch or
NutThreadKill.  

> 
> So first I'd check the stack spaces, perhaps output the current usage
> from time to time (see demo code below) and also implement the data
> abort handler.

Which demo code were you referring to?  This would be useful in a diagnostic
page on our product.  

> 
> Bye,
> 
> Ole
> 
> --
>  _____________________________________________________________
> |                                                             |
> | Embedded-IT          Hard- und Softwarelösungen             |
> |                                                             |
> | Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
> | Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
> | 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
> | Germany              Web:         http://www.embedded-it.de |
> |                      UstID / VAT:       DE198944716         |
> |_____________________________________________________________|





More information about the En-Nut-Discussion mailing list