uncalled functions

Hi,
I am using C51 version 1x (or 5x). I have some uncalled functions and it seems like they are included in the final binary. Does any one know how to make the linker not include the uncalled funtions?

Thanks for your help,

Michelle

Parents
  • Hi there!

    Yes, they are included. Creating Libraries might be a solution. What I have done lately was just defining an UNUSED compiler constant and doing a

    #ifdef UNUSED
    // that function you might not need for this version
    //...
    #endif
    
    This might not be the most elegant way, but finally you can keep the sourcecode for a possible later use.

Reply
  • Hi there!

    Yes, they are included. Creating Libraries might be a solution. What I have done lately was just defining an UNUSED compiler constant and doing a

    #ifdef UNUSED
    // that function you might not need for this version
    //...
    #endif
    
    This might not be the most elegant way, but finally you can keep the sourcecode for a possible later use.

Children
More questions in this forum