[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Undefined reference to `__udivmodqi4'
From: |
Yuri Vignoli |
Subject: |
Re: [avr-gcc-list] Undefined reference to `__udivmodqi4' |
Date: |
Mon, 07 Feb 2005 15:28:41 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (Windows/20041103) |
Ben Mann wrote:
Remove -nostdlib from your make command.
Ben Mann
-----Original Message-----
From: address@hidden [mailto:address@hidden
On Behalf Of Yuri Vignoli
Sent: Monday, 7 February 2005 8:20 PM
To: address@hidden
Subject: [avr-gcc-list] Undefined reference to `__udivmodqi4'
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.
_______________________________________________
avr-gcc-list mailing list
address@hidden http://www.avr1.org/mailman/listinfo/avr-gcc-list
I try to remove it and I abtain the following errors :
"C:\WinAVR\utils\bin\make.exe" all
avr-gcc -Wl,-Map=prova.map -Wl,--script=rom.ld -o prova.out com.o
rele.o main.o ios_kern.o led.o serialflash.o RTC.o vectors.o dcpy.o
C:\WinAVR\bin\..\lib\gcc\avr\3.4.1\..\..\..\..\avr\bin\ld.exe: section
.vectors [000002ff -> 00000318] overlaps section .text [00000026 ->
00000f23]
C:\WinAVR\bin\..\lib\gcc\avr\3.4.1\..\..\..\..\avr\bin\ld.exe: section
.init2 [00000319 -> 00000324] overlaps section .text [00000026 -> 00000f23]
C:\WinAVR\bin\..\lib\gcc\avr\3.4.1\..\..\..\..\avr\bin\ld.exe: section
.init9 [00000325 -> 00000326] overlaps section .text [00000026 -> 00000f23]
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.text+0x0):
In function `__vector_12':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x2):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x4):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x6):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x8):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0xa):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0xc):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0xe):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x10):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x12):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x14):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x16):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.vectors+0x18):
In function `__vector_default':
: internal error: out of range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1/../../../../avr/lib/crts8515.o(.init9+0x0):
internal error: out of range error
RTC.o(.text+0x12a): In function `RTC_Write':
c:\lavori\gesca/RTC.c:134: internal error: out of range error
RTC.o(.text+0x138):c:\lavori\gesca/RTC.c:135: internal error: out of
range error
RTC.o(.text+0x148):c:\lavori\gesca/RTC.c:136: internal error: out of
range error
RTC.o(.text+0x156):c:\lavori\gesca/RTC.c:137: internal error: out of
range error
RTC.o(.text+0x168):c:\lavori\gesca/RTC.c:138: internal error: out of
range error
RTC.o(.text+0x174):c:\lavori\gesca/RTC.c:139: internal error: out of
range error
RTC.o(.text+0x192):c:\lavori\gesca/RTC.c:141: internal error: out of
range error
RTC.o(.text+0x1a2):c:\lavori\gesca/RTC.c:142: internal error: out of
range error
RTC.o(.text+0x1b4):c:\lavori\gesca/RTC.c:143: internal error: out of
range error
RTC.o(.text+0x1c6):c:\lavori\gesca/RTC.c:144: internal error: out of
range error
RTC.o(.text+0x1d8):c:\lavori\gesca/RTC.c:145: internal error: out of
range error
RTC.o(.text+0x1e0):c:\lavori\gesca/RTC.c:146: internal error: out of
range error
C:/WinAVR/bin/../lib/gcc/avr/3.4.1\libgcc.a(_clear_bss.o)(.init4+0x0):
In function `__do_clear_bss':
: undefined reference to `__bss_end'
C:/WinAVR/bin/../lib/gcc/avr/3.4.1\libgcc.a(_clear_bss.o)(.init4+0x2):
In function `__do_clear_bss':
: undefined reference to `__bss_start'
C:/WinAVR/bin/../lib/gcc/avr/3.4.1\libgcc.a(_clear_bss.o)(.init4+0x4):
In function `__do_clear_bss':
: undefined reference to `__bss_start'
C:/WinAVR/bin/../lib/gcc/avr/3.4.1\libgcc.a(_clear_bss.o)(.init4+0xa):
In function `.do_clear_bss_start':
: undefined reference to `__bss_end'
C:\WinAVR\utils\bin\make.exe: *** [prova.out] Error 1
> Process Exit Code: 2
Any other solution.
Thanks
Yuri Vignoli