Hi all, The Overlay mechanism implemented by Keil is ingenious. Moreover if we want add some functionnality in Eeprom without change ROM code is to my mind impossible because DATA GROUP area will be modified with new local variables used in our new functions in Eeprom. What do you think about this? Thanks a lot, Daniel
One of the disgusting facts about the Keil software is that if you change the name of a variable (or add one) the whole DATA segment layout changes. Not using overlay is usually not an option. I sometimes work with software written by someone or another who uses variable names that are meaningless and in reforming such code I like to change the names and then compare the hex files to ensure that the namechange was the only change (I do make mistakes). This works fine for functions, but try it with a variable and booooooom, the whole hex file changes. As testing only guarantees the absence of KNOWN bugs, it takes an inordinate amount of time to verify what could be verified with a simple hex compare if the sequence of the variables were not shuffled. It would make sense to order the variables by occurence rather than some random? order. Happy hollidays, Erik
If you want no sorted variables use NOSO (no sort) as directive for the Linker. This is not documented but comes as info directly from Keil. Chris *<|:-), merry xmas
The NOSO (short for NOSORTSIZE) is documented on p316 in the current Linker manual (07.2000) But this relates to the ordering of Segments - not variables.
NOSORTSIZE has been available for a long time (since Version 5.50). We continually add new features to the Keil tools. This means that features are added each week or month--not just once every year or two so we can sell upgrades. With this continual development comes New Features. Unfortunately, we cannot reprint manuals each month or two. We also cannot send new printed manuals to customers who download updates. So, we added a file of Release Notes to each installation. The NOSORTSIZE linker directive has been documented in the release notes since it was introduced. Refer to the following knowledgebase article for the C51 V6.00 release notes. http://www.keil.com/support/docs/1258.htm Jon
It would make sense to order the variables by occurence rather than some random? order. The variables are not ordered randomly. They are ordered according to their placement in the symbol table manager (in the compiler). It is the job of the symbol table manager to maintain symbols in a "database" that the compiler can search. Symbols must be maintained by name and by scope level and the strategy must be such that the compiler can locate a symbol very quickly (or else compiler speed suffers). If you were to take a look at different strategies for symbol table management algorithms you will find that this is a sufficiently complex thing to do and on the 8051 this is further complicated by the lack of stack frames. Jon
"If you were to take a look at different strategies for symbol table management algorithms ...." I am not concerned with that, that is a coding issue. Any algorithm can be used with assigning addresses in the sequence they exist in a module, rather than some other way. happy hollidays, Erik