Problem with ARM port and pow() function

Fau Marz
Wed Oct 17 10:45:00 GMT 2007

Alle 19:45, martedì 16 ottobre 2007, Nick Clifton ha scritto:

> > Or if you need the .ld linker script, I can email you.
> Yes to that as well please. :-)
> In fact maybe you can create a stripped, compressed binary that I could try 
> running directly to see if I can make the problem occur for me too.

I'm going to post it to your email, not to the list.
(i think that the list do not allow attachments)

> Hmm - well I made myself a fake lpc210x_gnuarm.h header file and built the 
> test code with that - and it works.  (Well it goes into an infinite loop, 
> which is what you would expect.  It does not seg-fault).  I suspect that 
> there must be some other problem here.

I think that it can be a link/init problem, but I can't understand what's 

> I do note that you are invoking pow() inside a function called "delay()".  
> Is the sole purpose of this loop to waste time ?  If so then there are 
> better ways of doing this than calling math functions.

I have to use the pow() function in another real project. I wanted to test how 
much time it needs for the pow() function to be executed on my hardware, so I 
made this simple test loop.

> I built the test this way and it still worked for me.  Note however I am 
> using a simulator to run both versions of the test, not actually having any 
> ARM hardware.  Maybe you are running into an illegal instruction trap ?  

Maybe it's so. But I'm not sure I can trap this with insight and the jtag 
debugger. I'll try to see what I can understand.

> > Then I tried to compile my own arm-elf toolchain with the following 
> > configuration:
> Did the problem still occur with this home built arm-elf toolchain ?

Yes, it's the same.


More information about the Newlib mailing list