Clem,
I was looking up something else today and 'stumbled'
onto the following [it sounded good to me]...
It is recommended to use the DSP/BIOS library version
of malloc, free, memalign, calloc and realloc within
DSP/BIOS applications. When you are not referencing
these functions directly in your application but call
another run-time support function which references one
or more of them, add -u _symbol, (for example, -u
_malloc) to your linker options. The -u linker option
introduces a symbol, such as malloc, as an unresolved
symbol into the linkers symbol table. This causes the
linker to resolve the symbol from
the DSP/BIOS library rather than the run-time support
library. If in doubt, you can examine your map file
for information on the library sources of your
application.
mikedunn
--- Clem Taylor <clem.taylor@clem...> wrote:
> On 10/21/05, Mike Dunn
<mike-dunn@mike...>
> wrote:
> > All you need to do is put your code in an archive
> [library].
> >
> > From TI help file - sometimes useful :-)
> > The -priority option is used to provide an
> alternate
> > search mechanism for libraries. priority causes
> each
> > unresolved reference to be satisfied by the first
> > library that contains a definition for that
> symbol.
>
> Hmm... After posting my earlier message I moved my
> implementation of
> _assert() into a library. This didn't seem to help
> at all. It still
> complains with the same error.
>
> >> error: symbol __assert is defined multiple
> times: overload.obj
> (.../support.lib) and assert.obj
> (C:/CCStudio_v3.1/C6000/cgtools/lib/rts6400.lib)
>
> The automatically generated Release.lkf file shows
> that '-priority'
> option is specified and that my library is included
> prior to the
> DSP/BIOS .cmd file.
>
> The *cfg.cmd file also includes the -priority
> option.
>
> Has anyone used '-priority' to replace a symbol with
> CCS 3.1? I'm
> wondering if part of the problem is that rts6400.lib
> is included from
> the *cfg.cmd. If I add -lrts6400.lib to the command
> line, then I get
> additional 'defined multiple times' errors for
> _c_int00 and __stack...
>
> Any ideas,
> Clem
> c6x-unsubscribe@c6x-...
>