Skip to main content
Visitor II
February 18, 2011
Question

How to prevent linking unused functions (cosmic)

  • February 18, 2011
  • 3 replies
  • 857 views
Posted on February 18, 2011 at 12:43

How to prevent linking unused functions (cosmic)

    This topic has been closed for replies.

    3 replies

    Visitor II
    May 17, 2011
    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

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    Hi,

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

    Regards,

    Luca

    Visitor II
    May 17, 2011
    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.