This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error when porting from Si Labs IDE to uVision.

I am currently using Silicon Laboratories IDE for the C8051F340. I would like to use the uVision3 debugger. I have ported all the compile, assembler and linker settings and path but I am getting the following errors.

The Si Labs IDE is using the Keil compiler, so I don't understand why it is choking when it didn't from the other IDE.


Build target 'Target 1'
compiling iic.c...
compiling main.c...
compiling mn_callback.c...
compiling netfinder.c...
assembling Startup.a51...
compiling Arp.c...
..\..\NETLIB\ARP.C(452): warning C275: expression with possibly no effect
compiling bootp.c...
compiling CALLBACK.c...
compiling cp2200.c...
compiling cp2200_flash_utils.c...
compiling cp2200_reg.c...
compiling cs8900a.c...
compiling cs8900a_16.c...
..\..\NETLIB\CS8900A_16.C(598): error C141: syntax error near '{'
..\..\NETLIB\CS8900A_16.C(606): error C141: syntax error near 'while'
..\..\NETLIB\CS8900A_16.C(606): error C141: syntax error near '=', expected ')'
..\..\NETLIB\CS8900A_16.C(606): error C141: syntax error near '0x0120'
..\..\NETLIB\CS8900A_16.C(606): error C141: syntax error near ')'
..\..\NETLIB\CS8900A_16.C(608): error C141: syntax error near '&', expected ')'
..\..\NETLIB\CS8900A_16.C(613): error C141: syntax error near '&', expected ')'
..\..\NETLIB\CS8900A_16.C(616): error C231: 'status': redefinition
..\..\NETLIB\CS8900A_16.C(624): error C231: '_dummy': redefinition
..\..\NETLIB\CS8900A_16.C(630): error C231: 'recv_len': redefinition
..\..\NETLIB\CS8900A_16.C(631): error C279: 'recv_len': multiple initialization
..\..\NETLIB\CS8900A_16.C(631): error C247: non-address/-constant initializer
..\..\NETLIB\CS8900A_16.C(640): error C141: syntax error near 'if'
..\..\NETLIB\CS8900A_16.C(640): error C141: syntax error near '658'
..\..\NETLIB\CS8900A_16.C(640): error C129: missing ';' before '-'
compiling dhcp.c...
compiling dns.c...
compiling ethernet.c...
compiling FTPSERVR.c...
compiling http.c...
compiling igmp.c...
compiling IP.c...
compiling mn_csum.c...
compiling mn_mem.c...
compiling mn_os.c...
compiling mn_port.c...
..\..\NETLIB\MN_PORT.C(131): warning C275: expression with possibly no effect
compiling mn_timer.c...
compiling mnserver.c...
compiling mnstring.c...
compiling modem.c...
compiling Physical.c...
compiling ppp.c...
compiling SMTP.C...
compiling socket.c...
compiling support.c...
compiling tcp.c...
compiling tftp.c...
compiling tftpflsh.c...
compiling UDP.c...
compiling vfile.c...
compiling ctrllogin.c...
compiling index.c...
compiling newword.c...
Target not created

Here is the code in question:

#if (RTOS_USED == RTOS_NONE)
#if (defined(POLZ180E) || defined(CMXZ180E))
#pragma interrupt
void ether_isr(void)
#elif (defined(POLTRI51_16) || defined(CMXTRI51_16))
void ether_isr(void) interrupt 0
#endif
#else
void ether_isr(void) cmx_reentrant
#endif /* (RTOS_USED == RTOS_NONE) */
{ word16 IRQSource; word16 status, recv_len, i, len;
#if (defined(POLZ180E) || defined(CMXZ180E)) byte temp_char;
#endif DATA_BYTES_T data_bytes;

while ((IRQSource = readPacketPage16(PP_ISQ)) != 0) /* Read Interrupt Service Queue */ { switch(IRQSource & 0x003F) { case 0x04: /* Receive Interrupt occured */
/* IRQSource contains the RxEvent Register contents */

/* only RxOK should generate a receiver interrupt */ if ((IRQSource & CS_RX_OK) == 0) break;

status = readFrameSpecial();
#if ( DO_DEBUG ) mn_ustoa((byte *)Str,status); DiagSend(Str); Str[0] = ' '; Str[1] = '\0'; DiagSend(Str);
#else dummy(status); /* force compiler to not ignore status */
#endif

#if (defined(POLZ180E) || defined(CMXZ180E)) temp_char = RDWR[RECV_PORT]; /* hack! */
#endif recv_len = readFrameSpecial(); recv_len = (recv_len + 1) & 0xfffe; /* ensure even # of chars */
#if ( DO_DEBUG ) mn_ustoa((byte *)Str,recv_len); DiagSend(Str); Str[0] = ' '; Str[1] = '\0'; DiagSend(Str);
#endif

if ( (RECV_BUFF_SIZE - recv_count - 2) >= recv_len) { /* put recv_len into buffer so all packets start with the length. Do NOT remove the next two lines. */ mn_put_recv_byte(HIGHBYTE(recv_len)); mn_put_recv_byte(LOWBYTE(recv_len));

len = recv_len >> 1;

for (i=0; i<len; i++) { readFrameWord(&data_bytes); *recv_in_ptr = data_bytes.data1;
#if ( DO_DEBUG ) mn_uctoa((byte *)Str,*recv_in_ptr); DiagSend(Str); Str[0] = ' '; Str[1] = '\0'; DiagSend(Str);
#endif if (++recv_in_ptr >= &recv_buff[RECV_BUFF_SIZE]) recv_in_ptr = &recv_buff[0];

*recv_in_ptr = data_bytes.data2;
#if ( DO_DEBUG ) mn_uctoa((byte *)Str,*recv_in_ptr); DiagSend(Str); Str[0] = ' '; Str[1] = '\0'; DiagSend(Str);
#endif if (++recv_in_ptr >= &recv_buff[RECV_BUFF_SIZE]) recv_in_ptr = &recv_buff[0];

}

recv_count += recv_len;

#if ( DO_DEBUG ) strcpy(Str,str8); DiagSend(Str);
#endif /* tell upper layers we got a packet */ MN_ISR_SIGNAL_POST(SIGNAL_RECEIVE); } else { /* not enough room to hold this packet so get rid of it */
#if ( DO_DEBUG ) strcpy(Str,str7); DiagSend(Str);
#endif writePacketPage16(PP_RxCFG, CS_SKIP_1); /* skip this frame */ } break;

case 0x08: /* Transmit Interrupt occured */
/* IRQSource contains the TxEvent Register contents */

/* Will get here on TxOK or an error. Either way assume the transmit is done. */

MN_XMIT_BUSY_CLEAR; MN_ISR_SIGNAL_POST(SIGNAL_TRANSMIT); break;

case 0x0C: /* Buffer Interrupt occured */
/* IRQSource contains the BufEvent Register contents */ if (IRQSource & CS_RDY_4_TX) ready4tx = TRUE; else if (IRQSource & CS_TX_UNDERRUN) { MN_XMIT_BUSY_CLEAR; MN_ISR_SIGNAL_POST(SIGNAL_TRANSMIT); } break;

case 0x10: /* Receive Buffer Miss Interrupt occured */
/* IRQSource contains the RxMISS Register contents */ /* read the miss counter to clear it */ dummy(readPacketPage16(PP_RxMISS)); break;

case 0x12: /* Transmit Collision Counter Interrupt occured */
/* IRQSource contains the TxCOLL Register contents */ /* read the collision counter to clear it */ dummy(readPacketPage16(PP_TxCOL)); break;

default:
/* This should never occur */
#if ( DO_DEBUG ) strcpy(Str,str12); DiagSend(Str);
#endif break; } }
} #endif /* POLLED_ETHERNET */

0