
6 Nov
2006
6 Nov
'06
9:35 p.m.
Scott Wood wrote:
The BSS is purely an optimization; besides increasing flash footprint somewhat, removing it should not change anything except for code that was already broken.
But that increase in size can be important. Besides after relocation from ROM to RAM the area will not be used. I personally would rather not increase the size of image to handle a limited number of special cases where this initialization is needed prior to relocation to RAM. You can handle such special cases by instructing the variable to be placed on "data" section (like Timur did). Perhaps a macro could be defined to make it more readable and documentation/faq would take care of education.
Tolunay