OK, I'm afraid that I've not got access to that source. But I've tried to compile a file test4.c containing:
volatile int cnt; int main() { while (1) cnt++; return 0; } Using a similar commandline: avr-gcc -DMASTER -Wall -Wstrict-prototypes -g2 -Os -mmcu=atmega128 -mno-tablejump -fpack-struct -fno-common -gdwarf-2 -mcall-prologues -DSTACK_OVERFLOW_CHECK -D'FIRMWARE_BACKUP_START=(0x10000L)' -D'FIRMWARE_BACKUP_END=((0x10000L + (0xE000L - 0L)))' -D'FIRMWARE_START=(0L)' -D'FIRMWARE_END=(0xE000L)' -D'BOOTLOADER_START=(0x1E000L)' -D'BOOTLOADER_END=(0x1FC00L)' -I/srv/home/michael/Projects/rtm/rtm5101 -I/srv/home/michael/Projects/rtm/rtm5101/include -c -o test4.o test4.c avr-ld -mavr5 test4.o /usr/lib/gcc/avr/4.3.4/avr51/libgcc.a -o firmware.elf and that works just fine here. Could you verify that this is working for you too. If thats the case, the problem is most likely in the linker script /srv/home/michael/Projects/rtm/rtm5101/hal/atmega128.lds, which might have to be updated... On Thu, Nov 5, 2009 at 6:10 AM, Michael Ott <mich...@king-coder.de> wrote: > Hello Hakan! > >> what are you trying to compile? > From Pigeon Point: BMR-AVR-AMCm 2.0.0 > >> > Package: binutils-avr >> > Version: 2.20-1 >> > Severity: grave >> > Justification: renders package unusable >> > >> > Compile PPS source code >> > >> > Get the following errors: >> > avr-gcc -DMASTER -Wall -Wstrict-prototypes -g2 -Os -mmcu=atmega128 >> > -mno-tablejump -fpack-struct -fno-common -gdwarf-2 -mcall-prologues >> > -DSTACK_OVERFLOW_CHECK -D'FIRMWARE_BACKUP_START=(0x10000L)' >> > -D'FIRMWARE_BACKUP_END=((0x10000L + (0xE000L - 0L)))' >> > -D'FIRMWARE_START=(0L)' -D'FIRMWARE_END=(0xE000L)' >> > -D'BOOTLOADER_START=(0x1E000L)' -D'BOOTLOADER_END=(0x1FC00L)' >> > -I/srv/home/michael/Projects/rtm/rtm5101 >> > -I/srv/home/michael/Projects/rtm/rtm5101/include -c -o hal.o hal.c >> > echo "SECTIONS { .sdr.file : { sdr_file_start = .; \ >> > *(.data) sdr_file_end = .; }}" > sdr-data.o.lds >> > avr-ld -mavr5 -r -o sdr-data.o -b binary >> > "/srv/home/michael/Projects/rtm/rtm5101/sdr-data.bin" -b elf32-avr -T >> > sdr-data.o.lds >> > rm -f sdr-data.o.lds >> > avr-ld -mavr5 -T/srv/home/michael/Projects/rtm/rtm5101/hal/atmega128.lds >> > -\( init.o hal.o sdr-data.o libhal.o ../app/libapp.o ../lib/lib.a >> > ../app/libcompat/libcompat.a -\) \ >> > /usr/lib/gcc/avr/4.3.4/avr51/libgcc.a -o firmware.elf >> > avr-ld: avr:51 architecture of input file `init.o' is incompatible with >> > avr output >> > avr-ld: avr:51 architecture of input file `hal.o' is incompatible with avr >> > output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(checksum.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(memcmp.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(memcmp_P.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(memcpy.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(memcpy_P.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(memcpy_P_far.o)' >> > is incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(memset.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(parse_tm.o)' is >> > incompatible with avr output >> > avr-ld: avr:51 architecture of input file `../lib/lib.a(hex2int.o)' is >> > incompatible with avr output >> > make[1]: *** [firmware.elf] Error 1 >> > make[1]: Leaving directory `/srv/home/michael/Projects/rtm/rtm5101/hal' >> > make: *** [all] Error 2 >> > >> > Works with testing version of binutils-avr >> > >> > >> > >> > -- System Information: >> > Debian Release: squeeze/sid >> > APT prefers unstable >> > APT policy: (700, 'unstable'), (650, 'testing'), (600, 'stable'), (1, >> > 'experimental') >> > Architecture: i386 (i686) >> > >> > Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core) >> > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) >> > Shell: /bin/sh linked to /bin/dash >> > >> > Versions of packages binutils-avr depends on: >> > ii libc6 2.10.1-5 GNU C Library: Shared >> > libraries >> > ii zlib1g 1:1.2.3.3.dfsg-15 compression library - runtime >> > >> > binutils-avr recommends no packages. >> > >> > Versions of packages binutils-avr suggests: >> > ii binutils 2.20-2 The GNU assembler, linker and >> > bina >> > >> > -- no debconf information >> > >> > >> > >> >> >> >> -- >> Håkan Ardö > CU > > Michael > > -- > ,''`. > : :' : Michael Ott > `. `' e-mail: michael at king-coder dot de > `- > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkryXi4ACgkQC3RUCgaMhSwhNwCdHHtwATcocN3V2WG52nZ2JQzl > UzwAn0q764v3s5H+w8fjNBRZ6oSMeSo5 > =7cwb > -----END PGP SIGNATURE----- > > -- Håkan Ardö -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org