This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Problem with ARM port and pow() function
Alle 17:57, martedì 23 ottobre 2007, Nick Clifton ha scritto:
> Are you still compiling for thumb ? If so then the problem might be
> connected to how the first newlib math function calls the second newlib
> function (or how the second one returns). Could you try compiling (and
> linking) in arm mode, to see if this fixes the problem ?
I've tried thumb, arm and interwork modes.
Always the same result: crash.
But this is a good point: maybe the linker uses the incorrect library version
(but I checked the linker reports, and it refers to the correct one) or that
the library is not compiled in the correct mode...
Now I'm going to recompile newlib with -O0 option, and I want also to try
adding in makefiles CFLAGS_TO_TARGET the --mcpu=arm7tdmi-s -gdwarf-2 options.
Let's see the results...
Maybe it would be faster to write my own math library!!!!!!
;-)
> The other possibility is stack corruption. If the return address (from
> the second function to the first function) is held on the stack, and
> some bug in the second function corrupts the stack, then this can cause
> all kinds of mischief. To look for this, step into the second function
> (in the debugger) and then look on the stack for the return address.
I will do that as soon as I have compiled the newlib with -O0 optimization.
Thank you all for your suggestions.
I can't believe to be the only one who really tries to use GNU ARM Toolchain
floating point math functions with ARM7...
Anyone using a real hardware (not simulator) has experienced them?
Fausto