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.
Hi, I've recently been experiencing some concern regarding the behaviour of a program, for which the optimiser, when set to favour size [OPTIMIZE (6, SIZE)], occasionally leads to the contents of a global variable getting trashed/overwritten. If the optimisation settings are altered to favour speed, this no longer happens. It appears not to be an issue with specific XDATA address (where the variable resides), since changing the variables location doesn't prevent this from happening. The variable in question is only ever modified via a single increment within a timer interrupt function. Has anyone else experienced anything like this? IDE: uV2 Compiler: V6.23a Link/Loc: V4.23 Thanks for any illumination... David
Jon: I receive no compiler or linker errors or warnings. Erik: Please can you explain how "one register set ... will guarantee erratic behaviour."? It will certainly be less efficient, but if the context is saved and restored correctly, the use of a single register set should not introduce a risk of any sort, as I understand it. What am I missing, please? Steve Merrick Software Designer Tribal Data Solutions