|
From: | Moshe Drori |
Subject: | [Savannah-help-public] Seems to be a problem with stdio under AVR- avr-libc |
Date: | Wed, 19 Oct 2005 15:54:56 +0200 |
Dear Sir,
Please your advice.I think such a
problem with avr-libc..( also under powerpc but previously I hope to undersdand
this issue under AVR ATmega32).
I build a AVR
GCC environment by the following
components
gcc-4.0.0.tar.bz2
avr-libc-1.2.3.tar.tar
Fitting
to Avr
$ ../gcc –4.0.0/configure –-target=avr –-enable –languages=”c” –-
enable –multilib
$./ configure - -with-multisubdir
=avr5
The following example caused to a following linker
problem
it’s work well under Eclipse IDE till to a simple C' stdio.h
commnd – sprintf
char buff[20];
sprintf (buff, "%s%d",
"my_test",100);
make -k all
avr-gcc -mmcu=atmega32 -O2 -Wpadded
-g3 -c -o main.o main.c
avr-gcc -mmcu=atmega32 -O2 -Wpadded
-g3 -c -o appl.o appl.c
avr-gcc -mmcu=atmega32 -O2 -Wpadded
-g3 -c -o asip.o asip.c
avr-gcc -mmcu=atmega32 -O2 -Wpadded
-g3 -c -o service.o service.c
avr-gcc -mmcu=atmega32 -O2 -Wpadded -g3
-Wl,-Map,Servo.map -o Servo.elf main.o appl.o asip.o
service.o
/usr/local/lib/gcc/avr/4.0.0/../../../../avr/lib/avr5/libc.a(vfprintf_std.o)(.text+0x98):
In function
`vfprintf':
/gnu_src/avr-libc-1.2.3/libc/stdio/./vfprintf.c:159: undefined
reference to `__mulhi3'
make: *** [Servo.elf] Error
1
make: Target `all' not remade because of errors.
it’s working well only without %d – It’s insignificant for
me
sprintf (buff, "%s", "my_test");
ake -k all
avr-gcc
-mmcu=atmega32 -O2 -Wpadded -g3 -c -o main.o main.c
avr-gcc
-mmcu=atmega32 -O2 -Wpadded -g3 -c -o appl.o appl.c
avr-gcc
-mmcu=atmega32 -O2 -Wpadded -g3 -c -o asip.o asip.c
avr-gcc
-mmcu=atmega32 -O2 -Wpadded -g3 -c -o service.o service.c
avr-gcc
-mmcu=atmega32 -O2 -Wpadded -g3 -Wl,-Map,Servo.map -o Servo.elf main.o
appl.o asip.o service.o
avr-objcopy -O ihex Servo.elf
Servo.hex
avr-objdump -h Servo.elf > Servo.dump
What can be the problam ? Exactly under PC enviroments it's ok. the
problam is only avr
I’ll appreciate if u can response me regarding to
this issue or forward me to other direction.
Thanks and Best Regards
Moshe
Drori
[Prev in Thread] | Current Thread | [Next in Thread] |