Hello, While building a project this message appears:
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?CO?AMPL_DRIVER
I know that this warning indicates that there is a part of code in the ampl_driver file that is excluded from the overlay process.
after searching (by commenting code parts) I found out that the warning is caused from a constant 'ref_int_tmpr', which is declared at the 'ampl_driver' file and is used only once in the same file and nowhere else in the project. The constant is used by a function which is included only if defined earlier:
// global declaration: const float code ref_int_tmpr = 40; ... #ifdef __LT out_sig[i] = (out_sig[i] / get_RAM_gain_factor(ampl_param.working_gain)) - low_temperature_correction(case_temperature,t_index,i); #else if(!sensor_mode.delta) { //signal with temperature correction out_sig[i] = (out_sig[i] / get_RAM_gain_factor(ampl_param.working_gain)) * ((1 + ref_int_tmpr * ID1_xram.alpha[i]) / (1 + get_temp_sensor() * ID1_xram.alpha[i])); }//if(!sensor_mode.delta else { //no temperature correction out_sig[i] = out_sig[i] / get_RAM_gain_factor(ampl_param.working_gain); } #endif //__LT
When the _LT option is defined (the #else part isn't executed) the error appears. The problem is that the warning stays also after commenting/ entering into the define choice the declaration part:
#ifndef __LT const float code ref_int_tmpr = 40 #endif
Any idea why? Thanks, Amitai
maybe the compiler is inlining the value? after all, it is a constant. could be a define anyway and then that store in a code segment wouldn't be required.
Take a look to the MAP file and identify the size of the segment. I believe you might have more than just this variable.
You may then use the compiler listing (using the SYMBOLS option) to identify which other symbols are allocated to that segment.
View all questions in Keil forum