We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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)"?
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!
I have many builds, and they compile seamlessly without 'uncalled' modules, simply because all 'optional' modules are in a library. Erik
Thanks for your assistance. About your suggestion. I had tried to integrate all object files(*.obj) to generate a library. And then I complied my project with this library, it still has "uncalled segment" and occupy code memory. Why? Does it have any required process I have to do before making the library which has the effect like you said?
it still has "uncalled segment" and occupy code memory. Why? can't you read? I posted "put them in individual source modules" if you have 5 functions in an obj file that is in a library and one of those functions is called, the whole obj (all 5 functions )get included. Erik