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

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

RE: [avr-gcc-list] probelms with new avr-gcc from avr-freaks


From: Dafni & Robert Berger
Subject: RE: [avr-gcc-list] probelms with new avr-gcc from avr-freaks
Date: Sat, 6 Jul 2002 15:56:35 +0300


---------------------------------------------------------------------------
Dafni & Robert Berger
Pharmacist & Embedded Systems Software Engineer
Stratigou Rogakou 24
15125 Polydrosso - Maroussi
Athens
Greece
Tel, Fax.: ++30 1 6847881
email: address@hidden
---------------------------------------------------------------------------
Hi Marek,

Thanks for your help.

I hope I am not bothering you too much with my little problems, but I guess
you would like to know them to come from the experimental to a release
version. So let's see it positive as a nice opportunity for both of us.
After being able to successfully build and run m stuff on the Atmega 103 I
would like to switch to the Atmega128, which is the main reason why I would
like to use avr-gcc 3.2. For now I am just testing avr-gcc 3.2 with my code
against 3.0 and 3.0.2 on Windows and 3.0.4 on Linux.

After sniffing around in your library I already figured out today the
changes you are explaining (without using the macro _SFR_IO_ADDR, which I am
using now, and now it compiles (or should I say assembles) happily. (Please
see the file attached).

Unfortunately the linker in unhappy now.

This is what I get:

avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=../LST/test.lst -mmcu
=atmega103 -DDONT_USE_TICK_ISR_FOR_CLK_API
-DONT_USE_TICK_ISR_FOR_TMR_API  -D__AVR_GCC__ -I. -o ../OBJ/test.o test.c
avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=../LST/os_cpu_c.lst -
mmcu=atmega103 -DDONT_USE_TICK_ISR_FOR_CLK_API
-DDONT_USE_TICK_ISR_FOR_TMR_API  -D__AVR_GCC__ -I. -o ../OBJ/os_cpu_c.o
../source/os_cpu_c.c
avr-gcc -c -g -O3 -Wall -Wstrict-prototypes -Wa,-ahlms=../LST/ucos_ii.lst -m
mcu=atmega103 -DDONT_USE_TICK_ISR_FOR_CLK_API
-DDONT_USE_TICK_ISR_FOR_TMR_API  -D__AVR_GCC__ -I. -o ../OBJ/ucos_ii.o
../../../source/ucos_ii.c
avr-gcc -x
assembler-with-cpp  -c -Wa,-gstabs -mmcu=atmega103 -DDONT_USE_TICK_ISR_FOR_C
LK_API  -DDONT_USE_TICK_ISR_FOR_TMR_API
-D__AVR_GCC__ -I. -o ../OBJ/os_cpu_a.o ../source/os_cpu_a.s
avr-gcc ../OBJ/test.o ../OBJ/os_cpu_c.o ../OBJ/ucos_ii.o
./OBJ/os_cpu_a.o  -T/source/avrmega103.x  -Wl,-Map=test.map,--cref -mmcu=atm
ega103  -o test.elf
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.2\..\..\..\..\avr\bin\ld.exe: section
.vector
s [000030be -> 0000311d] overlaps section .data [000030be -> 0000328f]
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.2\..\..\..\..\avr\bin\ld.exe: section
.init2
[0000311e -> 00003129] overlaps section .data [000030be -> 0000328f]
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.2\..\..\..\..\avr\bin\ld.exe: section
.init4
[0000312a -> 00003159] overlaps section .data [000030be -> 0000328f]
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.2\..\..\..\..\avr\bin\ld.exe: section
.init9
[0000315a -> 0000315d] overlaps section .data [000030be -> 0000328f]
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.2\..\..\..\..\avr\bin\ld.exe: section
.fini0
[0000315e -> 0000315f] overlaps section .data [000030be -> 0000328f]
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\3.2\..\..\..\..\avr\lib\avr3\crtm103.o: In
func
tion `__vectors':
../../../crt1/gcrt1.S:40: undefined reference to `__data_end'
../../../crt1/gcrt1.S:41: undefined reference to `__data_load_start'
../../../crt1/gcrt1.S:42: undefined reference to `__data_load_start'
../../../crt1/gcrt1.S:42: undefined reference to `__data_load_start'
../../../crt1/gcrt1.S:46: undefined reference to `__data_end'
D:\AVRGCC\BIN\MAKE.EXE: *** [test.elf] Error 1

I also attach my linker script, which has just minor modifications and my
mapfile.

Can you please help?


Regards,

Robert


---------------------------------------------------------------------------
Dafni & Robert Berger
Pharmacist & Embedded Systems Software Engineer
Stratigou Rogakou 24
15125 Polydrosso - Maroussi
Athens
Greece
Tel, Fax.: ++30 1 6847881
email: address@hidden
---------------------------------------------------------------------------

-----Original Message-----
From: Marek Michalkiewicz [mailto:address@hidden
Sent: Saturday, July 06, 2002 1:53 PM
To: Klaus Rudolph
Cc: address@hidden; AVR GCC List
Subject: Re: [avr-gcc-list] probelms with new avr-gcc from avr-freaks

Hi,

> > os_cpu_a.s:181: Error: number must be less than 64

Replace SPL with _SFR_IO_ADDR(SPL) and so on with any other I/O register
names in asm sources.  I tried to maintain compatibility with existing C
sources, but asm sources need changes.

If you want the same asm source to build with older tools, just add this
in your asm sources:

#ifndef _SFR_IO_ADDR
#define _SFR_IO_ADDR(x) x
#endif

> > os_cpu_a.s:317: Warning: rest of line ignored; first ignored character
is
> > `('
> > os_cpu_a.s:318: Error: unknown opcode `_vector'

#define _VECTOR(N) __vector_ ## N

Actually it's already defined in <avr/sfr_defs.h> but only for C programs.
Move it above the "#ifndef __ASSEMBLER__" and it should work fine...
(I'll fix it in avr-libc CVS later.)

> I run in the same trouble, all my projects are
> not able to compile! My PC, a P100 needs the complete night to do the
> compilations of binutils, libc and gdb & gcc, and now all
> can be rebuild to older version :-(((((

All I can suggest is to get some old inexpensive P2/Celeron/K6-2 box
(but avoid the old Celerons without the L2 cache; GCC is large, so cache
size can make a big difference in speed) with 64 MiB (or better 128 MiB)
of RAM.  But don't throw away that old P100 - it's still a fine box for
use as a DSL router/firewall, or even a small server, for example...

> Is there any compiler switch, or is this a real bug.

Some bugs and some backwards compatibility issues, as you can see.
It's normal, remember that it's still a development version which is
being broken and fixed all the time ;)

Marek

Attachment: tmp.zip
Description: application/compressed


reply via email to

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