[arm-gnu] Cortex-M3 and Floating Point Problems

Mark Mulrooney mmulrooney at teledyne.com
Thu Jun 21 13:06:40 UTC 2012


Hi

Were using the arm-none-eabi to compile for an STM32F103ZG and we seem to be having trouble with floating point operations. The code compiles fine and when I look at the list file I see the calls to the float library functions. We are compiling with the following options -mthumb -mcpu=cortex-m3 -msoft-float.

The problem is no floating point operations seem to work on the system. As a simple test I tried the following:
float test1 = 10.1234;
float test2 = .5678
float answer = test1 * test2
printf("Answer: %f\r\n", answer);

It printed out Answer: 0.000000.

I was wondering if it may be pulling in arm libraries instead of thumb or something like that. Any help would be greatly appreciated.

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/arm-gnu/attachments/20120621/176800d6/attachment.html>


More information about the arm-gnu mailing list