Converting TCP/IP to IAR v3.30

Hi All,

I was converting the free TI MSP430 TCP/IP project to the latest IAR430 V3.30A. However I have hit a problem, I get an error compiling:

// copies bytes from MCU-memory to frame port
// NOTES: * an odd number of byte may only be transfered
//          if the frame is written to the end!
//        * MCU-memory MUST start at word-boundary

void CopyToFrame8900(void *Source, unsigned int Size)

{

  P5DIR = 0xFF;                                  // data port to output
  while (Size > 1) {
    WriteFrame8900(*((unsigned int *)Source)++);
    Size -= 2;
  }

  if (Size)                                      // if odd num. of bytes...
    WriteFrame8900(*(unsigned char *)Source);    
}                                                // ignores the highbyte)

And so I thought to split the line:

WriteFrame8900(*((unsigned int *)Source)++);

To:

WriteFrame8900(*(unsigned int *)Source);
Source++;

Because it seemed a bit crazy! The problem is that it is a void type data pointer which needs to be incremented by one.… I will get the project uploaded in a bit…

That’s a mistake. You want to change that ++ to read

Source += sizeof(unsigned int);

If you want to split that line out.

Sirtedward:
I will get the project uploaded in a bit…

Did you get the code converted over? Is it available?

Ron

RonG:

Sirtedward:
I will get the project uploaded in a bit…

Did you get the code converted over? Is it available?

Ron

Hello, you can download it from here…

http://www.olimex.cl/soft/msp430/Ezweb3.zip

-Paul