Forums

link error

Started by Michael Hodges June 17, 2002
Hello,

I have started using the 56F826 EVM and am still getting to grips with
Codewarrior and the SDK.
When I compile the Codec example using external memory it runs ok.

Appconfig.h includes CODEC,GPIO,IO,LED and MEMORY.

When I compile the same code using internal flash I get link errors.

Link Error : Symbol not found: FmemNumEMpartitions referenced from sys.lib
Link Error : undefined: 'FmemNumEMpartitions'
Referenced from 'FmemMalloc' in sys.lib
Link failed.

If I undefine MEMORY in appconfig.h I get more link errors.

Link Error : Symbol not found: FmemEXbit referenced from config.c
Link Error : Symbol not found: FmemNumEMpartitions referenced from config.c
Link Error : Symbol not found: FmemNumIMpartitions referenced from config.c
Link Error : Symbol not found: FmemEMpartitionList referenced from config.c
Link Error : Symbol not found: FmemIMpartitionList referenced from config.c
Link Error : Symbol not found: FmemNumEMpartitions referenced from sys.lib
Link Error : undefined: 'FmemEMpartitionList'
Referenced from 'FconfigInitialize' in config.c
Referenced from 'FmemMalloc' in sys.lib
Link Error : undefined: 'FmemNumIMpartitions'
Referenced from 'FconfigInitialize' in config.c
Link failed.

These symbols are defined in linker.cmd for external memory but not for
linker.cmd for flash.

Other code that doesn't use the codec compiles and runs ok using external ram or
flash.

Any help would be appreciated.
Any ideas?

Mick Hodges




Michael,

Codec driver uses SDK FIFO calls to buffer incoming and outgoing data, and
it uses fifoCreate() call to initialize FIFOs, which uses memory management
to allocate internal buffers. Unfortunately, SDK disables dynamic memory
manager when user selects Flash target (this is done to conserve memory, and
recommendation is to use static buffers when running your application from
Flash). All of this means that default SDK Codec driver will only work for
External RAM target, and will not work for Flash target.

To make Codec driver work for Flash target, users are expected to make some
modifications to this driver to use static buffers. We realize that this is
not an ideal situation, so in the future we will be releasing updated
version of this driver, to utilize static and not dynamic buffers, which
will enable Codec driver operation from Flash without any user modification.

For now, however, you can modify Codec driver to use fifoInit() calls
instead of fifoCreate() calls, which will eliminate use of dynamic memory
management, and will solve your problem. Please refer to the SDK
Programmer's Guide for help with these calls (see chapter 5.2.1)

Leonard N. Elevich
Motorola DSPD

-----Original Message-----
From: Michael Hodges [mailto:]
Sent: Monday, June 17, 2002 11:47 AM
To:
Subject: [motoroladsp] link error

Hello,

I have started using the 56F826 EVM and am still getting to grips with
Codewarrior and the SDK.
When I compile the Codec example using external memory it runs ok.

Appconfig.h includes CODEC,GPIO,IO,LED and MEMORY.

When I compile the same code using internal flash I get link errors.

Link Error : Symbol not found: FmemNumEMpartitions referenced from sys.lib
Link Error : undefined: 'FmemNumEMpartitions'
Referenced from 'FmemMalloc' in sys.lib
Link failed.

If I undefine MEMORY in appconfig.h I get more link errors.

Link Error : Symbol not found: FmemEXbit referenced from config.c
Link Error : Symbol not found: FmemNumEMpartitions referenced from
config.c
Link Error : Symbol not found: FmemNumIMpartitions referenced from
config.c
Link Error : Symbol not found: FmemEMpartitionList referenced from
config.c
Link Error : Symbol not found: FmemIMpartitionList referenced from
config.c
Link Error : Symbol not found: FmemNumEMpartitions referenced from sys.lib
Link Error : undefined: 'FmemEMpartitionList'
Referenced from 'FconfigInitialize' in config.c
Referenced from 'FmemMalloc' in sys.lib
Link Error : undefined: 'FmemNumIMpartitions'
Referenced from 'FconfigInitialize' in config.c
Link failed.

These symbols are defined in linker.cmd for external memory but not for
linker.cmd for flash.

Other code that doesn't use the codec compiles and runs ok using external
ram or flash.

Any help would be appreciated.
Any ideas?

Mick Hodges _____________________________________
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/motoroladsp

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


Leonard,

Thanks for the quick reply and explanation.
Just glad to know it's not something I was doing wrong.
I will continue using external ram for now and look at sorting out the flash
problem later.

Many thanks,

Mick Hodges

----- Original Message -----
From: "Leonard N. Elevich" <>
To: "Michael Hodges" <>; <>
Sent: Tuesday, June 18, 2002 5:40 PM
Subject: RE: [motoroladsp] link error > Michael,
>
> Codec driver uses SDK FIFO calls to buffer incoming and outgoing data, and
> it uses fifoCreate() call to initialize FIFOs, which uses memory
management
> to allocate internal buffers. Unfortunately, SDK disables dynamic memory
> manager when user selects Flash target (this is done to conserve memory,
and
> recommendation is to use static buffers when running your application from
> Flash). All of this means that default SDK Codec driver will only work for
> External RAM target, and will not work for Flash target.
>
> To make Codec driver work for Flash target, users are expected to make
some
> modifications to this driver to use static buffers. We realize that this
is
> not an ideal situation, so in the future we will be releasing updated
> version of this driver, to utilize static and not dynamic buffers, which
> will enable Codec driver operation from Flash without any user
modification.
>
> For now, however, you can modify Codec driver to use fifoInit() calls
> instead of fifoCreate() calls, which will eliminate use of dynamic memory
> management, and will solve your problem. Please refer to the SDK
> Programmer's Guide for help with these calls (see chapter 5.2.1)
>
> Leonard N. Elevich
> Motorola DSPD
>
> -----Original Message-----
> From: Michael Hodges [mailto:]
> Sent: Monday, June 17, 2002 11:47 AM
> To:
> Subject: [motoroladsp] link error
>
> Hello,
>
> I have started using the 56F826 EVM and am still getting to grips with
> Codewarrior and the SDK.
> When I compile the Codec example using external memory it runs ok.
>
> Appconfig.h includes CODEC,GPIO,IO,LED and MEMORY.
>
> When I compile the same code using internal flash I get link errors.
>
> Link Error : Symbol not found: FmemNumEMpartitions referenced from
sys.lib
> Link Error : undefined: 'FmemNumEMpartitions'
> Referenced from 'FmemMalloc' in sys.lib
> Link failed.
>
> If I undefine MEMORY in appconfig.h I get more link errors.
>
> Link Error : Symbol not found: FmemEXbit referenced from config.c
> Link Error : Symbol not found: FmemNumEMpartitions referenced from
> config.c
> Link Error : Symbol not found: FmemNumIMpartitions referenced from
> config.c
> Link Error : Symbol not found: FmemEMpartitionList referenced from
> config.c
> Link Error : Symbol not found: FmemIMpartitionList referenced from
> config.c
> Link Error : Symbol not found: FmemNumEMpartitions referenced from
sys.lib
> Link Error : undefined: 'FmemEMpartitionList'
> Referenced from 'FconfigInitialize' in config.c
> Referenced from 'FmemMalloc' in sys.lib
> Link Error : undefined: 'FmemNumIMpartitions'
> Referenced from 'FconfigInitialize' in config.c
> Link failed.
>
> These symbols are defined in linker.cmd for external memory but not for
> linker.cmd for flash.
>
> Other code that doesn't use the codec compiles and runs ok using external
> ram or flash.
>
> Any help would be appreciated.
> Any ideas?
>
> Mick Hodges > _____________________________________
> 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/motoroladsp
>
> More Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/


I ran into this same problem you did and was actually referred to these
messages by John at Metrowerks (thanks John). I started thinking about the
problem and decided that since there is a load of external memory (about
48K) mapped in data space when running in flash mode 0A that I should still
be able to use the dynamic memory code no problem. So I started modifying
the flash linker.cmd file to match the external ram linker.cmd file to try
to enable the dynamic memory usage in the flash target. I was however
unsuccessful, I suspect because there is more to it than this. Anyone have
any suggestions?

Jacob

--- In motoroladsp@y..., "Michael Hodges" <mail@g...> wrote:
> Leonard,
>
> Thanks for the quick reply and explanation.
> Just glad to know it's not something I was doing wrong.
> I will continue using external ram for now and look at sorting out the
flash
> problem later.
>
> Many thanks,
>
> Mick Hodges
>
> ----- Original Message -----
> From: "Leonard N. Elevich" <leonard.n.elevich@m...>
> To: "Michael Hodges" <mail@g...>; <motoroladsp@y...>
> Sent: Tuesday, June 18, 2002 5:40 PM
> Subject: RE: [motoroladsp] link error > > Michael,
> >
> > Codec driver uses SDK FIFO calls to buffer incoming and outgoing data,
and
> > it uses fifoCreate() call to initialize FIFOs, which uses memory
> management
> > to allocate internal buffers. Unfortunately, SDK disables dynamic memory
> > manager when user selects Flash target (this is done to conserve memory,
> and
> > recommendation is to use static buffers when running your application
from
> > Flash). All of this means that default SDK Codec driver will only work
for
> > External RAM target, and will not work for Flash target.
> >
> > To make Codec driver work for Flash target, users are expected to make
> some
> > modifications to this driver to use static buffers. We realize that this
> is
> > not an ideal situation, so in the future we will be releasing updated
> > version of this driver, to utilize static and not dynamic buffers, which
> > will enable Codec driver operation from Flash without any user
> modification.
> >
> > For now, however, you can modify Codec driver to use fifoInit() calls
> > instead of fifoCreate() calls, which will eliminate use of dynamic
memory
> > management, and will solve your problem. Please refer to the SDK
> > Programmer's Guide for help with these calls (see chapter 5.2.1)
> >
> > Leonard N. Elevich
> > Motorola DSPD
> >
> > -----Original Message-----
> > From: Michael Hodges [mailto:mail@g...]
> > Sent: Monday, June 17, 2002 11:47 AM
> > To: motoroladsp@y...
> > Subject: [motoroladsp] link error
> >
> > Hello,
> >
> > I have started using the 56F826 EVM and am still getting to grips with
> > Codewarrior and the SDK.
> > When I compile the Codec example using external memory it runs ok.
> >
> > Appconfig.h includes CODEC,GPIO,IO,LED and MEMORY.
> >
> > When I compile the same code using internal flash I get link errors.
> >
> > Link Error : Symbol not found: FmemNumEMpartitions referenced from
> sys.lib
> > Link Error : undefined: 'FmemNumEMpartitions'
> > Referenced from 'FmemMalloc' in sys.lib
> > Link failed.
> >
> > If I undefine MEMORY in appconfig.h I get more link errors.
> >
> > Link Error : Symbol not found: FmemEXbit referenced from config.c
> > Link Error : Symbol not found: FmemNumEMpartitions referenced from
> > config.c
> > Link Error : Symbol not found: FmemNumIMpartitions referenced from
> > config.c
> > Link Error : Symbol not found: FmemEMpartitionList referenced from
> > config.c
> > Link Error : Symbol not found: FmemIMpartitionList referenced from
> > config.c
> > Link Error : Symbol not found: FmemNumEMpartitions referenced from
> sys.lib
> > Link Error : undefined: 'FmemEMpartitionList'
> > Referenced from 'FconfigInitialize' in config.c
> > Referenced from 'FmemMalloc' in sys.lib
> > Link Error : undefined: 'FmemNumIMpartitions'
> > Referenced from 'FconfigInitialize' in config.c
> > Link failed.
> >
> > These symbols are defined in linker.cmd for external memory but not for
> > linker.cmd for flash.
> >
> > Other code that doesn't use the codec compiles and runs ok using
external
> > ram or flash.
> >
> > Any help would be appreciated.
> > Any ideas?
> >
> > Mick Hodges
> >
> >
> >
> >
> >
> >
> >
> >
> > _____________________________________
> > 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: motoroladsp-subscribe@y...
> >
> > To Post: motoroladsp@y...
> >
> > To Leave: motoroladsp-unsubscribe@y...
> >
> > Archives: http://www.yahoogroups.com/group/motoroladsp
> >
> > More Groups: http://www.dsprelated.com/groups.php3
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >


Attachment (not stored)
winmail.dat
Type: application/ms-tnef