cancel
Showing results for 
Search instead for 
Did you mean: 

ST7 Library reentrant ?

mueller2
Associate II
Posted on January 29, 2004 at 08:38

ST7 Library reentrant ?

3 REPLIES 3
mueller2
Associate II
Posted on January 28, 2004 at 09:41

Hi

Can anyone tell me whether ST7 library routines are reentrant, or if it possible to select between reentrant and non reentrant libraries.

I'm using Metrowerks/ Hiware and the device is ST72324 and i'm troubleshooting software crashes.

Kurt
sjo
Associate II
Posted on January 29, 2004 at 06:10

As far as I am aware metrowerks is not reentrant, because by default they use an overlap segment.

You can override this by using the #pragma NO_OVERLAP.

This is why I prefer cosmic because all functions when used with a static memory model are reentrant, or use @stack with simulated stack models.

Also most of the software libs are accessing hardware so they cannot be reentrant, because hardware registers are as such a static variable.

Hope this helps.

sjo
mueller2
Associate II
Posted on January 29, 2004 at 08:38

Thanks for your answer sjo.

We have now traced the problem down to a few code lines with shift instructions on 32bit variables.

We also found a note in the library source files that says

''WARNING:

32bit routines are NOT reentrant (i.e. _L* and _F*).''

So we are now rewriting this part of our code, to get rid of the shift operation.

We believe there is a god chance that we found the problem.

Kurt