Floating point issue on Raspberry PI

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: Floating point issue on Raspberry PI

Post by robu »

Hi,

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

Regards,
Robert
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: Floating point issue on Raspberry PI

Post 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.
robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: Floating point issue on Raspberry PI

Post by robu »

If I don't set the CHPRINTF_USE_FLOAT flag than insted of the number it will print out only a f
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: Floating point issue on Raspberry PI

Post by gmb42 »

OK, I'm out of advice now, it works for me on an STM32F4.
robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: Floating point issue on Raspberry PI

Post by robu »

Thanks for your help.
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: Floating point issue on Raspberry PI

Post 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?
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: Floating point issue on Raspberry PI

Post 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.
robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: Floating point issue on Raspberry PI

Post by robu »

Thanks for the help, I will give a try.
robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: Floating point issue on Raspberry PI

Post 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
Post Reply