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.

CCS/TMS570LS3137: Excluding unused linked procedures

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

CCS 8.2.0.00007

Is it possible to exclude from a build those procedures that are not called?

HALCoGen (4.7.0) produces utility procedures for the peripherals. Many of these I do not use. How can I exclude them from the build?

I cannot find an appropriate option in the CCS ARM Linker section.

Do I have to remove them manually?

Regards,

Tom Pikett

  • I don't know enough about Halcogen to build it, so I cannot perform any experiments.  I think the Halcogen code is in the form of C code you build, and not an object library that pre-built.  In that case, consider these two alternatives.

    One ... Build the Halcogen code with the option --gen_code_subsections.  This puts each function in its own subsection, and linker knows how remove the subsections (which each contain one function) that are never called.

    Two .. Build everything, including the Halcogen code, with --opt_level=4.  At this level of optimization, the compiler sees the entire program at once, and can remove functions which are not called.

    Thanks and regards,

    -George

  • Thanks George,

    Option One fixed the problem.