Problem with build in MPC5675k due to linker error.
Posted: Fri Apr 15, 2016 9:29 am
Using codewarrior 2.10 for MPC55xx/MPC56xx
and cygwin environment.
Using RT-Druid 2.3.0
Please find the following below:
Console display, code snipets and please ask me if you need any more details.
In TcpIp.c
extern TcpIp_LocalAddrType TcpIp_LocalAddrTable[TCPIP_LOCAL_ADDR_TABLE_ENTRIES]; // declared prototype and
in TcpIp_CfgTypes.h // has the definition
typedef struct{
TcpIp_DomainType Domain;
TcpIp_AdressType AddressType;
uint8 CtrlId;
TcpIp_AddrAssignment Assignment;
TcpIp_StaticIpAddressConfig StaticAddress;
}TcpIp_LocalAddrType;
//Abhi
TcpIp_LocalAddrType TcpIp_LocalAddrTable[TCPIP_LOCAL_ADDR_TABLE_ENTRIES];
Their is nothing of this structure in files Main.c, task2.c or soad.c
i dont understand why it gives error previously defined in these above mentioned files.
I have rebuilt the index and cleaned the project did every thing.
If you have any solutions or ways to do things differently am happy to try them.
Thank you.
console display
10:19:30 **** Build of configuration Default for project SoAdImplementation ****
"C:\\cygwin\\bin\\make.exe" all
Using erika files in /cygdrive/d/Projekte/VE-D24~2/ABHI_P~1/project/DEPEND~1/RT-DRU~1.0/plugins/COB06B~1.201/ee_files
MAKE_DIRECTORIES
ASM2C ee_boot.S
CC ee_boot_asm.c
CC eecfg.c
CC task1.c
CC SoAd.c
CC task2.c
CC Main.c
CC init.c
CC TcpIp.c
LOC
ASM2C ee_entry.S
CC ee_entry_asm.c
ASM2C ee_oo.S
CC ee_oo_asm.c
ASM2C ee_context.S
CC ee_context_asm.c
CC ee_hal_structs.c
CC ee_context.c
CC ee_e200zx_cpu.c
ASM ee_ivor.S
CC ee_irq.c
CC ee_activate.c
CC ee_schedule.c
CC ee_force_schedule.c
CC ee_gettaskstate.c
CC ee_gettaskid.c
CC ee_terminat.c
CC ee_thendin.c
CC ee_irqendin.c
CC ee_tstub.c
CC ee_tnterm.c
CC ee_lookup.c
CC ee_rq_exchg.c
CC ee_rq_inser.c
CC ee_shtdown.c
CC ee_startos.c
CC ee_chaintas.c
AR libee.a
LD
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in SoAd.o
mwldeppc.exe: Previously defined in task1.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in SoAd.o
mwldeppc.exe: Previously defined in task1.o
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in task2.o
mwldeppc.exe: Previously defined in SoAd.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in task2.o
mwldeppc.exe: Previously defined in SoAd.o
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in Main.o
mwldeppc.exe: Previously defined in task2.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in Main.o
mwldeppc.exe: Previously defined in task2.o
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in TcpIp.o
mwldeppc.exe: Previously defined in Main.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in TcpIp.o
mwldeppc.exe: Previously defined in Main.o
mwldeppc.exe: undefined: 'udp_bind'
mwldeppc.exe: Referenced from 'TcpIp_Bind' in TcpIp.o
mwldeppc.exe: undefined: 'pbuf_alloc'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'pbuf_take'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_connect'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_send'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_disconnect'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'pbuf_free'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_new'
mwldeppc.exe: Referenced from 'TcpIp_SoAdGetSocket' in TcpIp.o
mwldeppc.exe: undefined: 'SoAd_RxIndication'
mwldeppc.exe: Referenced from 'Receive_Udp_v4' in TcpIp.o
mwldeppc.exe: undefined: 'udp_recv'
mwldeppc.exe: Referenced from 'TcpIp_SoAdGetSocket' in TcpIp.o
mwldeppc.exe: undefined: 'ip_addr_any'
Errors caused tool to abort.
mwldeppc.exe: Referenced from 'SoAd_MainFunction' in SoAd.o
mwldeppc.exe: undefined: 'ip_addr_any'
mwldeppc.exe: Referenced from 'SoAd_MainFunction' in SoAd.o
mwldeppc.exe: undefined: 'udp_remove'
mwldeppc.exe: Referenced from 'TcpIp_Close' in TcpIp.o
mwldeppc.exe: undefined: 'SoAd_TcpIpEvent'
mwldeppc.exe: Referenced from 'TcpIp_Close' in TcpIp.o
mwldeppc.exe: undefined: 'lwip_init'
mwldeppc.exe: Referenced from 'TcpIp_Init' in TcpIp.o
mwldeppc.exe: undefined: 'inet_addr'
mwldeppc.exe: Referenced from 'SoAd_Init' in SoAd.o
mwldeppc.exe: undefined: 'lwip_htons'
mwldeppc.exe: Referenced from 'SoAd_Init' in SoAd.o
mwldeppc.exe: alert: Link failed.
make: *** [ppc.elf] Error 1
10:20:39 Build Finished (took 1m:9s.312ms)
and cygwin environment.
Using RT-Druid 2.3.0
Please find the following below:
Console display, code snipets and please ask me if you need any more details.
In TcpIp.c
extern TcpIp_LocalAddrType TcpIp_LocalAddrTable[TCPIP_LOCAL_ADDR_TABLE_ENTRIES]; // declared prototype and
in TcpIp_CfgTypes.h // has the definition
typedef struct{
TcpIp_DomainType Domain;
TcpIp_AdressType AddressType;
uint8 CtrlId;
TcpIp_AddrAssignment Assignment;
TcpIp_StaticIpAddressConfig StaticAddress;
}TcpIp_LocalAddrType;
//Abhi
TcpIp_LocalAddrType TcpIp_LocalAddrTable[TCPIP_LOCAL_ADDR_TABLE_ENTRIES];
Their is nothing of this structure in files Main.c, task2.c or soad.c
i dont understand why it gives error previously defined in these above mentioned files.
I have rebuilt the index and cleaned the project did every thing.
If you have any solutions or ways to do things differently am happy to try them.
Thank you.
console display
10:19:30 **** Build of configuration Default for project SoAdImplementation ****
"C:\\cygwin\\bin\\make.exe" all
Using erika files in /cygdrive/d/Projekte/VE-D24~2/ABHI_P~1/project/DEPEND~1/RT-DRU~1.0/plugins/COB06B~1.201/ee_files
MAKE_DIRECTORIES
ASM2C ee_boot.S
CC ee_boot_asm.c
CC eecfg.c
CC task1.c
CC SoAd.c
CC task2.c
CC Main.c
CC init.c
CC TcpIp.c
LOC
ASM2C ee_entry.S
CC ee_entry_asm.c
ASM2C ee_oo.S
CC ee_oo_asm.c
ASM2C ee_context.S
CC ee_context_asm.c
CC ee_hal_structs.c
CC ee_context.c
CC ee_e200zx_cpu.c
ASM ee_ivor.S
CC ee_irq.c
CC ee_activate.c
CC ee_schedule.c
CC ee_force_schedule.c
CC ee_gettaskstate.c
CC ee_gettaskid.c
CC ee_terminat.c
CC ee_thendin.c
CC ee_irqendin.c
CC ee_tstub.c
CC ee_tnterm.c
CC ee_lookup.c
CC ee_rq_exchg.c
CC ee_rq_inser.c
CC ee_shtdown.c
CC ee_startos.c
CC ee_chaintas.c
AR libee.a
LD
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in SoAd.o
mwldeppc.exe: Previously defined in task1.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in SoAd.o
mwldeppc.exe: Previously defined in task1.o
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in task2.o
mwldeppc.exe: Previously defined in SoAd.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in task2.o
mwldeppc.exe: Previously defined in SoAd.o
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in Main.o
mwldeppc.exe: Previously defined in task2.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in Main.o
mwldeppc.exe: Previously defined in task2.o
mwldeppc.exe: multiply-defined: 'TcpIp_LocalAddrTable' in TcpIp.o
mwldeppc.exe: Previously defined in Main.o
mwldeppc.exe: multiply-defined: '.dwarf.TcpIp_LocalAddrTable' in TcpIp.o
mwldeppc.exe: Previously defined in Main.o
mwldeppc.exe: undefined: 'udp_bind'
mwldeppc.exe: Referenced from 'TcpIp_Bind' in TcpIp.o
mwldeppc.exe: undefined: 'pbuf_alloc'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'pbuf_take'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_connect'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_send'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_disconnect'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'pbuf_free'
mwldeppc.exe: Referenced from 'TcpIp_UdpTransmit' in TcpIp.o
mwldeppc.exe: undefined: 'udp_new'
mwldeppc.exe: Referenced from 'TcpIp_SoAdGetSocket' in TcpIp.o
mwldeppc.exe: undefined: 'SoAd_RxIndication'
mwldeppc.exe: Referenced from 'Receive_Udp_v4' in TcpIp.o
mwldeppc.exe: undefined: 'udp_recv'
mwldeppc.exe: Referenced from 'TcpIp_SoAdGetSocket' in TcpIp.o
mwldeppc.exe: undefined: 'ip_addr_any'
Errors caused tool to abort.
mwldeppc.exe: Referenced from 'SoAd_MainFunction' in SoAd.o
mwldeppc.exe: undefined: 'ip_addr_any'
mwldeppc.exe: Referenced from 'SoAd_MainFunction' in SoAd.o
mwldeppc.exe: undefined: 'udp_remove'
mwldeppc.exe: Referenced from 'TcpIp_Close' in TcpIp.o
mwldeppc.exe: undefined: 'SoAd_TcpIpEvent'
mwldeppc.exe: Referenced from 'TcpIp_Close' in TcpIp.o
mwldeppc.exe: undefined: 'lwip_init'
mwldeppc.exe: Referenced from 'TcpIp_Init' in TcpIp.o
mwldeppc.exe: undefined: 'inet_addr'
mwldeppc.exe: Referenced from 'SoAd_Init' in SoAd.o
mwldeppc.exe: undefined: 'lwip_htons'
mwldeppc.exe: Referenced from 'SoAd_Init' in SoAd.o
mwldeppc.exe: alert: Link failed.
make: *** [ppc.elf] Error 1
10:20:39 Build Finished (took 1m:9s.312ms)