AnsweredAssumed Answered

Best way to stop volatile data being optimised out if variable unreferenced in code?

Question asked by Carl Norman on Jun 21, 2010
Latest reply on Jun 21, 2010 by CrasyCat


(Using CW 7.1.2, 52259EVB + MQX)

What is the best way to stop (volatile) data being optimised out if unreferenced in the code?


More info; We have thousands of variables in a single file which is linked to the external NVM (MRAM). As we do software updates, some of these variables are no longer referenced, therefore optimised out. This puts the rest of our variables at different address's for these versions making software updates impossible. Basically, if the MAP still had the varibles that were not referenced, the software would address the correct locations. Manually mapping hte address is not an option.

I had a look through the help files and was unable to find a 'simple' solution.