I have tried to compile the tcpip stack for the MSP430F149 written by
Andreas Dannenberg under msp430-gcc 3.2 and have found that if I use the -O
option, the program does not run, however, compiling without the -O option
produces code that runs. The same code compiles OK with the IAR suite with
or without optimization.

The problem that I have noticed-patiently using msp430-gdb (Insight) 5.1.1--
is that the frame that the stack sends in response to, say an ECHO request,
is corrupt when the code is compiled with the -O option and is OK with no
optimization.

I have not been able to pin point what is actually failing, although it
seems that either the memcopy() function or the *(unsigned int *) casting
used in the function that assembles the return frames in tcpip.c is failing
under optimization.

I am attaching the code in case someone wishes to look into the optimization
issue.

Thanks,

José Sacerio
=================================================
He who faithfully prays to God for the necessaries of this life is both
mercifully heard, and mercifully not heard. For the physician knows better
than the sick man what is good for the disease.

 -- St. Augustine
==================================================================

Attachment: tcpip2.tar.gz
Description: GNU Zip compressed data

Reply via email to