Hello All,
I'm getting a linker error when I try to copy strings.
Following is the code snippet:
===================================================
{
int offset=DNS_NAME_OFS;
TxFrame1[offset] = 0x03;
offset++;
strcpy(&TxFrame1[offset], "www");
offset += strlen("www");
TxFrame1[offset] = 0x03;
offset++;
strcpy(&TxFrame1[offset], "msn");
offset += strlen("msn");
TxFrame1[offset] = 0x03;
offset++;
strcpy(&TxFrame1[offset], "com");
offset += strlen("com");
// TxFrame1[offset] = 0x00; >> Error occurs when I
uncomment
// offset++; >> these lines
*(unsigned int *)&TxFrame1[offset] = 0x0001;
offset += 2;
*(unsigned int *)&TxFrame1[offset] = 0x0001;
}
===================================================
Here's the error:
===================================================
msp430-gcc.exe cs8900.c tcpip.c main.c -mmcu=msp430x149 -o
ourserver.exe -g -lc -lgcc
msp430-gcc.exe cs8900.c tcpip.c main.c -mmcu=msp430x149 -g -O -o
ourserver.elf
/cygdrive/c/DOCUME~1/ASAXEN~1.CS-/LOCALS~1/Temp/ccyj0kYi.o(.text+0x188c):
In function `PrepareUDP_DATA_FRAME':
/cygdrive/c/Documents and
Settings/asaxena.CS-UML/iCricket/NW_Stack/tcpip.c:1034: internal
error: unsupported relocation error
/cygdrive/c/DOCUME~1/ASAXEN~1.CS-/LOCALS~1/Temp/ccyj0kYi.o(.text+0x1890):/cygdrive/c/Documents
and Settings/asaxena.CS-UML/iCricket/NW_Stack/tcpip.c:1037:
internal error: unsupported relocation error
msp430-gcc.exe cs8900.c tcpip.c main.c -mmcu=msp430x149 -S
msp430-objcopy.exe -O ihex ourserver.exe ourserver.d43
msp430-objcopy.exe -O srec ourserver.exe ourserver.s19
===================================================
Akshay
aksh...@rediffmail.com
aks...@saxena.com
___________________________________________________
Download the hottest & happening ringtones here!
OR SMS: Top tone to 7333
Click here now:
http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl