avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Undefined reference to `__udivmodqi4'


From: Yuri Vignoli
Subject: [avr-gcc-list] Undefined reference to `__udivmodqi4'
Date: Mon, 07 Feb 2005 13:19:47 +0100
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

Hi,

I have some problems with   with division and module operation ,
When i try to make the follow error appears:

>"C:\WinAVR\utils\bin\make.exe" all
avr-gcc -Os -g3 -Wall -ffreestanding -mmcu=atmega8 -nostdlib -Wa,-adhlns=RTC.lst -c -o RTC.o RTC.c avr-gcc -Wl,-Map=prova.map -nostdlib -Wl,--script=rom.ld -lgcc -o prova.out com.o rele.o main.o ios_kern.o led.o serialflash.o RTC.o vectors.o dcpy.o
RTC.o(.text+0x12a): In function `RTC_Write':
C:\Lavori\Gesca/RTC.c:134: undefined reference to `__udivmodqi4'
RTC.o(.text+0x138):C:\Lavori\Gesca/RTC.c:135: undefined reference to `__udivmodqi4' RTC.o(.text+0x148):C:\Lavori\Gesca/RTC.c:136: undefined reference to `__udivmodqi4' RTC.o(.text+0x156):C:\Lavori\Gesca/RTC.c:137: undefined reference to `__udivmodqi4' RTC.o(.text+0x168):C:\Lavori\Gesca/RTC.c:138: undefined reference to `__udivmodqi4' RTC.o(.text+0x174):C:\Lavori\Gesca/RTC.c:139: more undefined references to `__udivmodqi4' follow
C:\WinAVR\utils\bin\make.exe: *** [prova.out] Error 1

> Process Exit Code: 2

The errors is in this funtion :

void RTC_Write(Time_t *t)
{
 RTC_t s;
 int i;
 u8_t *p = (u8_t*)&s;

 s.sech   = t->secondi/10;
 s.secl   = t->secondi%10;
 s.minh   = t->minuti/10;
 s.minl   = t->minuti%10;
 s.oreh   = t->ore/10;
 s.orel   = t->ore%10;
 s.day    = t->giorno+1;
 s.datah  = t->data/10;
 s.datal  = t->data%10;
 s.meseh  = t->mese/10;
 s.mesel  = t->mese%10;
 s.annoh  = t->anno/10;
 s.annol  = t->anno%10;
.............
................

The Time_t definition is the follow:

typedef struct
{
 u8_t secondi;
 u8_t minuti;
 u8_t ore;
 u8_t giorno;
 u8_t data;
 u8_t mese;
 u8_t anno;
} Time_t;

In my make file i have included:

LDFLAGS = -Wl,-Map=$(@:.out=.map) -nostdlib -Wl,--script=rom.ld -lgcc

I don't understand why it fails, can someone  help me ?

Thanks

Yuri Vignoli.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]