Gennady Vayl

Cosmic Compiler Port

Discussion created by Gennady Vayl on Mar 29, 2008
Latest reply on Apr 11, 2008 by CompilerGuru
Hi,
I'm trying to port a MicroC OS II project from Cosmic CrapPiler to Codewarrior. I'm getting like 51 L1818 errors.
Here's an example of one...
Link Error   : L1818: Symbol 241 - PORTA duplicated in OS_FLAG.C.o and OS_CORE.C.o

I have no idea why its doing this. I have PORTA defined in iosc32.h which is a Cosmic include file.

Here's part of the source:
/*    IO DEFINITIONS FOR MCS912C32
 *    Copyright (c) 2003 by COSMIC Software
 */
#ifndef _BASE
#define _BASE    0
#endif
#define _IO(x)    @(_BASE)+(x)

typedef unsigned char __uchar;
typedef unsigned int __uint;

/*    MEBI Module
 */
volatile __uchar PORTA       _IO(0x00);   /* port A */
volatile __uchar PORTB       _IO(0x01);   /* port B */
volatile __uchar DDRA        _IO(0x02);   /* data direction port A */
volatile __uchar DDRB        _IO(0x03);   /* data direction port B */
volatile __uchar PORTE       _IO(0x08);   /* port E */
volatile __uchar DDRE        _IO(0x09);   /* data direction port E */
.
.
.


So PortA is defined here...and not in OS_FLAG.c.o or that other file. Infact its not even used in any of those files? Anyone know what this is?
Also I have not set any linker settings...not sure how that's done here. I heard that Codewarrior links for you?

Outcomes