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 am using 5.20 if it matters I have a function that is indirectly called from an array of functions. This function is contained in its own module. When I link, I get the following warning:
WARNING 16: Uncalled Segment, ignored for overlay process segment: ?CO?FACT_CON
static float code ideal_values[LAST_POINT] ={
Okay, one thing you can try is the NOOL option for the linker. This makes all data non-overlay, so it may take up data space if you have automatic variables. If all your data is static, you will get little or no increase in data space, and the warning will go away. can't do this... I'd love to, but I only have 2K of SRAM with VERY little free. If you need to run in overlay mode, the other way to eliminate this warning is with the OVERLAY command in the linker. I have MANY entries into my link file in regards too this. They maybe wrong though. Regardless, I have it working now, after moving the variable INSIDE the function, the warning has disappeared. I have taken this concept to several other places in my code where such problems existed, and they too are now gone. (thanks to Mark for suggesting this to me... with only one function in the file, I orignally didn't care about localizing the scope as much as possible, because it just didn't matter.) I'd still like to know why this happenned, I hate ghosts.
This is just a suggestion. I declare an array of function pointers to solve similar problem in my current project. It works without warning, the array is placed in code memory, and the overlay analysis is used for the whole project. You could try this: static const float (code* code ideal_value[LAST_POINT])(void) = {fnct1, fnct2}; This simply declare an array of pointers to functions that return float and take no argument. The array is placed in the code. Invoke the function by: x = ideal_value[i](); or x = (*ideal_value[i])(); I hope this solve your problem. David Lin