I had the same problem to begin with. same solution. here's a similar extract from my start12c:
i've commented out the #if define(_HCS12_SERIALMON). i'm user the pemicro debugger but i still need those settings.
__asm LDS #0x3FFF;
//#if defined(_HCS12_SERIALMON)
/* for Monitor based software remap the RAM & EEPROM to adhere
to EB386. Edit RAM and EEPROM sections in PRM file to match these. */
___INITRG = 0x00; /* lock registers block to 0x0000 */
___INITRM = 0x39; /* lock Ram to end at 0x3FFF */
___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */
//#endif
---------------------------------------------------------
and here's my prm (theres a bunch of stuff commented out that i really should just delete).
Note that the file_routine segment should be placed in the lowest rom possible. This makes sure it is still accesible when the higher blocks are being swapped so the flash code is still accessible. Also not the two different ram sizes for dhcp and non dhcp. NE64 uses the lowest chunks of ram for ethernet buffers. see app_hw_ne64.h for buffer sizes
----------------------------------------------------------
/* This is a linker parameter file for the MC9S12NE64 */
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 0x2C50 TO 0x3D40; //for when use dhcp
RAM = READ_WRITE 0x2602 TO 0x3D00; //for no dhcp
// STACKSPACE=NO_INIT 0x3D02 TO 0x3FFC;
// STACKSPACE=READ_ONLY 0x3D02 TO 0x3FFC;
/* unbanked FLASH ROM */
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xFEFF;
ROM_8000 = READ_ONLY 0x8000 TO 0xBFFF;
/* 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. */
FILE_ROUTINE,
_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_4000,ROM_8000, ROM_C000 /*, ROM_4000*/;
// OTHER_ROM INTO PAGE_3D, PAGE_3C;
//.stackstart, /* eventually used for OSEK kernel awareness: Main-Stack Start */
// SSTACK, /* allocate stack first to avoid overwriting variables on overflow */
//.stackend, /* eventually used for OSEK kernel awareness: Main-Stack End */
DEFAULT_RAM INTO RAM;
//.vectors INTO OSVECTORS; /* OSEK */
END
ENTRIES /* keep the following unreferenced variables */
/* OSEK: always allocate the vector table and all dependent objects */
//_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart
END
STACKSIZE 0x01
//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 initialization entry point */
-----------------------------------------------------
JD