Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | winarm errors

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

winarm errors - Soori - Nov 7 3:04:37 2009

When i try to make file i get error:

Linking: main.elf
arm-elf-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -Os -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
-Wa,-adhlns=main.o -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o uart.o
crt0.o --output main.elf -nostartfiles -Wl,-Map=main.map,--cref -lc -lm
-lc -lgcc -TLPC2148-ROM.ld
uart.o: In function `UART_Init':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: multiple
definition of `UART_Init'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: first
defined here
uart.o: In function `DelayNS':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: multiple
definition of `DelayNS'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: first
defined here
uart.o: In function `UART_SendByte':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: multiple
definition of `UART_SendByte'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: first
defined here
uart.o: In function `UART_ReceiveByte':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: multiple
definition of `UART_ReceiveByte'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: first
defined here
uart.o: In function `UART_SendString':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: multiple
definition of `UART_SendString'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: first
defined here
uart.o: In function `PLL_Init':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: multiple
definition of `PLL_Init'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: first
defined here
uart.o: In function `SYSTEM_Init':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: multiple
definition of `SYSTEM_Init'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: first
defined here
uart.o: In function `Serial_Dec':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: multiple
definition of `Serial_Dec'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: first
defined here
uart.o: In function `Serial_String_Dec':
c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: multiple
definition of `Serial_String_Dec'
main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: first
defined here
collect2: ld returned 1 exit status
make.exe: *** [main.elf] Error 1
plz any one can help
thanks & regards,
suresh
[Non-text portions of this message have been removed]

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: winarm errors - capiman26061973 - Nov 7 3:58:48 2009



Hello,

error message is

> multiple definition of `UART_Init'

So look if UART_Init is defined in uart.c and main.c

Perhaps you have moved functions from main.c to uart.c and forgot to recompile or delete old main.o and uart.o ?

Regards,

Martin

--- In l...@yahoogroups.com, Soori wrote:
>
> When i try to make file i get error:
>
> Linking: main.elf
> arm-elf-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -Os -funsigned-char
> -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
> -Wa,-adhlns=main.o -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o uart.o
> crt0.o --output main.elf -nostartfiles -Wl,-Map=main.map,--cref -lc -lm
> -lc -lgcc -TLPC2148-ROM.ld
> uart.o: In function `UART_Init':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: multiple
> definition of `UART_Init'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: first
> defined here
> uart.o: In function `DelayNS':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: multiple
> definition of `DelayNS'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: first
> defined here
> uart.o: In function `UART_SendByte':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: multiple
> definition of `UART_SendByte'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: first
> defined here
> uart.o: In function `UART_ReceiveByte':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: multiple
> definition of `UART_ReceiveByte'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: first
> defined here
> uart.o: In function `UART_SendString':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: multiple
> definition of `UART_SendString'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: first
> defined here
> uart.o: In function `PLL_Init':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: multiple
> definition of `PLL_Init'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: first
> defined here
> uart.o: In function `SYSTEM_Init':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: multiple
> definition of `SYSTEM_Init'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: first
> defined here
> uart.o: In function `Serial_Dec':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: multiple
> definition of `Serial_Dec'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: first
> defined here
> uart.o: In function `Serial_String_Dec':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: multiple
> definition of `Serial_String_Dec'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: first
> defined here
> collect2: ld returned 1 exit status
> make.exe: *** [main.elf] Error 1
> plz any one can help
> thanks & regards,
> suresh
> [Non-text portions of this message have been removed]
>

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: winarm errors - rtstofer - Nov 7 8:44:56 2009



--- In l...@yahoogroups.com, Soori wrote:
>
> When i try to make file i get error:
>
> Linking: main.elf
> arm-elf-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -Os -funsigned-char
> -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
> -Wa,-adhlns=main.o -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o uart.o
> crt0.o --output main.elf -nostartfiles -Wl,-Map=main.map,--cref -lc -lm
> -lc -lgcc -TLPC2148-ROM.ld
> uart.o: In function `UART_Init':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: multiple
> definition of `UART_Init'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: first
> defined here
> uart.o: In function `DelayNS':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: multiple
> definition of `DelayNS'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: first
> defined here
> uart.o: In function `UART_SendByte':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: multiple
> definition of `UART_SendByte'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: first
> defined here
> uart.o: In function `UART_ReceiveByte':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: multiple
> definition of `UART_ReceiveByte'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: first
> defined here
> uart.o: In function `UART_SendString':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: multiple
> definition of `UART_SendString'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: first
> defined here
> uart.o: In function `PLL_Init':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: multiple
> definition of `PLL_Init'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: first
> defined here
> uart.o: In function `SYSTEM_Init':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: multiple
> definition of `SYSTEM_Init'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: first
> defined here
> uart.o: In function `Serial_Dec':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: multiple
> definition of `Serial_Dec'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: first
> defined here
> uart.o: In function `Serial_String_Dec':
> c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: multiple
> definition of `Serial_String_Dec'
> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: first
> defined here
> collect2: ld returned 1 exit status
> make.exe: *** [main.elf] Error 1
> plz any one can help
> thanks & regards,
> suresh
> [Non-text portions of this message have been removed]
>

The linker is complaining that you have functions defined within other functions and defined multiple times.

Take the first issue UART_Init. Apparently it is defined inside DelayNS. This seems unlikely but there must be something happening inside DelayNS that is confusing the linker. From what you have posted, the compiler seems happy. But maybe you didn't post the compiler errors.

After you solve the problem with DelayNS, you will know how to correct the other issues.

Richard

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: winarm errors - Dick Balaska - Nov 7 21:43:13 2009

It looks to me like main.c has a
#include "uart.c"
AND uart.c is built on its own.

dik

Am 11/7/2009 8:41 AM, also sprach rtstofer:
> --- In l...@yahoogroups.com, Soori wrote:
>
>> When i try to make file i get error:
>>
>> Linking: main.elf
>> arm-elf-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -Os -funsigned-char
>> -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
>> -Wa,-adhlns=main.o -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o uart.o
>> crt0.o --output main.elf -nostartfiles -Wl,-Map=main.map,--cref -lc -lm
>> -lc -lgcc -TLPC2148-ROM.ld
>> uart.o: In function `UART_Init':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: multiple
>> definition of `UART_Init'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:10: first
>> defined here
>> uart.o: In function `DelayNS':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: multiple
>> definition of `DelayNS'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:32: first
>> defined here
>> uart.o: In function `UART_SendByte':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: multiple
>> definition of `UART_SendByte'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:38: first
>> defined here
>> uart.o: In function `UART_ReceiveByte':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: multiple
>> definition of `UART_ReceiveByte'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:51: first
>> defined here
>> uart.o: In function `UART_SendString':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: multiple
>> definition of `UART_SendString'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:64: first
>> defined here
>> uart.o: In function `PLL_Init':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: multiple
>> definition of `PLL_Init'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:103: first
>> defined here
>> uart.o: In function `SYSTEM_Init':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: multiple
>> definition of `SYSTEM_Init'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:117: first
>> defined here
>> uart.o: In function `Serial_Dec':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: multiple
>> definition of `Serial_Dec'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:127: first
>> defined here
>> uart.o: In function `Serial_String_Dec':
>> c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: multiple
>> definition of `Serial_String_Dec'
>> main.o:c:\documents and settings\es\desktop\uarts_winarm/uart.c:142: first
>> defined here
>> collect2: ld returned 1 exit status
>> make.exe: *** [main.elf] Error 1
>> plz any one can help
>> thanks & regards,
>> suresh
>> [Non-text portions of this message have been removed]
>>
>>
>
> The linker is complaining that you have functions defined within other functions and defined multiple times.
>
> Take the first issue UART_Init. Apparently it is defined inside DelayNS. This seems unlikely but there must be something happening inside DelayNS that is confusing the linker. From what you have posted, the compiler seems happy. But maybe you didn't post the compiler errors.
>
> After you solve the problem with DelayNS, you will know how to correct the other issues.
>
> Richard
> ------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )