This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to avoid occupy code memory by "Uncalled Segment"?

There are many functions in my source code. If some functions don't be used in current target. There are some warning message about "Uncalled Segment" after compling. And these uncalled segments also occupy code memory. Does not have any method to avoid occupying code size by these Uncalled Segment. I don't want to use "#if(0)" to pre-disable this function.Does have any way to solve this issue except using "#if(0)"?

Parents
  • Doesn't the latest version of the Linker have options to do this?

    But, surely, if you're worried about code space then it's up to you to ensure that you don't squander it!

    If your source is full of bloat, you can't really blame the tools when your code space fills up, can you?!

    You can use uVision's project management options to exclude unused files and/or groups from the build without #if

    The other issue with uncalled modules is that they mess up the data overlaying - so you are also squandering data space!

Reply
  • Doesn't the latest version of the Linker have options to do this?

    But, surely, if you're worried about code space then it's up to you to ensure that you don't squander it!

    If your source is full of bloat, you can't really blame the tools when your code space fills up, can you?!

    You can use uVision's project management options to exclude unused files and/or groups from the build without #if

    The other issue with uncalled modules is that they mess up the data overlaying - so you are also squandering data space!

Children