DSPRelated.com
Forums

Linking problems when using far mode

Started by eran segev February 25, 2002
Hi group,
I'm using CC2.0 for the 5402 processor.
The problem I have appear when I try to compile and
link my code using -mf (far mode).
While linking I get this annoying warning:
"linking incompatible formats: file compiled with -mf"
and the linker treats this warning as an error.
It does not help if I use the far libraries:
drv5402f.lib , dsk5402f.lib
Does any one have any Idea?
Anything would be helpful
Thanks in advance
Eran



Eran,

Just curious, are you also using the rts_ext.lib for your runtime library?
Each library must be of the same type, either far model or near model.

Regards,
Dan Rinkes
Texas Instruments -----Original Message-----
From: eran segev [mailto:]
Sent: Monday, February 25, 2002 2:06 PM
To:
Subject: [code-comp] Linking problems when using far mode

Hi group,
I'm using CC2.0 for the 5402 processor.
The problem I have appear when I try to compile and
link my code using -mf (far mode).
While linking I get this annoying warning:
"linking incompatible formats: file compiled with -mf"
and the linker treats this warning as an error.
It does not help if I use the far libraries:
drv5402f.lib , dsk5402f.lib
Does any one have any Idea?
Anything would be helpful
Thanks in advance
Eran
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/code-comp

More Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/



Eran,

Is it all C code that you are using, or is there some assembly? When you're
compiling C code, and you use the -mf switch, there is a directive created
in the generated assembly file that tells the linker that this is a far
model .obj file. If you're linking in your own assembly functions, you need
to specify the directive also. I can't remember off the top of my head what
the directive is, but you can find out by keeping the .asm filesn generated
by the compiler and finding out what the directive it adds is.

Regards,
Dan Rinkes
Texas Instruments

-----Original Message-----
From: eran segev [mailto:]
Sent: Tuesday, February 26, 2002 1:09 AM
To: Rinkes, Dan
Subject: RE: [code-comp] Linking problems when using far mode

Dan,
I forgot to mantion it but I do also use rts_ext.lib
Eran

--- "Rinkes, Dan" <> wrote:
> Eran,
>
> Just curious, are you also using the rts_ext.lib for
> your runtime library?
> Each library must be of the same type, either far
> model or near model.
>
> Regards,
> Dan Rinkes
> Texas Instruments > -----Original Message-----
> From: eran segev [mailto:]
> Sent: Monday, February 25, 2002 2:06 PM
> To:
> Subject: [code-comp] Linking problems when using far
> mode
>
> Hi group,
> I'm using CC2.0 for the 5402 processor.
> The problem I have appear when I try to compile and
> link my code using -mf (far mode).
> While linking I get this annoying warning:
> "linking incompatible formats: file compiled with
> -mf"
> and the linker treats this warning as an error.
> It does not help if I use the far libraries:
> drv5402f.lib , dsk5402f.lib
> Does any one have any Idea?
> Anything would be helpful
> Thanks in advance
> Eran >
> _____________________________________
> Note: If you do a simple "reply" with your email
> client, only the author of
> this message will receive your answer. You need to
> do a "reply all" if you
> want your answer to be distributed to the entire
> group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/code-comp
>
> More Groups: http://www.dsprelated.com > ">http://docs.yahoo.com/info/terms/ >
>


__________________________________________________



Dan,
After failing to link my original and complicated code
I tried to compile and link the simple blink example,
using the -mf flag and that too does not work. I can't
think of something simlier then that.
Thanks
Eran

--- "Rinkes, Dan" <> wrote:
> Eran,
>
> Is it all C code that you are using, or is there
> some assembly? When you're
> compiling C code, and you use the -mf switch, there
> is a directive created
> in the generated assembly file that tells the linker
> that this is a far
> model .obj file. If you're linking in your own
> assembly functions, you need
> to specify the directive also. I can't remember off
> the top of my head what
> the directive is, but you can find out by keeping
> the .asm filesn generated
> by the compiler and finding out what the directive
> it adds is.
>
> Regards,
> Dan Rinkes
> Texas Instruments
>
> -----Original Message-----
> From: eran segev [mailto:]
> Sent: Tuesday, February 26, 2002 1:09 AM
> To: Rinkes, Dan
> Subject: RE: [code-comp] Linking problems when using
> far mode
>
> Dan,
> I forgot to mantion it but I do also use rts_ext.lib
> Eran
>
> --- "Rinkes, Dan" <> wrote:
> > Eran,
> >
> > Just curious, are you also using the rts_ext.lib
> for
> > your runtime library?
> > Each library must be of the same type, either far
> > model or near model.
> >
> > Regards,
> > Dan Rinkes
> > Texas Instruments
> >
> >
> > -----Original Message-----
> > From: eran segev [mailto:]
> > Sent: Monday, February 25, 2002 2:06 PM
> > To:
> > Subject: [code-comp] Linking problems when using
> far
> > mode
> >
> > Hi group,
> > I'm using CC2.0 for the 5402 processor.
> > The problem I have appear when I try to compile
> and
> > link my code using -mf (far mode).
> > While linking I get this annoying warning:
> > "linking incompatible formats: file compiled with
> > -mf"
> > and the linker treats this warning as an error.
> > It does not help if I use the far libraries:
> > drv5402f.lib , dsk5402f.lib
> > Does any one have any Idea?
> > Anything would be helpful
> > Thanks in advance
> > Eran
> >
> >
> >
> >
> >
> >
> > _____________________________________
> > Note: If you do a simple "reply" with your email
> > client, only the author of
> > this message will receive your answer. You need
> to
> > do a "reply all" if you
> > want your answer to be distributed to the entire
> > group.
> >
> > _____________________________________
> > About this discussion group:
> >
> > To Join:
> >
> > To Post:
> >
> > To Leave:
> >
> > Archives:
> http://www.yahoogroups.com/group/code-comp
> >
> > More Groups: http://www.dsprelated.com
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >
> >
> > __________________________________________________ >


__________________________________________________


Eran,

Check in Project->Build Options -> Linker, and be sure that there is no
library specified in the "include libraries" text box. When I opened blink,
rts.lib was included there, which was causing the problems. Once it was
removed, the project built properly.

Regards,
Dan -----Original Message-----
From: eran segev [mailto:]
Sent: Tuesday, February 26, 2002 12:58 PM
To: Rinkes, Dan;
Subject: RE: [code-comp] Linking problems when using far mode

Dan,
After failing to link my original and complicated code
I tried to compile and link the simple blink example,
using the -mf flag and that too does not work. I can't
think of something simlier then that.
Thanks
Eran

--- "Rinkes, Dan" <> wrote:
> Eran,
>
> Is it all C code that you are using, or is there
> some assembly? When you're
> compiling C code, and you use the -mf switch, there
> is a directive created
> in the generated assembly file that tells the linker
> that this is a far
> model .obj file. If you're linking in your own
> assembly functions, you need
> to specify the directive also. I can't remember off
> the top of my head what
> the directive is, but you can find out by keeping
> the .asm filesn generated
> by the compiler and finding out what the directive
> it adds is.
>
> Regards,
> Dan Rinkes
> Texas Instruments
>
> -----Original Message-----
> From: eran segev [mailto:]
> Sent: Tuesday, February 26, 2002 1:09 AM
> To: Rinkes, Dan
> Subject: RE: [code-comp] Linking problems when using
> far mode
>
> Dan,
> I forgot to mantion it but I do also use rts_ext.lib
> Eran
>
> --- "Rinkes, Dan" <> wrote:
> > Eran,
> >
> > Just curious, are you also using the rts_ext.lib
> for
> > your runtime library?
> > Each library must be of the same type, either far
> > model or near model.
> >
> > Regards,
> > Dan Rinkes
> > Texas Instruments
> >
> >
> > -----Original Message-----
> > From: eran segev [mailto:]
> > Sent: Monday, February 25, 2002 2:06 PM
> > To:
> > Subject: [code-comp] Linking problems when using
> far
> > mode
> >
> > Hi group,
> > I'm using CC2.0 for the 5402 processor.
> > The problem I have appear when I try to compile
> and
> > link my code using -mf (far mode).
> > While linking I get this annoying warning:
> > "linking incompatible formats: file compiled with
> > -mf"
> > and the linker treats this warning as an error.
> > It does not help if I use the far libraries:
> > drv5402f.lib , dsk5402f.lib
> > Does any one have any Idea?
> > Anything would be helpful
> > Thanks in advance
> > Eran
> >
> >
> >
> >
> >
> >
> > _____________________________________
> > Note: If you do a simple "reply" with your email
> > client, only the author of
> > this message will receive your answer. You need
> to
> > do a "reply all" if you
> > want your answer to be distributed to the entire
> > group.
> >
> > _____________________________________
> > About this discussion group:
> >
> > To Join:
> >
> > To Post:
> >
> > To Leave:
> >
> > Archives:
> http://www.yahoogroups.com/group/code-comp
> >
> > More Groups: http://www.dsprelated.com
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >
> >
> > __________________________________________________ >


__________________________________________________
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/code-comp

More Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/