Hello, Is it possible to disable the merging of duplicate strings when declared in code space? I use a number of language tables to provide run-time multi-lingual support for an LCD. These are simple arrays, with position dependent strings. I have tried the OPTIMIZE directive at the top of my strings module:
#pragma OPTIMIZE(0)
One of the FEATURES of C51 is that it merges identical strings for storage in CODE space. Since CODE space in a Harvard architecture cannot be modified, this makes perfect sense. However, for your application, I guess this is not a "feature" you want :-) Have you tried putting different language tables in different source files? String merging only happens to strings in the same source file (I'm pretty certain). Jon
Hi Jon, Many thanks for your suggestion... Have you tried putting different language tables in different source files? String merging only happens to strings in the same source file (I'm pretty certain) ...it works :-) One of the FEATURES of C51 .... Since CODE space ... cannot be modified, this makes perfect sense. That it true for minimum storage space, but I would argue not entirely true for this style of language table. I am sure I am not the only person to implement user interface strings in this manner. C51 appears to be configurable in almost every other facet of its operation, it would be good to be able to disable this I think - just for the cases where translations are yet to be entered, or strings are just place holders, or you want to quickly change a string and it happens to be a duplicate of what is already there..... Anyway, solved now. Thanks. Best regards, Gary