ANDERS FAGERSTROM

How to use all 4k of RAM in the GC64?

Discussion created by ANDERS FAGERSTROM on Feb 13, 2007
Latest reply on Feb 14, 2007 by Alban Rampon
Hi,
the data sheet says that with the map after reset, only 3k is visible. But the GC64 is specified to have 4k of RAM. Already there I'm confused; seems a bit pointless to have invisible RAM...
 
Anyway, I'm using CodeWarrior, and using the new project wizard this is what is suggested:
 
/* This is a linker parameter file for the MC9S12GC64 */
NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */
SEGMENTS  /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
   
RAM = READ_WRITE 0x0400 TO 0x0FFF;
   /* unbanked FLASH ROM */
   ROM_4000 = READ_ONLY  0x4000 TO 0x7FFF;
   ROM_C000 = READ_ONLY  0xC000 TO 0xFEFF;
   /* banked FLASH ROM */
   PAGE_3C = READ_ONLY  0x3C8000 TO 0x3CBFFF;
   PAGE_3D = READ_ONLY  0x3D8000 TO 0x3DBFFF;
/*  PAGE_3E = READ_ONLY  0x3E8000 TO 0x3EBFFF; not used: equivalent to ROM_4000 */
/*  PAGE_3F = READ_ONLY  0x3F8000 TO 0x3FBFFF; not used: equivalent to ROM_C000 */
END
PLACEMENT  /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
   _PRESTART,                   /* Used in HIWARE format: jump to _Startup at the code start */
   STARTUP,                     /* startup data structures */
   ROM_VAR,                     /* constant variables */
   STRINGS,                     /* string literals */
   VIRTUAL_TABLE_SEGMENT,       /* C++ virtual table segment */
 //.ostext,                     /* OSEK */
   DEFAULT_ROM, NON_BANKED  ,                  /* runtime routines which must not be banked */
   COPY                         /* copy down information: how to initialize variables */
                                /* in case you want to use ROM_4000 here as well, make sure
                                   that all files (incl. library files) are compiled with the
                                   option: -OnB=b */
                                INTO  ROM_C000/*, ROM_4000*/;
   OTHER_ROM                    INTO                    PAGE_3D, PAGE_3C;
   DEFAULT_RAM                  INTO  RAM;
 //.vectors                     INTO OSVECTORS; /* OSEK */
END
ENTRIES /* keep the following unreferenced variables */
//_vectab OsBuildNumber /* OSEK */
END
STACKSIZE 0x100
VECTOR 0 _Startup /* Reset vector: this is the default entry point for a C/C++ application. */
//VECTOR 0 Entry  /* Reset vector: this is the default entry point for an Assembly application. */
//INIT Entry      /* For assembly applications: that this is as well the initialisation entry point */
 
Now, that still looks like 3k of RAM to me. Could somebody explain this to me please? (I have seen other topics slightly related, but nothing spot on. Or perhaps I didn' t understand what I was reading...)
 
Is it even possible to use all 4k?
 
Thanks,
Anders.

Outcomes