2009-05-28 04:24 AM
Compilling with float?
2011-05-17 03:36 AM
Hello,
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.2011-05-17 03:36 AM
Quote:
In my project I must use float numbers,
Must you? Why? In very many cases, integers or fixed-point are preferable - especially if you can't get the floating-point to work! 8-)2011-05-17 03:36 AM
I must. I have from a other project a lot of sources and I have not enought time to change inito integer.
2011-05-17 03:36 AM
Try calling the linker using the gcc driver, it will probably solve your problem, eg.
arm-none-eabi-gcc -Wl,-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 -o main.elf Cheers sjo [ This message was edited by: sjo on 10-06-2008 15:08 ]2011-05-17 03:36 AM
In a other forum have one person write me the right solution:
''Häng das -lgcc mal hinter die Liste von *.o Files.''2011-05-17 03:36 AM
yes but if you use gcc to link then you will not have a issue.
I have never understand why people call ld directly. Cheers sjo2011-05-17 03:36 AM
Hi all,
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 ]2011-05-17 03:36 AM
Yes, the arm-none-eabi-gcc can linking, too, and it is working.
Thank you for help.2011-05-17 03:36 AM
Floating point execution times can vary widely between different version of compliers, see ARM GNU below,
I'm in the same boat as you, need floating point, all the integer processors suck at it (figure 100 times slower as a first estimate), below are some times I and a friend compiled, if anyone has any more data, please add on to the list below, thanks! MPS430, 32 bit floats, imagecraft complier, typical cycles add 158 sub 184 mul 332 div 620 AVR, IAR Full opt for speed, 32 bit floats, typical cycles add 173 sub 176 mul 175 div 694 sqrt 2586 log 3255 ARM7, GNU 3.3.1 complier 32 bit floats, typical cycles add 472 sub 478 mul 439 div 652 sqrt 2387 log 13,523 ARM7, GNU 3.4.3 complier 32 bit floats, typical cycles add 73 sub 74 mul 428 div 142 8051, keil complier, 32 bit floats, typical cycles add 199 sub 201 mul 219 div 895 sqrt 1117 log 2006