Page 2 of 2

Re: Floating point issue on Raspberry PI

Posted: Sat Dec 01, 2012 5:04 pm
by robu
Hi,

It's the same effect I'm getting just 0.000

Regards,
Robert

Re: Floating point issue on Raspberry PI

Posted: Sat Dec 01, 2012 7:34 pm
by gmb42
Are you sure the object file for chprintf got recompiled? Did you "make clean"? I tripped over that when I was trying to get fp output last week.

Re: Floating point issue on Raspberry PI

Posted: Sat Dec 01, 2012 9:56 pm
by robu
If I don't set the CHPRINTF_USE_FLOAT flag than insted of the number it will print out only a f

Re: Floating point issue on Raspberry PI

Posted: Sat Dec 01, 2012 10:08 pm
by gmb42
OK, I'm out of advice now, it works for me on an STM32F4.

Re: Floating point issue on Raspberry PI

Posted: Sat Dec 01, 2012 10:11 pm
by robu
Thanks for your help.

Re: Floating point issue on Raspberry PI

Posted: Sun Dec 02, 2012 9:10 am
by mabl
Wasn't there once an issue with varargs and floating point? Which also never got solved and the "toolchain" got the blame? I'd wager this is the same case.

What is the status of the raspberry Pi Port? I guess it needs a recommended toolchain and working debugging. OpenOCD should support it, right?

Re: Floating point issue on Raspberry PI

Posted: Mon Dec 03, 2012 11:23 am
by Badger
mabl wrote:Wasn't there once an issue with varargs and floating point? Which also never got solved and the "toolchain" got the blame? I'd wager this is the same case


I've experienced the same issues with STM32. I never found the time to get to the bottom of it, I just printed a scaled integer instead. There's some more info here.

Re: Floating point issue on Raspberry PI

Posted: Mon Dec 03, 2012 2:54 pm
by robu
Thanks for the help, I will give a try.

Re: Floating point issue on Raspberry PI

Posted: Wed Dec 19, 2012 9:02 pm
by robu
Hi,

Finally I figure it out the problem.

There was the stack initialization problem, I added

Code: Select all

mov sp,#0x8000


to the vector.s and now it is working

Robert