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

Link Problem

I build a library with m functions, I called
n (n<m) functions, How can I avoid the warning:"Uncall function"?

Parents
  • The linker generates a L16 warning, while not great, it is pretty harmless

    It's not at all harmless. It means your code needlessly generates a multi-root call tree, which will degrade performance of the linker a lot. It'll waste not only code space, but also DATA/IDATA/BDATA, which is considerably worse. In a nutshell, that means this warning is about as non-harmless as a warning can be, given the hard limits of the target platform.

    Is this an indication that I'm not using the library manager right, or is it normal?

    Neither. It's not normal, but the problem is not in how you use the library manager --- it's in how you wrote the code you're putting in that library. The rule to follow is: split it up into as many individual source files as you possibly can. Nor more than *one* function or *one* global variable per .c file, if possible.

Reply
  • The linker generates a L16 warning, while not great, it is pretty harmless

    It's not at all harmless. It means your code needlessly generates a multi-root call tree, which will degrade performance of the linker a lot. It'll waste not only code space, but also DATA/IDATA/BDATA, which is considerably worse. In a nutshell, that means this warning is about as non-harmless as a warning can be, given the hard limits of the target platform.

    Is this an indication that I'm not using the library manager right, or is it normal?

    Neither. It's not normal, but the problem is not in how you use the library manager --- it's in how you wrote the code you're putting in that library. The rule to follow is: split it up into as many individual source files as you possibly can. Nor more than *one* function or *one* global variable per .c file, if possible.

Children