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.
I know you have many discussions about warning L16 but I couldn't find one that would match with my problem below. I got a warning L16: uncalled segment - SEGMENT: ?PR?API_module2?MODULE2 which my app had nothing to do with. See code below:
in test.c: ---> app code built with lib1.lib main { api_module1(); } in module1.c: ----> part of lib1.lib volatile char var1 api_module1( void ) { var1 = ... } in module2.c: ----> part of lib1.lib extern volatile char var1 api_module2 ( void ) { if (var1 == ...) }
Hello Jon, I rebuilt with 'Cross Reference' option and the map file is much more clear to read. As you pointed it out, I found the culprit. I found the ?PR?MODULE2 under a ?CO? of another/init module name, which is used by the app. It looks like I have a lot of cleaning up work to do but at least I know where to look now. THank you so much for your help.
Just out of curiosity: In uVision2, when bringing up 'options for library lib1.lib', the menu will show a list of 'Select module to always include' module (all .c files) available to the application from this lib1.lib. I'm wondering if there is such option to select 'Always exclude' module.