This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F28023: Too many rts functions being included in my output file

Part Number: TMS320F28023

Tool/software: TI C/C++ Compiler

Win7 32bit, CCS 6.2, F28023.

I am including rts2800_ml.lib in my code, and it seems very large.

Upon looking at the map, I see functions like fputs.obj, fprintf.obj, strcpy.obj, and many more.

I am not using these functions in my code.

As I understand it, by default, the compiler shouldn't be including these functions if they are uncalled.

Is there a trick to getting CCS to not include those functions during compile, or do I have to make a custom library with only the functions I need?

As an aside, Is there a way I can get CCS to show me a map of all functions and functions they call, including the RTS?

For example, if main() calls myfunc() and myfunc calls atoi() and atoi() calles someother(), is there a way I can get CCS to show me that in some form of graphical manner?

Thanks Mark.

  • Mark,

    For the second question you can try the "Call Hierarchy" view.  

    In the project explorer expand the source file containing the function you want to see the information for.  Right click on it and select Open Call Hierarchy

    Regards,

    John

  • Cool Javelin said:
    As I understand it, by default, the compiler shouldn't be including these functions if they are uncalled.

    That is correct. However, what is likely happening is that one of the runtime functions that you call from your code is in turn calling these other functions.

    Cool Javelin said:
    Is there a trick to getting CCS to not include those functions during compile, or do I have to make a custom library with only the functions I need?

    You would need to write your own version of the functions in question and build a custom RTS library. 

  • Cool Javelin said:
    For example, if main() calls myfunc() and myfunc calls atoi() and atoi() calles someother(), is there a way I can get CCS to show me that in some form of graphical manner?

    The "Call Hierarchy" view suggested by John only works on functions in source files within the project. I.e. doesn't look in the RTS functions.

    The following can show the call graph of the entire project, i.e. functions in source file in the project and functions in linked libraries, since they work by processing the linked executable .out file:

    a. The CCS Stack Usage view.

    b. The Call Graph utility in the Code Generation Tools XML Processing Utilities

  • Thanks Chester:

    This really helps.

    The call_graph utility was able to point me to the offending function call that was calling all those library functions.

    Simply defining a function like:

    void AFunction(float i_num, int length) {

    int32    value;

    }


    Actually adds a host of floating point library routines to the output file and adds 0x1B76 to the .out file.

    Previously the included part of the rts library was only 0x044a so this simple call added 8x that to the code.

    Clearly, I need to do a little rts manipulation of maybe skip the float math altogether.

    Thanks, Mark.