This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

multiply defined linker error with TCP IP stack

Hello everyone,

I'm using the TCP/IP stack in a standalone fashion (i.e. without the RTX OS). The code works when I adapted from an example LEDswitch project. However, when I tried to integrated into my existing project, I'm getting linker errors:

Rebuild target 'SAM9G20 Ext SDRAM'
assembling SAM9G20.s...
compiling EMAC_SAM9G20_Micrel.c...
compiling LEDSwitch.c...
compiling Net_Config.c...
compiling Net_Debug.c...
linking...
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol init_TcpNet multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol main_TcpNet multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol timer_tick multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol localm multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol sys_control multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol get_rnd32 multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol __RL_TCP_VER multiply defined (by at_system.o and at_system.o).
.\Ext_SDRAM\Blinky.axf: Error: L6200E: Symbol $$TCPnet$$version multiply defined (by at_system.o and at_system.o).
Target not created

I thought I'm linking the libraries from different places but I can't seem to find where. I'm linking to TCP_ARM_L.lib and TCPD_ARM_L.lib at C:\Keil\ARM\RV31\LIB\ which is the default install directory. I'm including my own copies of Net_Config.c and Net_Debug.c.

My compiler options are set as:

-c --cpu ARM926EJ-S -D__MICROLIB -g -O0 --apcs=interwork -I.\at91lib -I C:\Keil\ARM\RV31\Inc -I C:\Keil\ARM\CMSIS\Include -I C:\Keil\ARM\Inc\Atmel\SAM9G20 -Dkeil -o ".\Ext_SDRAM\*.o" --omf_browse ".\Ext_SDRAM\*.crf" --depend ".\Ext_SDRAM\*.d"

My assembler options are set as:

--cpu ARM926EJ-S -g --apcs=interwork --pd "__MICROLIB SETA 1" -I C:\Keil\ARM\RV31\Inc -I C:\Keil\ARM\CMSIS\Include -I C:\Keil\ARM\Inc\Atmel\SAM9G20 --pd "SIZE_EXT_INFO SETA 1" --pd "NO_EBI_INIT SETA 1" --pd "NO_SDRAM_INIT SETA 1" --pd "NO_PMC_INIT SETA 1" --pd "VEC_TO_RAM SETA 1" -o "*.o" --depend "*.d"

My linker options are set as:

--cpu ARM926EJ-S *.o --library_type=microlib --strict --scatter ".\Ext_SDRAM\Blinky.sct"
--summary_stderr --info summarysizes --map --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers --list ".\Ext_SDRAM\Blinky.map"
-o .\Ext_SDRAM\Blinky.axf

Does anyone has any insight as to what the problem might be? Thanks!

Lei Zong

0