cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent linking unused functions (cosmic)

wolfgang239955_stm1_st
Associate II
Posted on February 18, 2011 at 12:43

How to prevent linking unused functions (cosmic)

3 REPLIES 3
spiovan9
Associate II
Posted on May 17, 2011 at 15:11

Compiler 

optimization  Conf. Debug

(.S19 bytes)      Conf. Release

(.S19 bytes)

Disabe

(-no)  10162      10166

Minimize code size

(+compact)  9276  9280

 Costomize

(+compact +split)  6952  6956

Hi,

thank you for replying for I had the same trouble though.

Under the Cosmic 32k version I made some benchmark on my application which involves many from ST standard libraries even though I use only few of the functions actually. The bytes saving is considerable with +split option.

Why the release configuration takes little more than the debug one?

Stefano

luca239955_stm1_st
Senior II
Posted on May 17, 2011 at 15:11

Hi,

use the +split compiler option, see the user manual for the details.

Regards,

Luca

luca239955_stm1_st
Senior II
Posted on May 17, 2011 at 15:11

>> Why the release configuration takes little more than the debug one?

probably because they are actually the same thing: in the past the debug configuation used to have no optimizations (-no), but since this changed I don't know what's the difference between the two.

If you post the two command lines passed to the compiler we can compare.