Well, when searching for "AN2881.pdf" I did only find this thread :smileysad:.
Search for just AN2881, and there it is:
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2881.pdf?srch=1I was also refering to the startup code of the HC12 V4.5 release, which is located in the lib\hc12c\src directory.
Yours is derived from a previous release of CW.
(which is fine, it just does not contain the serial monitor code)
Here the two snippets from the start12.c file (the second one has to be done before Init is called):
#ifdef _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. */
#define ___INITRM (*(volatile unsigned char *) 0x0010)
#define ___INITRG (*(volatile unsigned char *) 0x0011)
#define ___INITEE (*(volatile unsigned char *) 0x0012)
#endif
#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
Daniel