From: GDan on 1 Dec 2007 19:22 Look, I'm having a real battle with GNUARM. I just can not get rid of all of these multiple definition include problems between device.c and board.c, both of which Atmel wrote. -------- begin (mode: ROM_RUN) -------- arm-elf-gcc (GCC) 4.2.0 Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Assembling (ARM-only): startup.S arm-elf-gcc -c -mcpu=arm7tdmi -I. -x assembler-with-cpp -Ilib/ AT91SAM7S256 -DROM_RUN -DAT91SAM7S256 -Wa,-adhlns=st artup.lst,--gdwarf-2 startup.S -o startup.o Compiling C: main.c arm-elf-gcc -c -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -DAT91SAM7S256 -DAT91SAM7SEK -Ilib/AT91SAM7S256 -Os -Wall - Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls - Wreturn-type -Wshadow -Wunused -Wa,-adhlns=main ..lst -MD -MP -MF .dep/main.o.d -Wnested-externs -std=gnu89 main.c - o main.o Compiling C: core/device.c arm-elf-gcc -c -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -DAT91SAM7S256 -DAT91SAM7SEK -Ilib/AT91SAM7S256 -Os -Wall - Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls - Wreturn-type -Wshadow -Wunused -Wa,-adhlns=core /device.lst -MD -MP -MF .dep/device.o.d -Wnested-externs -std=gnu89 core/device.c -o core/device.o Compiling C: core/board.c arm-elf-gcc -c -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -DAT91SAM7S256 -DAT91SAM7SEK -Ilib/AT91SAM7S256 -Os -Wall - Wcast-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls - Wreturn-type -Wshadow -Wunused -Wa,-adhlns=core /board.lst -MD -MP -MF .dep/board.o.d -Wnested-externs -std=gnu89 core/board.c -o core/board.o Linking: main.elf arm-elf-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -DAT91SAM7S256 - DAT91SAM7SEK -Ilib/AT91SAM7S256 -Os -Wall -Wca st-align -Wimplicit -Wpointer-arith -Wswitch -Wredundant-decls - Wreturn-type -Wshadow -Wunused -Wa,-adhlns=startup ..lst -MD -MP -MF .dep/main.elf.d startup.o main.o core/device.o core/board.o --output main.elf -nostartfile s -Wl,-Map=main.map,--cref -lc -lm -lc -lgcc -Llib/AT91SAM7S256 - Tld/AT91SAM7S256/AT91SAM7S256-ROM.ld core/device.o: In function `AT91F_AIC_ConfigureIt': lib/AT91SAM7S256/lib_AT91SAM7S256.h:64: multiple definition of `AT91F_AIC_ConfigureIt' My map file with the cross reference table looks like this: Cross Reference Table Symbol File AT91F_ADC_CfgModeReg core/board.o core/device.o main.o AT91F_ADC_CfgPIO core/board.o core/device.o main.o AT91F_ADC_CfgPMC core/board.o core/device.o main.o ..... etc. ..... All of those functions are defined as "inline". The original make file used -std=gnu99 (came from WinARM) which in my reading kind of rules out the inlines, so I reverted the flag to -std=gnu89, everything as you can see compiles but the dam thing just won't link. DC
|
Pages: 1 Prev: Excel-RS232 via Cheapcomm: Where? Next: PIC32 starter kit impressions |