Thanks Dmitry,
Is there a way to fix this problem?
Akshay
--__--__--
Message: 6
From: Dmitry <di...@mail.ru>
Organization: EIS
To: mspgcc-users@lists.sourceforge.net
Subject: Re: [Mspgcc-users] linker error
Date: Mon, 4 Aug 2003 23:40:41 +0400
Reply-To: mspgcc-users@lists.sourceforge.net
This thing is covered in docs (tips & tricks):
when performing type conversion, you must be sure, that=20
biased char variable is located at even address.
So, if &TxFrame1[offset] is odd located, you have a problem.
When you comment line 'offset++', you set =20
&TxFrame1[offset]
even-located and everything is ok.
~d
Message: 5
Date: 4 Aug 2003 19:13:37 -0000
From: "Akshay" <aksh...@rediffmail.com>
To: mspgcc-users@lists.sourceforge.net
Subject: [Mspgcc-users] linker error
Reply-To: mspgcc-users@lists.sourceforge.net
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