DSPRelated.com
Forums

About Eliminate Unused Object

Started by Tonald DL September 13, 2007
Hi,

Does anyone knows how to set CCS compiler and linker's option so that it
can eliminate unused objects?

My current .out take 1.4MB. But there is a lot of library and
functions is not really called. Those occupied a lot of size.
Thanks.

--
Best Regards
Tonald DL
Just checking, you are referring to have it not include obj files from a
library, right?

As far as I remember from looking at the way build systems work, any obj
files explicitly handed to the linker are included in the out file. Any
object files that have been put into a library, and the library is
handed to the linker, only the object files from the library that have
somethign used from them will get included in the out file.

If your project has a bunch of functions in one obj file, then if one
gets used, all are included in the out file.

If you want the linker to make the most decisions, then your main
project would have only one routine, main() and every other routine
would be in it's own .c file, in a separate library project instead of
in the main project itself. While this may improve the amount of memory
used, it means that you can't take advantage of some of the other code
optimizations that the compiler may be able to run if lots of things are
in one file.

Wim.

Tonald DL wrote:
> Hi,
>
> Does anyone knows how to set CCS compiler and linker's option so that it
> can eliminate unused objects?
>
> My current .out take 1.4MB. But there is a lot of library and
> functions is not really called. Those occupied a lot of size.
> Thanks.
>
>
Tonald,

Library functions are only loaded if they are called (directly or indirectly)

Most of the .out file is relocation data, file headers, symbol table, string table, etc.

The important thing to look at is the .map file.
The .map file will list what is actually included and all the actual sizing of the executable.

R. Williams

---------- Original Message -----------
From: "Tonald DL"
To: c...
Sent: Fri, 14 Sep 2007 00:11:11 +0800
Subject: [c6x] About Eliminate Unused Object

> Hi,
>
> Does anyone knows how to set CCS compiler and linker's option so that it
> can eliminate unused objects?
>
> My current .out take 1.4MB. But there is a lot of library and
> functions is not really called. Those occupied a lot of size.
>
> Thanks.
>
> --
> Best Regards
> Tonald DL
------- End of Original Message -------
Hi Williams.

Thanks.

After check the map file, my own modules only occupied less than 150KB.
other things take 1MB. Size much larger than Flash memory, have to think
about secondery boot loader. Store some code in other place.

2007/9/14, Richard Williams :
>
> Tonald,
>
> Library functions are only loaded if they are called (directly or
> indirectly)
>
> Most of the .out file is relocation data, file headers, symbol table,
> string table, etc.
>
> The important thing to look at is the .map file.
> The .map file will list what is actually included and all the actual
> sizing of the executable.
>
> R. Williams
>
> ---------- Original Message -----------
> From: "Tonald DL"
> To: c...
> Sent: Fri, 14 Sep 2007 00:11:11 +0800
> Subject: [c6x] About Eliminate Unused Object
>
> > Hi,
> >
> > Does anyone knows how to set CCS compiler and linker's option so that
> it
> > can eliminate unused objects?
> >
> > My current .out take 1.4MB. But there is a lot of library and
> > functions is not really called. Those occupied a lot of size.
> >
> > Thanks.
> >
> > --
> > Best Regards
> > Tonald DL
> ------- End of Original Message -------
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Best Regards
Tonald DL
WebSite: http://dhcodec.quikstream.com.au/
Tonald-
> After check the map file, my own modules only occupied less than 150KB. other
> things take 1MB. Size much larger than Flash memory, have to think about secondery
> boot loader. Store some code in other place.

Which board are you using? It's easy to find a large Flash mem device, so I'm
wondering what device is on your board.

-Jeff
> 2007/9/14, Richard Williams :
>
> Tonald,
>
> Library functions are only loaded if they are called (directly or
> indirectly)
>
> Most of the .out file is relocation data, file headers, symbol table,
> string table, etc.
>
> The important thing to look at is the .map file.
> The .map file will list what is actually included and all the actual
> sizing of the executable.
>
> R. Williams
>
> ---------- Original Message -----------
> From: "Tonald DL"
> To: c...
> Sent: Fri, 14 Sep 2007 00:11:11 +0800
> Subject: [c6x] About Eliminate Unused Object
>
> > Hi,
> >
> > Does anyone knows how to set CCS compiler and linker's option so
> that it
> > can eliminate unused objects?
> >
> > My current .out take 1.4MB. But there is a lot of library and
> > functions is not really called. Those occupied a lot of size.
> >
> > Thanks.
> >
> > --
> > Best Regards
> > Tonald DL
> ------- End of Original Message -------
>
Tonald-

> I am using DM6437 EVM. I think the flash is around 512KB.

Is the Flash device a BGA or does it have pins? If it has pins, you might consider modifying the DVDP board Flash
device. You should be able to find one by the same mfg (AMD/Spansion?) that is pin-compatible and has more capacity,
and then connect some additional address lines.

-Jeff

> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>
> Best Regards
> Tonald DL
> WebSite: http://dhcodec.quikstream.com.au/
> 2007/9/16, Jeff Brower :
>>
>> Tonald-
>> After check the map file, my own modules only occupied less than
>> 150KB. other things take 1MB. Size much larger than Flash memory, have to
>> think about secondery boot loader. Store some code in other place.
>> Which board are you using? It's easy to find a large Flash mem device, so
>> I'm wondering what device is on your board.
>>
>> -Jeff
>> 2007/9/14, Richard Williams :
>> >
>> > Tonald,
>> >
>> > Library functions are only loaded if they are called (directly or
>> > indirectly)
>> >
>> > Most of the .out file is relocation data, file headers, symbol table,
>> > string table, etc.
>> >
>> > The important thing to look at is the .map file.
>> > The .map file will list what is actually included and all the actual
>> > sizing of the executable.
>> >
>> > R. Williams
>> >
>> >
>> >
>> > ---------- Original Message -----------
>> > From: "Tonald DL"
>> > To: c...
>> > Sent: Fri, 14 Sep 2007 00:11:11 +0800
>> > Subject: [c6x] About Eliminate Unused Object
>> >
>> > > Hi,
>> > >
>> > > Does anyone knows how to set CCS compiler and linker's option so
>> > that it
>> > > can eliminate unused objects?
>> > >
>> > > My current .out take 1.4MB. But there is a lot of library and
>> > > functions is not really called. Those occupied a lot of size.
>> > >
>> > > Thanks.
>> > >
>> > > --
>> > > Best Regards
>> > > Tonald DL
>> > ------- End of Original Message -------
>> >
>>
Dear Everyone,

I am new in TI DM6437, so I am thinking to find ways to get my output from
video port to be displayed in PC monitor, therefore, I have this idea to
write the I2C EEPROM to do so. Do you know any good sample code to do that?

Thank you guys for all the help.

Regards,

Ginanjar NR
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.487 / Virus Database: 269.13.21/1012 - Release Date: 9/16/2007
6:32 PM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.487 / Virus Database: 269.13.21/1012 - Release Date: 9/16/2007
6:32 PM