What is the reason for the inability to divide numbers in GCC

I have a very strange situation. Every time I try to compile my arm project (LPC2378, codeourcery arm-none-eabi-gcc-4.5.1), I remain with the same error until the link

/media/data/Projects/arm/uart/main.c:39: undefined reference to `__aeabi_uidiv'
/media/data/Projects/arm/uart/main.c:40: undefined reference to `__aeabi_uidiv'

The violation code is as follows:

U0DLL = ((((PLLCFG & 0x7FFF) + 1) * F_OSC) / ((((PLLCFG & (0xFF << 16)) >> 16) + 1) * ((CCLKCFG & 0xFF) + 1) * 8 * BAUD * 1)) % 256;
U0DLM = ((((PLLCFG & 0x7FFF) + 1) * F_OSC) / ((((PLLCFG & (0xFF << 16)) >> 16) + 1) * ((CCLKCFG & 0xFF) + 1) * 8 * BAUD * 1)) / 256;

I searched around and that it could be caused by AFAICT without using lgcc and lc for LD. I resolved this, and still the error remains.

The full project can be found in my github registry .

If anyone can help, that will be very welcome. Greetings.

+5
source share
5 answers

ARM . , . GCC ( ) __aeabi_uidiv ( unsigned int ).

, .

+10

toolchain - , gcc ARM EABI, (libgcc?) ABI?

+2

, libgcc.a Makefile. , :

"-L*path_to_libgcc.a* -lgcc" 

LDFLAGS

+2

, , . () gcc, , gcc . .., , . Googling, , linux eabi, , , , , .

0

, libgcc.a codeourcery, . TI starterware, libgcc.a make .

0

All Articles