Hi DJ, >> From the above, I think I like this plan:
Please ignore my earlier post on this topic. We have modified the proposed solution to incorporate your suggestions. We would be glad if you could verify it again. By default all the constant variables will be stored in the far memory ('.frodata' section) and will be accessed using "LDE" instruction. The non-initialized non-constant variables will be stored in near memory ('.nbss' section) and will be accessed using "MOV" instructions. The initialized non-constant variables will be stored in near memory ('.ndata' section) and will be accessed using "MOV" instructions. * By default, all the constant variables will be placed in the far memory. They will be accessed using LDE instructions ('.frodata' section)). * New attribute "near" will be added. This attribute will be used for the latest M16C targets that have 4K/8K flash in near Memory. * Constant variables specified with the attribute "near" will be placed in a section ".nrodata" (near memory) and will be accessed using "MOV" instruction. * By default, non-constant initialized variables will be placed in near memory. * By default, non-constant non-initialized variables will be placed in near memory. * New attribute "far" (to use external memory for non-constant data storage) will be added. * Non-constant non-initialized variables specified with the attribute "far" will be placed in a section ".fbss" (far memory). * Non-constant initialized variables specified with the attribute "far" will be placed in a section ".fdata" (far memory). * LDE/STE instructions will be used to access the non-constant variables specified with the attribute "far". * MOV instructions will be used to access the constant variables specified with the attribute "near". * Default linker script will be modified for placing the default section '.nbss', '.ndata' and '.nrodata' in near memory and '.fbss', '.fdata' and '.frodata' in far Memory. * Separate libraries will be used for R8C and M16C targets. * As the libraries will be built without any attribute, all the constant data in library will be accessed using LDE instructions. Similarly, non-constant non-initialised and non-constant initialised data in library will be accessed using MOV instructions. Please comment on the above proposed solution. Regards, Naveen.H.S. KPIT Cummins Infosystems Ltd, Pune (INDIA) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Free download of GNU based tool-chains for Renesas' SH, H8, R8C, M16C and M32C Series. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU tools were released on June 1, 2007. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~