In my project I must use float numbers, but on compiling I become this error: undefined reference to `__aeabi_ui2f' undefined reference to `__aeabi_fdiv' I start the linker with this command: arm-none-eabi-ld -v -lgcc -LC:/WinARM/CodeSourcery/lib/gcc/arm-none-eabi/4.2.3/thumb -Tprj/STM32F103CB-ROM.ld -Map=main.map out/lib/src/cortexm3_macro.o out/src/main.o out/src/stm32f10x_it.o out/src/stm32f10x_vector.o out/src/analogout.o --output main.elf The path from parameter -L exists, the file libgcc.a, too. Or have I forgot a parameter? Thank you for help. Regards Markus.
I've used Both Keil version 3.22 ( Free version 32K) and IAR EWARM v5.11 ( Free version 32K) , not yet GCC from CodeSourcery on a small routine using ''cos(), sin(), one addition , one multiplication and one division with only ''float'' variables using Keil ''MCBSTM32'' board at 8Mhz and I found that the same function is 7 time faster with IAR than using Keil floating librairies. I' very intersted to see the result with GCC :) and I'm wondering if you have experienced similar results ? which seems very strange and keil is not providing optimized floating libraries. Best Regards, Asterix. Ps: I've used #include ''math.h'' in the header files. [ This message was edited by: asterix.magigimix on 10-06-2008 17:47 ]
I've done some basic measurements with RVCT ( Keil 3.22) and EWARM 5.11 from IAR using our Cortex-M3 and here is my function : #include #define __pi 3.14159265 float var1 = __pi ; float var2 = __pi/2; float var0[10] = {0,0,0,0,0,0,0,0,0,0}; int main(void) { var0[0]= cos(var1); var0[1]= sin(var1); var0[2]= sqrt(var1); var0[3]= atan(var1); var0[4]= var2 + var1; var0[5]= var2 * var1; var0[6]= var2 / var1; while(1); } Results are : Cortex-M3, Keil 3.22 compiler 32 bit floats,exact CPU cyclescos 41359 sin 43389 sqrt 3090 atan 42243 add 127 mul 624 div 445 Cortex-M3, IAR 5.11 compiler 32 bit floats,exact CPU cyclescos 1864 sin 1946 sqrt 2725 atan 3423 add 40 mul 33 div 53 I'm quite surprised too by the results, where I see that keil is completely off while using trigonometric libraries. May be I'm missing something here ? Could you please try the same at your end and tell me your results for GCC from codesourcery. Cheers, STOne-32.
i would check with a newer arm-eabi compiler, floating point performance is supposed to have improved quite a bit over the older arm-elf compiler. Cheers sjo