2004-01-28 11:38 PM
2004-01-28 12:41 AM
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. Kurt2004-01-28 09:10 PM
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. sjo2004-01-28 11:38 PM
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